mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Split HUD code off to hud.cpp, make into a class, extensive Lua HUD modification
This commit is contained in:
parent
49f6e347f0
commit
666aae3593
12 changed files with 793 additions and 816 deletions
18
src/player.h
18
src/player.h
|
@ -87,7 +87,7 @@ class Map;
|
|||
class IGameDef;
|
||||
struct CollisionInfo;
|
||||
class PlayerSAO;
|
||||
struct HudElement;
|
||||
class HudElement;
|
||||
|
||||
class Player
|
||||
{
|
||||
|
@ -243,9 +243,8 @@ public:
|
|||
}
|
||||
|
||||
u32 keyPressed;
|
||||
|
||||
std::map<u32, HudElement*> hud;
|
||||
std::map<u8, u32> hud_bars;
|
||||
|
||||
std::vector<HudElement *> hud;
|
||||
|
||||
protected:
|
||||
IGameDef *m_gamedef;
|
||||
|
@ -257,17 +256,6 @@ protected:
|
|||
v3f m_position;
|
||||
};
|
||||
|
||||
struct HudElement {
|
||||
u8 type;
|
||||
core::vector2df pos;
|
||||
std::string name;
|
||||
|
||||
core::vector2df scale;
|
||||
std::string text;
|
||||
u32 number;
|
||||
u32 item;
|
||||
u32 dir;
|
||||
};
|
||||
|
||||
/*
|
||||
Player on the server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue