aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2022-12-18 11:01:26 +0100
committerY. Wang <yw05@forksworld.de>2023-03-23 20:06:02 +0100
commit67efae9c9ad6f93aaa418d512c4ae1817eed6d24 (patch)
tree5959e058eed2c9b50909622fac6521e9aa964ad4 /advtrains
parent640d72929d67a516cc870986bd27ed0408eb684d (diff)
downloadadvtrains-67efae9c9ad6f93aaa418d512c4ae1817eed6d24.tar.gz
advtrains-67efae9c9ad6f93aaa418d512c4ae1817eed6d24.tar.bz2
advtrains-67efae9c9ad6f93aaa418d512c4ae1817eed6d24.zip
Adjust signal aspect formspecs to be of similar size
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/formspec.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/advtrains/formspec.lua b/advtrains/formspec.lua
index 58968da..743d3f3 100644
--- a/advtrains/formspec.lua
+++ b/advtrains/formspec.lua
@@ -17,6 +17,14 @@ local function S_button(x, y, w, h, id, ...)
return f_button(x, y, w, h, id, attrans(...))
end
+local function f_checkbox(x, y, name, selected, label)
+ return sformat("checkbox[%f,%f;%s;%s;%s]", x, y, name, label, selected and "true" or "false")
+end
+
+local function S_checkbox(x, y, name, selected, ...)
+ return f_checkbox(x, y, name, selected, attrans(...))
+end
+
local function f_button_exit(x, y, w, h, id, text)
return sformat("button_exit[%f,%f;%f,%f;%s;%s]", x, y, w, h, id, text)
end
@@ -88,6 +96,8 @@ end
return {
button = f_button,
S_button = S_button,
+ checkbox = f_checkbox,
+ S_checkbox = S_checkbox,
button_exit = f_button_exit,
S_button_exit = S_button_exit,
dropdown = f_dropdown,