From a8707158a5be8c604fdb028a9c5f68ce5804016e Mon Sep 17 00:00:00 2001 From: DS Date: Thu, 10 Feb 2022 12:17:52 +0100 Subject: 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 --- doc/lua_api.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/lua_api.txt') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 7061a5b8a..1dc5f305d 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -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: -- cgit v1.2.3