Commit Graph

59 Commits

Author SHA1 Message Date
cx384 d6fe4c3bbd Make alignment behave like other elements 2024-04-11 22:18:49 +02:00
cx384 a0158147e5 Fix implicit cast in drawItems 2024-04-11 22:09:59 +02:00
cx384 d86fd06639 Fix zindex behavior 2024-04-11 22:09:59 +02:00
cx384 195b7494d7 Replace hasElementOfType with protocol version 2024-04-11 22:09:59 +02:00
cx384 26b6c42ed7 Add hotbar Lua HUD element and replace hardcoded hotbar 2024-04-11 22:09:56 +02:00
grorp 9bee6d899b Fix invisible crosshair with effective HUD scaling < 1 2024-04-06 12:10:12 +02:00
grorp 6e3246c5fd
Limit crosshair scaling to integer multiples to avoid distortion (#14501) 2024-03-30 11:07:36 +01:00
sfan5 bb7f57b095 VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
sfan5 5280863300 Set VBO hints in more places 2024-02-29 17:20:49 +01:00
David Heidelberg 34286d77c7
Allow toggling touchscreen mode at runtime (#14075)
Signed-off-by: David Heidelberg <david@ixit.cz>
Co-authored-by: Gregor Parzefall <gregor.parzefall@posteo.de>
2024-02-22 15:44:49 +00:00
cx384 adaa4cc2f3
Move hard coded minimap to builtin (#14071) 2024-02-07 20:13:23 +01:00
techno-sam 176e674a51
Add wear bar color API (#13328)
---------

Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
Co-authored-by: grorp <gregor.parzefall@posteo.de>
2024-02-02 21:21:00 +01:00
Lars Mueller fb461d21a5 Fix waypoint precision wraparound, add bounds check 2024-01-21 21:00:09 +01:00
Gregor Parzefall 833c324498
Make the crosshair DPI-aware (#13772) 2023-09-11 18:59:32 +02:00
Gregor Parzefall 92b6ff4721
TouchScreenGUI: Fix only 9 hotbar slots being usable (#13698)
Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
2023-08-24 17:45:51 +02:00
Gregor Parzefall 6bf63d4b41 Rename SMaterial::TextureLayer -> SMaterial::TextureLayers
It's not the "texture layer" of the material, but an array of texture layers.
2023-07-20 22:15:47 +02:00
Gregor Parzefall 307e380f30 Refactor the way you set material properties
Instead of using SMaterial::setFlag, you now set them directly on SMaterial or SMaterialLayer.
2023-07-20 22:15:47 +02:00
Desour 5e6d144567 Enable -Wimplicit-fallthrough and use [[fallthrough]] attribute 2023-06-15 10:38:44 +02:00
Thresher 180ec92ef9
Remove trailing whitespace (#13505) 2023-05-18 20:34:18 +02:00
rubenwardy 4158b72971
Add ability to override item images using meta (#12614) 2023-04-17 19:44:41 +01:00
Lars Müller 077627181e
Allow rotating entity selectionboxes (#12379) 2022-10-30 16:53:14 +01:00
Herman Semenov 038da00e79
Code optimizations / refactor (#12704)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-06 11:21:09 +01:00
x2048 ff6dcfea82
Implement rendering pipeline and post-processing (#12465)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: lhofhansl <lhofhansl@yahoo.com>
2022-09-06 08:25:18 +02:00
SmallJoker c14b7536a4 HUD: Fix wrong minimum scale since 051181f
Caused by wrong interpretation of the settingtypes.txt format
2022-07-31 14:57:19 +02:00
SmallJoker 051181fa6e
Enforce limits of settings that could cause buggy behaviour (#12450)
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
2022-07-09 22:32:08 +02:00
DS a8707158a5
Allow to set the displayed item count and its alignment via meta (#8448)
* Allow to set the displayed item count and its offset via meta

* fix rect constr call

* devtest: add dump_item chatcommand

* fix rect2 constr call (sdim is a position (typedef for v2s32), not a dimension) and remove background because it would work now

* add missing utf8 to wide conversion

* rename to count_meta
2022-02-10 06:17:52 -05:00
Lars Mueller 1e4d6672be Fix builtin statbar backgrounds
see #12000
2022-01-31 16:35:30 -05:00
SmallJoker 481bb90eac Fix segfault in drawItems() due to missing inventory list
This fixes a nullptr dereference when the specified inventory list is not known.
Happens when HUD elements are sent before the required inventory list is created.
2021-12-29 19:20:49 +01:00
Wuzzy 86b44ecd82
Add no_texture.png as fallback for unspecified textures 2021-10-20 21:50:16 +02:00
Lars Müller 40ea4ddef1
Fix HUD multiline text alignment (#10795) 2021-09-19 20:23:22 +02:00
Wuzzy 6fd8aede48
Show status message when changing block bounds (#11556) 2021-08-21 13:53:49 +02:00
sfan5 6e8aebf432
Add bold, italic and monospace font styling for HUD text elements (#11478)
Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
2021-07-27 19:11:46 +02:00
Wuzzy 63fc728a84
Require 'basic_debug' priv to view gameplay-relevant debug info, require 'debug' priv to view wireframe (#9315)
Fixes #7245.
2021-06-24 21:21:19 +03:00
sfan5 2443f1e235 Fix overlays for 2D-drawn items
fixes #11248
2021-05-08 19:44:43 +02:00
Loic Blot ccdd886e27 refacto: Hud: make driver, client, player, inventory, tsrc private & drop unused guienv
also fix c_content.h, on client it includes the src/client/hud.h instead of src/hud.h, which leads to wrong file dependency on the lua stack
2021-05-03 19:49:19 +02:00
Loic Blot 258101a910 refacto: RenderingEngine is now better hidden
* No more access to the singleton instance from everywhere (RenderingEngine::get_instance dropped)
* RenderingEngine::get_timer_time is now non static
* RenderingEngine::draw_menu_scene is now non static
* RenderingEngine::draw_scene is now non static
* RenderingEngine::{initialize,finalize} are now non static
* RenderingEngine::run is now non static
* RenderingEngine::getWindowSize now have a static helper. It was mandatory to hide the global get_instance access
2021-05-03 19:49:19 +02:00
Seth Traverse 16e5b39e1d
Add a key to toggle map block bounds (#11172)
It's often useful to know where the map block boundaries are for doing server admin work and the like.
Adds three modes: single mapblock, range of 5, and disabled.
2021-04-20 19:23:31 +02:00
sfan5 f0bad0e2ba
Reserve vectors before pushing and other code quality changes (#11161) 2021-04-05 13:38:31 +02:00
sfan5 0d90ed6d92
Draw items as 2D images (instead of meshes) when possible 2021-03-30 21:50:39 +02:00
Jean-Patrick Guerrero 285ba74723
GUIScene: Clear depth buffer + replace deprecated clearZBuffer calls 2021-03-16 23:28:16 +01:00
rubenwardy 4c76239818
Remove dead code (#10845) 2021-01-22 15:09:26 +00:00
sfan5 74762470b2 Fix some minor code issues all over the place 2020-12-24 13:44:54 +01:00
Vitaliy ccbf8029ea
Cleanup shader generation code (#10663)
Shader generation is a mess. This commit cleans some parts up, including dropping remains of HLSL support which was never actually implemented.
2020-12-19 20:57:10 +01:00
Pierre-Yves Rollo 81c66d6efb Minimap as HUD element with API control
Features:
 * Define Minimap available modes (surface/radar, scale) from Lua, using player:set_minimap_modes()
 * New HUD elements for displaying minimap with custom size and placing
 * New minimap mode for displaying a texture instead of the map
2020-10-04 15:24:34 +02:00
EvidenceB 5c4b560b68
Add compass HUD element (#9312)
Co-authored-by: Jean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>
Co-authored-by: Pierre-Yves Rollo <dev@pyrollo.com>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-08-29 20:13:30 +02:00
LoneWolfHT 88ffd64124 Add object crosshair, disable entity selectionboxes by default (#9523)
Adds new object crosshair base pack texture
2020-07-14 19:13:04 +02:00
Maksim 7ec0e3df35
Fix HUD scaling (#9721)
This resolves HUD scaling issues on Android and desktops with custom DPI settings.
2020-06-05 21:42:33 +02:00
LoneWolfHT 7d3972a504
Add ability to scale HUD text (#9814)
Add 'size' property to HUD text elements that is used for relative font size calculations.
2020-05-19 19:10:39 +02:00
Wuzzy 6e1372bd89
Add support for statbar “off state” icons (#9462)
This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles.

Add "off state" textures to the builtin statbars.

Co-authored-by: SmallJoker <mk939@ymail.com>
2020-05-11 21:40:45 +02:00
Lars Müller af2e6a6a10
Improve waypoints and add image variant (#9480) 2020-04-11 22:09:46 +01:00