1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Added offset support for HUD items

This commit is contained in:
Diego Martínez 2013-04-22 20:47:59 -03:00 committed by Perttu Ahola
parent 7c37b1891a
commit 9894167bbf
9 changed files with 43 additions and 8 deletions

View file

@ -48,7 +48,8 @@ enum HudElementStat {
HUD_STAT_NUMBER,
HUD_STAT_ITEM,
HUD_STAT_DIR,
HUD_STAT_ALIGN
HUD_STAT_ALIGN,
HUD_STAT_OFFSET
};
struct HudElement {
@ -61,6 +62,7 @@ struct HudElement {
u32 item;
u32 dir;
v2f align;
v2f offset;
};
@ -108,7 +110,7 @@ public:
void drawItem(v2s32 upperleftpos, s32 imgsize, s32 itemcount,
InventoryList *mainlist, u16 selectitem, u16 direction);
void drawLuaElements();
void drawStatbar(v2s32 pos, u16 corner, u16 drawdir, std::string texture, s32 count);
void drawStatbar(v2s32 pos, u16 corner, u16 drawdir, std::string texture, s32 count, v2s32 offset);
void drawHotbar(v2s32 centerlowerpos, s32 halfheartcount, u16 playeritem);
void resizeHotbar();