From 181f21b70e2cdd7e5e3e63eb9349f820dbeec72e Mon Sep 17 00:00:00 2001 From: cheapie Date: Fri, 10 Apr 2020 06:15:49 -0500 Subject: Add textlist support --- README | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'README') diff --git a/README b/README index a51a75a..9fe1660 100644 --- a/README +++ b/README @@ -17,6 +17,10 @@ tslib.getColorEscapeSequence(color) tslib.colorize(color,message) Returns the message with the text changed to the given color. Behaves similarly to minetest.colorize(). + +tslib.explode_textlist_event(event) + Converts a textlist event into a table containing a "type" field ("INV" for no row selected, "CHG" for single-click, or "DCL" for double-click) and an "index" field with the item number clicked. + Behaves similarly to minetest.explode_textlist_event(). screen:getChannel() Returns the current channel set for the screen object. @@ -55,6 +59,10 @@ screen:addTextArea(X,Y,width,height,name,label,default) screen:addDropdown(X,Y,width,height,name,choices[,selected]) Adds a drop-down menu at the given X-Y position, with the given size, name, and list of choices (which should be a table). An item can optionally be pre-selected by adding a "selected" value. It will default to 1 (the first choice) if not supplied. + +screen:addTextlist(X,Y,width,height,name,choices,selected,transparent) + Adds a textlist at the given X-Y position, with the given size, name, and list of choices (which should be a table), optionally transparent, but the transparent flag must be given even if false. + The item specified by the "selected" value will be pre-selected, or none if this is 0. screen:draw() Sends the buffer contents to the screen. -- cgit v1.2.3