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:
parent
eb88e5dd4b
commit
40ce538aad
14 changed files with 349 additions and 53 deletions
|
@ -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`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue