diff options
author | sapier <Sapier at GMX dot net> | 2014-04-28 23:41:27 +0200 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-05-07 21:46:27 +0200 |
commit | d3ee617f37984b380ebe32cd37ef1cda66d96c48 (patch) | |
tree | ff40e272e0b5ab7525d66ddd3b98fa3eed71a496 /src/game.cpp | |
parent | c80d67f48e2011c88bbb9e755ee4f5e7f5391f63 (diff) | |
download | minetest-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/game.cpp')
-rw-r--r-- | src/game.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index a9ca38d1d..8a0aa1776 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2492,6 +2492,7 @@ void the_game(bool &kill, bool random_input, InputHandler *input, delete event.hudadd.align; delete event.hudadd.offset; delete event.hudadd.world_pos; + delete event.hudadd.size; continue; } @@ -2507,6 +2508,7 @@ void the_game(bool &kill, bool random_input, InputHandler *input, e->align = *event.hudadd.align; e->offset = *event.hudadd.offset; e->world_pos = *event.hudadd.world_pos; + e->size = *event.hudadd.size; if (id == nhudelem) player->hud.push_back(e); @@ -2520,6 +2522,7 @@ void the_game(bool &kill, bool random_input, InputHandler *input, delete event.hudadd.align; delete event.hudadd.offset; delete event.hudadd.world_pos; + delete event.hudadd.size; } else if (event.type == CE_HUDRM) { @@ -2536,6 +2539,7 @@ void the_game(bool &kill, bool random_input, InputHandler *input, delete event.hudchange.v3fdata; delete event.hudchange.v2fdata; delete event.hudchange.sdata; + delete event.hudchange.v2s32data; continue; } @@ -2571,11 +2575,15 @@ void the_game(bool &kill, bool random_input, InputHandler *input, case HUD_STAT_WORLD_POS: e->world_pos = *event.hudchange.v3fdata; break; + case HUD_STAT_SIZE: + e->size = *event.hudchange.v2s32data; + break; } delete event.hudchange.v3fdata; delete event.hudchange.v2fdata; delete event.hudchange.sdata; + delete event.hudchange.v2s32data; } else if (event.type == CE_SET_SKY) { @@ -3563,8 +3571,7 @@ void the_game(bool &kill, bool random_input, InputHandler *input, */ if (show_hud) { - hud.drawHotbar(client.getHP(), client.getPlayerItem(), - client.getBreath()); + hud.drawHotbar(client.getPlayerItem()); } /* |