mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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
This commit is contained in:
parent
c80d67f48e
commit
d3ee617f37
15 changed files with 325 additions and 51 deletions
10
src/hud.h
10
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue