diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2021-04-29 09:30:19 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2021-05-03 19:49:19 +0200 |
commit | ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf (patch) | |
tree | 076dd76bafc39c824aaa4e372502514c14d6640a /src/client/hud.h | |
parent | a47a00228b7be97a740081ec9ed86f108021ad6d (diff) | |
download | minetest-ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf.tar.gz minetest-ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf.tar.bz2 minetest-ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf.zip |
refacto: Hud: make driver, client, player, inventory, tsrc private & drop unused guienv
also fix c_content.h, on client it includes the src/client/hud.h instead of src/hud.h, which leads to wrong file dependency on the lua stack
Diffstat (limited to 'src/client/hud.h')
-rw-r--r-- | src/client/hud.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/client/hud.h b/src/client/hud.h index cbfdf1ba3..d341105d2 100644 --- a/src/client/hud.h +++ b/src/client/hud.h @@ -35,13 +35,6 @@ struct ItemStack; class Hud { public: - video::IVideoDriver *driver; - gui::IGUIEnvironment *guienv; - Client *client; - LocalPlayer *player; - Inventory *inventory; - ITextureSource *tsrc; - video::SColor crosshair_argb; video::SColor selectionbox_argb; @@ -54,7 +47,7 @@ public: bool pointing_at_object = false; - Hud(gui::IGUIEnvironment *guienv, Client *client, LocalPlayer *player, + Hud(Client *client, LocalPlayer *player, Inventory *inventory); ~Hud(); @@ -105,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; |