aboutsummaryrefslogtreecommitdiff
path: root/src/client/hud.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/hud.h')
-rw-r--r--src/client/hud.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/hud.h b/src/client/hud.h
index d9b5e0686..6f4c54626 100644
--- a/src/client/hud.h
+++ b/src/client/hud.h
@@ -18,8 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLIENT_HUD_HEADER
-#define CLIENT_HUD_HEADER
+#pragma once
#include <vector>
#include <IGUIFont.h>
@@ -81,8 +80,10 @@ public:
void drawLuaElements(const v3s16 &camera_offset);
private:
- void drawStatbar(v2s32 pos, u16 corner, u16 drawdir, const std::string &texture,
- s32 count, v2s32 offset, v2s32 size = v2s32());
+ bool calculateScreenPos(const v3s16 &camera_offset, HudElement *e, v2s32 *pos);
+ void drawStatbar(v2s32 pos, u16 corner, u16 drawdir,
+ const std::string &texture, const std::string& bgtexture,
+ s32 count, s32 maxcount, v2s32 offset, v2s32 size = v2s32());
void drawItems(v2s32 upperleftpos, v2s32 screen_offset, s32 itemcount,
s32 inv_offset, InventoryList *mainlist, u16 selectitem,
@@ -91,6 +92,7 @@ private:
void drawItem(const ItemStack &item, const core::rect<s32> &rect, bool selected);
float m_hud_scaling; // cached minetest setting
+ float m_scale_factor;
v3s16 m_camera_offset;
v2u32 m_screensize;
v2s32 m_displaycenter;
@@ -145,4 +147,3 @@ void drawItemStack(
const v3s16 &angle,
const v3s16 &rotation_speed);
-#endif