summaryrefslogtreecommitdiff
path: root/src/hud.h
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-04-28 23:41:27 +0200
committersapier <Sapier at GMX dot net>2014-05-07 21:46:27 +0200
commitd3ee617f37984b380ebe32cd37ef1cda66d96c48 (patch)
treeff40e272e0b5ab7525d66ddd3b98fa3eed71a496 /src/hud.h
parentc80d67f48e2011c88bbb9e755ee4f5e7f5391f63 (diff)
downloadminetest-d3ee617f37984b380ebe32cd37ef1cda66d96c48.tar.gz
minetest-d3ee617f37984b380ebe32cd37ef1cda66d96c48.tar.bz2
minetest-d3ee617f37984b380ebe32cd37ef1cda66d96c48.zip
Fix heart + bubble bar size on different texture packs
Add DPI support for statbar Move heart+bubble bar to Lua HUD Add statbar size (based upon an idea by blue42u) Add support for customizing breath and statbar
Diffstat (limited to 'src/hud.h')
-rw-r--r--src/hud.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/hud.h b/src/hud.h
index 1ace6646f..9969fce73 100644
--- a/src/hud.h
+++ b/src/hud.h
@@ -66,7 +66,8 @@ enum HudElementStat {
HUD_STAT_DIR,
HUD_STAT_ALIGN,
HUD_STAT_OFFSET,
- HUD_STAT_WORLD_POS
+ HUD_STAT_WORLD_POS,
+ HUD_STAT_SIZE
};
struct HudElement {
@@ -81,6 +82,7 @@ struct HudElement {
v2f align;
v2f offset;
v3f world_pos;
+ v2s32 size;
};
#ifndef SERVER
@@ -122,14 +124,14 @@ public:
u32 text_height, IGameDef *gamedef,
LocalPlayer *player, Inventory *inventory);
- void drawHotbar(s32 halfheartcount, u16 playeritem, s32 breath);
+ void drawHotbar(u16 playeritem);
void resizeHotbar();
void drawCrosshair();
void drawSelectionBoxes(std::vector<aabb3f> &hilightboxes);
void drawLuaElements(v3s16 camera_offset);
private:
- void drawStatbar(v2s32 pos, u16 corner, u16 drawdir,
- std::string texture, s32 count, v2s32 offset);
+ void drawStatbar(v2s32 pos, u16 corner, u16 drawdir, std::string texture,
+ s32 count, v2s32 offset, v2s32 size=v2s32());
void drawItems(v2s32 upperleftpos, s32 itemcount, s32 offset,
InventoryList *mainlist, u16 selectitem, u16 direction);