]> git.lizzy.rs Git - minetest.git/blobdiff - src/hud.h
Replace std::list by std::vector into ServerMap::listAllLoadableBlocks ServerMap...
[minetest.git] / src / hud.h
index 3897a850c332fba79a005e82d0558a4117e67202..2e6838eb108288e4b67289c3ff9bcb7e5808adfe 100644 (file)
--- 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
@@ -101,8 +103,6 @@ class Hud {
        video::IVideoDriver *driver;
        scene::ISceneManager* smgr;
        gui::IGUIEnvironment *guienv;
-       gui::IGUIFont *font;
-       u32 text_height;
        IGameDef *gamedef;
        LocalPlayer *player;
        Inventory *inventory;
@@ -115,20 +115,20 @@ class Hud {
        bool use_hotbar_image;
        std::string hotbar_selected_image;
        bool use_hotbar_selected_image;
+       v3s16 camera_offset;
        
        Hud(video::IVideoDriver *driver,scene::ISceneManager* smgr,
-               gui::IGUIEnvironment* guienv, gui::IGUIFont *font,
-               u32 text_height, IGameDef *gamedef,
-               LocalPlayer *player, Inventory *inventory);
+               gui::IGUIEnvironment* guienv, 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();
+       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);