aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking
diff options
context:
space:
mode:
authorhlqkj <kris88hl@gmail.com>2021-03-09 10:03:43 +0100
committerorwell96 <orwell@bleipb.de>2021-03-22 11:06:29 +0100
commitace8ca0fdac5bfcc588d9ec47c24e28d699e3ca9 (patch)
tree1dd917fbddc4f2445f842471692438515c4c25b0 /advtrains_interlocking
parentb9c824db00f73c28b6b728e35a9967bc54054020 (diff)
downloadadvtrains-ace8ca0fdac5bfcc588d9ec47c24e28d699e3ca9.tar.gz
advtrains-ace8ca0fdac5bfcc588d9ec47c24e28d699e3ca9.tar.bz2
advtrains-ace8ca0fdac5bfcc588d9ec47c24e28d699e3ca9.zip
Rework route ui formspec layout
- Aligned stuff - Added style to use monospaced font in the ars rules editor textarea
Diffstat (limited to 'advtrains_interlocking')
-rw-r--r--advtrains_interlocking/route_ui.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/advtrains_interlocking/route_ui.lua b/advtrains_interlocking/route_ui.lua
index 64e45ee..1999941 100644
--- a/advtrains_interlocking/route_ui.lua
+++ b/advtrains_interlocking/route_ui.lua
@@ -25,8 +25,8 @@ function atil.show_route_edit_form(pname, sigd, routeid)
if not route then return end
local form = "size[9,10]label[0.5,0.2;Route overview]"
- form = form.."field[0.8,1.2;5.2,1;name;Route name;"..minetest.formspec_escape(route.name).."]"
- form = form.."button[5.5,0.9;1,1;setname;Set]"
+ form = form.."field[0.8,1.2;6.5,1;name;Route name;"..minetest.formspec_escape(route.name).."]"
+ form = form.."button[7.0,0.9;1.5,1;setname;Set]"
-- construct textlist for route information
local tab = {}
@@ -80,15 +80,16 @@ function atil.show_route_edit_form(pname, sigd, routeid)
itab("Route ends on dead-end")
end
- form = form.."textlist[0.5,2;7,4;rtelog;"..table.concat(tab, ",").."]"
+ form = form.."textlist[0.5,2;7.75,3.9;rtelog;"..table.concat(tab, ",").."]"
- form = form.."button[0.5,6;2,1;back;<<< Back to signal]"
- form = form.."button[3.5,6;2,1;aspect;Signal Aspect]"
- form = form.."button[5.5,6;2,1;delete;Delete Route]"
+ form = form.."button[0.5,6;3,1;back;<<< Back to signal]"
+ form = form.."button[4.5,6;2,1;aspect;Signal Aspect]"
+ form = form.."button[6.5,6;2,1;delete;Delete Route]"
--atdebug(route.ars)
- form = form.."textarea[1,7.3;5.2,3;ars;ARS Rule List;"..atil.ars_to_text(route.ars).."]"
- form = form.."button[6,7.7;1,1;savears;Save]"
+ form = form.."style[ars;font=mono]"
+ form = form.."textarea[0.8,7.3;5,3;ars;ARS Rule List;"..atil.ars_to_text(route.ars).."]"
+ form = form.."button[5.5,7.23;3,1;savears;Save ARS List]"
minetest.show_formspec(pname, "at_il_routeedit_"..minetest.pos_to_string(sigd.p).."_"..sigd.s.."_"..routeid, form)