1
0
Fork 0
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:
EvidenceB 2020-08-29 20:13:30 +02:00 committed by GitHub
parent 386d5f778a
commit 5c4b560b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 175 additions and 2 deletions

View file

@ -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,