mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Allow to set the displayed item count and its alignment via meta (#8448)
* Allow to set the displayed item count and its offset via meta * fix rect constr call * devtest: add dump_item chatcommand * fix rect2 constr call (sdim is a position (typedef for v2s32), not a dimension) and remove background because it would work now * add missing utf8 to wide conversion * rename to count_meta
This commit is contained in:
parent
ad1da994b2
commit
a8707158a5
3 changed files with 111 additions and 12 deletions
|
@ -2174,6 +2174,13 @@ Some of the values in the key-value store are handled specially:
|
|||
* `color`: A `ColorString`, which sets the stack's color.
|
||||
* `palette_index`: If the item has a palette, this is used to get the
|
||||
current color from the palette.
|
||||
* `count_meta`: Replace the displayed count with any string.
|
||||
* `count_alignment`: Set the alignment of the displayed count value. This is an
|
||||
int value. The lowest 2 bits specify the alignment in x-direction, the 3rd and
|
||||
4th bit specify the alignment in y-direction:
|
||||
0 = default, 1 = left / up, 2 = middle, 3 = right / down
|
||||
The default currently is the same as right/down.
|
||||
Example: 6 = 2 + 1*4 = middle,up
|
||||
|
||||
Example:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue