mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Add compass HUD element (#9312)
Co-authored-by: Jean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com> Co-authored-by: Pierre-Yves Rollo <dev@pyrollo.com> Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
386d5f778a
commit
5c4b560b68
5 changed files with 175 additions and 2 deletions
|
@ -95,6 +95,12 @@ private:
|
|||
|
||||
void drawItem(const ItemStack &item, const core::rect<s32> &rect, bool selected);
|
||||
|
||||
void drawCompassTranslate(HudElement *e, video::ITexture *texture,
|
||||
const core::rect<s32> &rect, int way);
|
||||
|
||||
void drawCompassRotate(HudElement *e, video::ITexture *texture,
|
||||
const core::rect<s32> &rect, int way);
|
||||
|
||||
float m_hud_scaling; // cached minetest setting
|
||||
float m_scale_factor;
|
||||
v3s16 m_camera_offset;
|
||||
|
@ -115,6 +121,8 @@ private:
|
|||
|
||||
video::SMaterial m_selection_material;
|
||||
|
||||
scene::SMeshBuffer m_rotation_mesh_buffer;
|
||||
|
||||
enum
|
||||
{
|
||||
HIGHLIGHT_BOX,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue