summaryrefslogtreecommitdiff
path: root/src/hud.h
diff options
context:
space:
mode:
authorPierre-Yves Rollo <dev@pyrollo.com>2020-10-04 15:24:29 +0200
committerSmallJoker <mk939@ymail.com>2020-10-04 15:24:34 +0200
commit81c66d6efb9fb0ab8a03b40e2bc22aa49eff9a04 (patch)
tree0f1c256eb6f24eb95df60804d9db82cead0f91e2 /src/hud.h
parent3068853e8a58ccc7370a5ce977c08223601c497a (diff)
downloadminetest-81c66d6efb9fb0ab8a03b40e2bc22aa49eff9a04.tar.gz
minetest-81c66d6efb9fb0ab8a03b40e2bc22aa49eff9a04.tar.bz2
minetest-81c66d6efb9fb0ab8a03b40e2bc22aa49eff9a04.zip
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
Diffstat (limited to 'src/hud.h')
-rw-r--r--src/hud.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/hud.h b/src/hud.h
index 0a6993c1b..a0613ae98 100644
--- a/src/hud.h
+++ b/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,
+};
+