1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Decouple entity minimap markers from nametags replacing with show_on_minimap property (#10443)

This commit is contained in:
sfan5 2020-10-19 20:38:15 +02:00 committed by GitHub
parent b826e39730
commit 660115c1ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 85 additions and 11 deletions

View file

@ -48,6 +48,13 @@ struct MinimapModeDef {
u16 scale;
};
struct MinimapMarker {
MinimapMarker(scene::ISceneNode *parent_node):
parent_node(parent_node)
{
}
scene::ISceneNode *parent_node;
};
struct MinimapPixel {
//! The topmost node that the minimap displays.
MapNode n;
@ -142,6 +149,9 @@ public:
scene::SMeshBuffer *getMinimapMeshBuffer();
MinimapMarker* addMarker(scene::ISceneNode *parent_node);
void removeMarker(MinimapMarker **marker);
void updateActiveMarkers();
void drawMinimap();
void drawMinimap(core::rect<s32> rect);
@ -162,5 +172,6 @@ private:
u16 m_surface_mode_scan_height;
f32 m_angle;
std::mutex m_mutex;
std::list<MinimapMarker*> m_markers;
std::list<v2f> m_active_markers;
};