mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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
This commit is contained in:
parent
3068853e8a
commit
81c66d6efb
20 changed files with 470 additions and 144 deletions
13
src/hud.h
13
src/hud.h
|
@ -51,7 +51,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#define HUD_HOTBAR_ITEMCOUNT_DEFAULT 8
|
||||
#define HUD_HOTBAR_ITEMCOUNT_MAX 32
|
||||
|
||||
|
||||
#define HOTBAR_IMAGE_SIZE 48
|
||||
|
||||
enum HudElementType {
|
||||
|
@ -61,7 +60,8 @@ enum HudElementType {
|
|||
HUD_ELEM_INVENTORY = 3,
|
||||
HUD_ELEM_WAYPOINT = 4,
|
||||
HUD_ELEM_IMAGE_WAYPOINT = 5,
|
||||
HUD_ELEM_COMPASS = 6
|
||||
HUD_ELEM_COMPASS = 6,
|
||||
HUD_ELEM_MINIMAP = 7
|
||||
};
|
||||
|
||||
enum HudElementStat {
|
||||
|
@ -108,3 +108,12 @@ extern const EnumString es_HudElementType[];
|
|||
extern const EnumString es_HudElementStat[];
|
||||
extern const EnumString es_HudBuiltinElement[];
|
||||
|
||||
// Minimap stuff
|
||||
|
||||
enum MinimapType {
|
||||
MINIMAP_TYPE_OFF,
|
||||
MINIMAP_TYPE_SURFACE,
|
||||
MINIMAP_TYPE_RADAR,
|
||||
MINIMAP_TYPE_TEXTURE,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue