diff options
Diffstat (limited to 'src/client/hud.h')
-rw-r--r-- | src/client/hud.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/client/hud.h b/src/client/hud.h index d46545d71..fd79183a0 100644 --- a/src/client/hud.h +++ b/src/client/hud.h @@ -35,13 +35,13 @@ struct ItemStack; class Hud { public: - video::IVideoDriver *driver; - scene::ISceneManager *smgr; - gui::IGUIEnvironment *guienv; - Client *client; - LocalPlayer *player; - Inventory *inventory; - ITextureSource *tsrc; + enum BlockBoundsMode + { + BLOCK_BOUNDS_OFF, + BLOCK_BOUNDS_CURRENT, + BLOCK_BOUNDS_NEAR, + BLOCK_BOUNDS_MAX + } m_block_bounds_mode = BLOCK_BOUNDS_OFF; video::SColor crosshair_argb; video::SColor selectionbox_argb; @@ -55,10 +55,14 @@ public: bool pointing_at_object = false; - Hud(gui::IGUIEnvironment *guienv, Client *client, LocalPlayer *player, + Hud(Client *client, LocalPlayer *player, Inventory *inventory); ~Hud(); + enum BlockBoundsMode toggleBlockBounds(); + void disableBlockBounds(); + void drawBlockBounds(); + void drawHotbar(u16 playeritem); void resizeHotbar(); void drawCrosshair(); @@ -103,6 +107,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; |