Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/doc/lua
diff options
context:
space:
mode:
authorVladimir Krasheninnikov <boba09@list.ru>2025-03-01 20:31:48 +0100
committerVladimir Krasheninnikov <boba09@list.ru>2025-03-01 20:31:48 +0100
commite9a67335409ccc75a95cf1093bedb47abc17861a (patch)
tree4abe97bc7a6f43a8dd8f891d374d61a829cbfd33 /doc/lua
parentec20848c4689e73090963255b6cf923d6859c1be (diff)
Bring new textbox callbacks
Diffstat (limited to 'doc/lua')
-rw-r--r--doc/lua/openstarbound/widget.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/lua/openstarbound/widget.md b/doc/lua/openstarbound/widget.md
new file mode 100644
index 0000000..4d97e9a
--- /dev/null
+++ b/doc/lua/openstarbound/widget.md
@@ -0,0 +1,33 @@
+# Widget
+
+New widget callbacks introduced in OpenStarbound.
+
+## General callbacks
+
+These callbacks are available for all widgets.
+
+---
+
+## Widget specific callbacks
+
+These callbacks only work for some widget types.
+
+---
+
+#### `String` widget.getHint(`String` widgetName)
+
+Gets the hint text of a TextBoxWidget.
+
+#### `void` widget.setHint(`String` widgetName, `String` hint)
+
+Sets the hint text of a TextBoxWidget.
+
+---
+
+#### `String` widget.getCursorPosition(`String` widgetName)
+
+Gets the cursor position of a TextBoxWidget.
+
+#### `void` widget.setCursorPosition(`String` widgetName, `int` cursorPosition)
+
+Sets the cursor position of a TextBoxWidget. \ No newline at end of file