From 67efae9c9ad6f93aaa418d512c4ae1817eed6d24 Mon Sep 17 00:00:00 2001 From: "Y. Wang" Date: Sun, 18 Dec 2022 11:01:26 +0100 Subject: Adjust signal aspect formspecs to be of similar size --- advtrains/formspec.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'advtrains') 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, -- cgit v1.2.3