1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add direction parameter to statbars in HUD API

Fix health bar overlap when a larger texture is used
This commit is contained in:
kwolekr 2013-04-20 00:21:32 -04:00
parent c45c530f74
commit 527deb947c
4 changed files with 54 additions and 33 deletions

View file

@ -27,6 +27,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define HUD_DIR_TOP_BOTTOM 2
#define HUD_DIR_BOTTOM_TOP 3
#define HUD_CORNER_UPPER 0
#define HUD_CORNER_LOWER 1
#define HUD_CORNER_CENTER 2
class Player;
enum HudElementType {
@ -102,7 +106,7 @@ public:
void drawItem(v2s32 upperleftpos, s32 imgsize, s32 itemcount,
InventoryList *mainlist, u16 selectitem, u16 direction);
void drawLuaElements();
void drawStatbar(v2s32 upperleftpos, std::string texture, s32 count);
void drawStatbar(v2s32 pos, u16 corner, u16 drawdir, std::string texture, s32 count);
void drawHotbar(v2s32 centerlowerpos, s32 halfheartcount, u16 playeritem);
void resizeHotbar();