aboutsummaryrefslogtreecommitdiff
path: root/src/client/hud.h
diff options
context:
space:
mode:
authorMinetest-j45 <55553015+Minetest-j45@users.noreply.github.com>2021-08-30 15:22:40 +0100
committerGitHub <noreply@github.com>2021-08-30 15:22:40 +0100
commit7824a4956bf489b4e2cc35e0c97272eee06be6ba (patch)
tree70243765dc1743a83596f9c6eec122fb417ef92c /src/client/hud.h
parent607add326feb44e078b843464ce4a8de09f28743 (diff)
parent35445d24f425c6291a0580b468919ca83de716fd (diff)
downloaddragonfireclient-7824a4956bf489b4e2cc35e0c97272eee06be6ba.tar.xz
Merge pull request #1 from EliasFleckenstein03/master
update
Diffstat (limited to 'src/client/hud.h')
-rw-r--r--src/client/hud.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/client/hud.h b/src/client/hud.h
index d46545d71..d341105d2 100644
--- a/src/client/hud.h
+++ b/src/client/hud.h
@@ -35,14 +35,6 @@ struct ItemStack;
class Hud
{
public:
- video::IVideoDriver *driver;
- scene::ISceneManager *smgr;
- gui::IGUIEnvironment *guienv;
- Client *client;
- LocalPlayer *player;
- Inventory *inventory;
- ITextureSource *tsrc;
-
video::SColor crosshair_argb;
video::SColor selectionbox_argb;
@@ -55,10 +47,13 @@ public:
bool pointing_at_object = false;
- Hud(gui::IGUIEnvironment *guienv, Client *client, LocalPlayer *player,
+ Hud(Client *client, LocalPlayer *player,
Inventory *inventory);
~Hud();
+ void toggleBlockBounds();
+ void drawBlockBounds();
+
void drawHotbar(u16 playeritem);
void resizeHotbar();
void drawCrosshair();
@@ -103,6 +98,12 @@ private:
void drawCompassRotate(HudElement *e, video::ITexture *texture,
const core::rect<s32> &rect, int way);
+ Client *client = nullptr;
+ video::IVideoDriver *driver = nullptr;
+ LocalPlayer *player = nullptr;
+ Inventory *inventory = nullptr;
+ ITextureSource *tsrc = nullptr;
+
float m_hud_scaling; // cached minetest setting
float m_scale_factor;
v3s16 m_camera_offset;
@@ -125,6 +126,14 @@ private:
scene::SMeshBuffer m_rotation_mesh_buffer;
+ enum BlockBoundsMode
+ {
+ BLOCK_BOUNDS_OFF,
+ BLOCK_BOUNDS_CURRENT,
+ BLOCK_BOUNDS_ALL,
+ BLOCK_BOUNDS_MAX
+ } m_block_bounds_mode = BLOCK_BOUNDS_OFF;
+
enum
{
HIGHLIGHT_BOX,