1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

[CSM] Add minimap API modifiers (#5399)

* Rename Mapper (too generic) to Minimap
* Add lua functions to get/set position, angle, mode for minimap
* Client: rename m_mapper to m_minimap
* Add minimap to core.ui namespace (core.ui.minimap)
* Add various functions to manage minimap (show, hide, toggle_shape)
* Cleanup trivial declaration in client
This commit is contained in:
Loïc Blot 2017-03-16 10:34:54 +01:00 committed by GitHub
parent eb88e5dd4b
commit 40ce538aad
14 changed files with 349 additions and 53 deletions

View file

@ -112,19 +112,21 @@ private:
std::map<v3s16, MinimapMapblock *> m_blocks_cache;
};
class Mapper {
class Minimap {
public:
Mapper(IrrlichtDevice *device, Client *client);
~Mapper();
Minimap(IrrlichtDevice *device, Client *client);
~Minimap();
void addBlock(v3s16 pos, MinimapMapblock *data);
v3f getYawVec();
MinimapMode getMinimapMode();
void setPos(v3s16 pos);
v3s16 getPos() const { return data->pos; }
void setAngle(f32 angle);
f32 getAngle() const { return m_angle; }
void setMinimapMode(MinimapMode mode);
MinimapMode getMinimapMode() const { return data->mode; }
void toggleMinimapShape();