Skip to content

Commit

Permalink
Formspec: Create a new class for inventorylists (#9287)
Browse files Browse the repository at this point in the history
  • Loading branch information
Desour committed Feb 1, 2020
1 parent 908e762 commit 1116918
Show file tree
Hide file tree
Showing 8 changed files with 448 additions and 291 deletions.
1 change: 1 addition & 0 deletions build/android/jni/Android.mk
Expand Up @@ -189,6 +189,7 @@ LOCAL_SRC_FILES := \
jni/src/gui/guiEngine.cpp \
jni/src/gui/guiFormSpecMenu.cpp \
jni/src/gui/guiHyperText.cpp \
jni/src/gui/guiInventoryList.cpp \
jni/src/gui/guiItemImage.cpp \
jni/src/gui/guiKeyChangeMenu.cpp \
jni/src/gui/guiPasswordChange.cpp \
Expand Down
4 changes: 0 additions & 4 deletions doc/lua_api.txt
Expand Up @@ -1946,8 +1946,6 @@ For coloured text you can use `minetest.colorize`.

Since formspec version 3, elements drawn in the order they are defined. All
background elements are drawn before all other elements.
`list` elements are an exception here. They are drawn last. This, however, might
be changed at any time.

**WARNING**: do _not_ use a element name starting with `key_`; those names are
reserved to pass key press events to formspec!
Expand Down Expand Up @@ -2058,15 +2056,13 @@ Elements
be shown if the inventory list is of size 0.
* **Note**: With the new coordinate system, the spacing between inventory
slots is one-fourth the size of an inventory slot.
* **Note**: Lists are drawn after every other element. This might change at any time.

### `list[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;<starting item index>]`

* Show an inventory list if it has been sent to the client. Nothing will
be shown if the inventory list is of size 0.
* **Note**: With the new coordinate system, the spacing between inventory
slots is one-fourth the size of an inventory slot.
* **Note**: Lists are drawn after every other element. This might change at any time.

### `listring[<inventory location>;<list name>]`

Expand Down
1 change: 1 addition & 0 deletions src/gui/CMakeLists.txt
Expand Up @@ -9,6 +9,7 @@ set(gui_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/guiEditBoxWithScrollbar.cpp
${CMAKE_CURRENT_SOURCE_DIR}/guiEngine.cpp
${CMAKE_CURRENT_SOURCE_DIR}/guiFormSpecMenu.cpp
${CMAKE_CURRENT_SOURCE_DIR}/guiInventoryList.cpp
${CMAKE_CURRENT_SOURCE_DIR}/guiItemImage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/guiKeyChangeMenu.cpp
${CMAKE_CURRENT_SOURCE_DIR}/guiPasswordChange.cpp
Expand Down

0 comments on commit 1116918

Please sign in to comment.