aboutsummaryrefslogtreecommitdiff
path: root/advtrains_line_automation
diff options
context:
space:
mode:
authorhlqkj <kris88hl@gmail.com>2021-03-09 10:03:39 +0100
committerorwell96 <orwell@bleipb.de>2021-03-22 11:06:03 +0100
commit07b1231f751db12a284dc28ec6a525ebdf0bb142 (patch)
tree5a8255c623b7ad73b9132a3b8f66fb4a0ac1f8c3 /advtrains_line_automation
parent5b4f5491d26ae42419ecb036f79fa0040ce45975 (diff)
downloadadvtrains-07b1231f751db12a284dc28ec6a525ebdf0bb142.tar.gz
advtrains-07b1231f751db12a284dc28ec6a525ebdf0bb142.tar.bz2
advtrains-07b1231f751db12a284dc28ec6a525ebdf0bb142.zip
Rework stoprail formspec layout and add mono style
- Rework formspec layout, fixed tab order - Added style to use monospaced font for the stn and ars fields
Diffstat (limited to 'advtrains_line_automation')
-rw-r--r--advtrains_line_automation/stoprail.lua25
1 files changed, 12 insertions, 13 deletions
diff --git a/advtrains_line_automation/stoprail.lua b/advtrains_line_automation/stoprail.lua
index 0a66eee..55a4785 100644
--- a/advtrains_line_automation/stoprail.lua
+++ b/advtrains_line_automation/stoprail.lua
@@ -50,19 +50,18 @@ local function show_stoprailform(pos, player)
end
local form = "size[8,7]"
- form = form.."field[0.5,0.5;7,1;stn;"..attrans("Station Code")..";"..minetest.formspec_escape(stdata.stn).."]"
- form = form.."field[0.5,1.5;7,1;stnname;"..attrans("Station Name")..";"..minetest.formspec_escape(stnname).."]"
- form = form.."field[0.5,2.5;1.5,1;ddelay;"..attrans("Door Delay")..";"..minetest.formspec_escape(stdata.ddelay).."]"
- form = form.."field[2,2.5;2,1;speed;"..attrans("Departure Speed")..";"..minetest.formspec_escape(stdata.speed).."]"
- form = form.."checkbox[5,1.75;reverse;"..attrans("Reverse train")..";"..(stdata.reverse and "true" or "false").."]"
- form = form.."checkbox[5,2.0;kick;"..attrans("Kick out passengers")..";"..(stdata.kick and "true" or "false").."]"
- form = form.."label[0.5,3;Door side:]"
- form = form.."dropdown[0.5,3;2;doors;Left,Right,Closed;"..door_dropdown[stdata.doors].."]"
- form = form.."field[5,3.5;2,1;track;"..attrans("Track")..";"..minetest.formspec_escape(stdata.track).."]"
- form = form.."field[5,4.5;2,1;wait;"..attrans("Stop Time")..";"..stdata.wait.."]"
-
- form = form.."textarea[0.5,4;4,2;ars;Trains stopping here (ARS rules);"..advtrains.interlocking.ars_to_text(stdata.ars).."]"
-
+ form = form.."style[stn,ars;font=mono]"
+ form = form.."field[0.8,0.8;2,1;stn;"..attrans("Station Code")..";"..minetest.formspec_escape(stdata.stn).."]"
+ form = form.."field[2.8,0.8;5,1;stnname;"..attrans("Station Name")..";"..minetest.formspec_escape(stnname).."]"
+ form = form.."field[0.80,2.0;1.75,1;ddelay;"..attrans("Door Delay")..";"..minetest.formspec_escape(stdata.ddelay).."]"
+ form = form.."field[2.55,2.0;1.75,1;speed;"..attrans("Dep. Speed")..";"..minetest.formspec_escape(stdata.speed).."]"
+ form = form.."field[4.30,2.0;1.75,1;track;"..attrans("Track")..";"..minetest.formspec_escape(stdata.track).."]"
+ form = form.."field[6.05,2.0;1.75,1;wait;"..attrans("Stop Time")..";"..stdata.wait.."]"
+ form = form.."label[0.5,2.6;"..attrans("Door Side").."]"
+ form = form.."dropdown[0.51,3.0;2;doors;Left,Right,Closed;"..door_dropdown[stdata.doors].."]"
+ form = form.."checkbox[3.00,2.7;reverse;"..attrans("Reverse train")..";"..(stdata.reverse and "true" or "false").."]"
+ form = form.."checkbox[3.00,3.1;kick;"..attrans("Kick out passengers")..";"..(stdata.kick and "true" or "false").."]"
+ form = form.."textarea[0.8,4.2;7,2;ars;Trains stopping here (ARS rules);"..advtrains.interlocking.ars_to_text(stdata.ars).."]"
form = form.."button[0.5,6;7,1;save;"..attrans("Save").."]"
minetest.show_formspec(pname, "at_lines_stop_"..pe, form)