aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2022-06-11 18:07:00 +0200
committerY. Wang <yw05@forksworld.de>2023-03-23 20:06:02 +0100
commit98c37108762c6d7c9f1d691b84f49bfa65b81b28 (patch)
tree32402fd5365d14470016562f16a5bc5f560eec87 /advtrains
parentd1a0d8f2654d6ee64c1a43de7958b1eadfaff6b0 (diff)
downloadadvtrains-98c37108762c6d7c9f1d691b84f49bfa65b81b28.tar.gz
advtrains-98c37108762c6d7c9f1d691b84f49bfa65b81b28.tar.bz2
advtrains-98c37108762c6d7c9f1d691b84f49bfa65b81b28.zip
Implement primitive distant signaling
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 aa5aa69..20dab59 100644
--- a/advtrains/formspec.lua
+++ b/advtrains/formspec.lua
@@ -9,6 +9,14 @@ local function make_list(entries)
return table.concat(t, ",")
end
+local function f_button(x, y, w, h, id, text)
+ return sformat("button[%f,%f;%f,%f;%s;%s]", x, y, w, h, id, text)
+end
+
+local function S_button(x, y, w, h, id, ...)
+ return f_button(x, y, w, h, id, 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
@@ -54,6 +62,8 @@ local function f_tabheader(x, y, w, h, id, entries, sel, transparent, border)
end
return {
+ button = f_button,
+ S_button = S_button,
button_exit = f_button_exit,
S_button_exit = S_button_exit,
dropdown = f_dropdown,