From 40ce538aad9af8f7634c4ba7e9f12246fb23b31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Thu, 16 Mar 2017 10:34:54 +0100 Subject: [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 --- doc/client_lua_api.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc/client_lua_api.md') diff --git a/doc/client_lua_api.md b/doc/client_lua_api.md index c07a1c55a..70716ee41 100644 --- a/doc/client_lua_api.md +++ b/doc/client_lua_api.md @@ -789,9 +789,27 @@ Call these functions only at load time! * same as fgettext_ne(), but calls core.formspec_escape before returning result * `show_formspec(formname, formspec)` : returns true on success * Shows a formspec to the player + +### UI +* `minetest.ui.minimap` + * Reference to the minimap object. See `Minimap` class reference for methods. + Class reference --------------- +### `Minimap` +An interface to manipulate minimap on client UI + +* `show()`: shows the minimap (if not disabled by server) +* `hide()`: hides the minimap +* `set_pos(pos)`: sets the minimap position on screen +* `get_pos()`: returns the minimap current position +* `set_angle(deg)`: sets the minimap angle in degrees +* `get_angle()`: returns the current minimap angle in degrees +* `set_mode(mode)`: sets the minimap mode (0 to 6) +* `get_mode()`: returns the current minimap mode +* `toggle_shape()`: toggles minimap shape to round or square. + ### `Settings` An interface to read config files in the format of `minetest.conf`. -- cgit v1.2.3