diff options
author | hlqkj <kris88hl@gmail.com> | 2021-03-09 10:03:41 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-03-22 11:06:22 +0100 |
commit | 75474ec07e0ed497eb4abbe902aa9187fc657937 (patch) | |
tree | 8f3c0de3aeb601e1ccde79c78959af35bdf0f7bc | |
parent | 5f2e40a08fa298934972be1b425e27a207f324a1 (diff) | |
download | advtrains-75474ec07e0ed497eb4abbe902aa9187fc657937.tar.gz advtrains-75474ec07e0ed497eb4abbe902aa9187fc657937.tar.bz2 advtrains-75474ec07e0ed497eb4abbe902aa9187fc657937.zip |
Rework envsetup formspec layout
- Aligned stuff
- Added style to use monospaced font in the code editor textarea
-rw-r--r-- | advtrains_luaautomation/chatcmds.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/advtrains_luaautomation/chatcmds.lua b/advtrains_luaautomation/chatcmds.lua index 468698b..31e2a48 100644 --- a/advtrains_luaautomation/chatcmds.lua +++ b/advtrains_luaautomation/chatcmds.lua @@ -18,10 +18,15 @@ local function get_init_form(env, pname) if ppos then pp="POS"..minetest.pos_to_string(ppos) end - local form = "size[10,10]button[0,0;2,1;run;Run InitCode]button[2,0;2,1;cls;Clear S]" - .."button[4,0;2,1;save;Save] button[6,0;2,1;del;Delete Env.] field[8.1,0.5;2,1;punchpos;Last punched position;"..pp.."]" - .."textarea[0.2,1;10,10;code;Environment initialization code;"..minetest.formspec_escape(code).."]" - .."label[0,9.8;"..err.."]" + local form = "size[10,10]" + .."style[code;font=mono]" + .."button[0.0,0.2;2,1;run;Run InitCode]" + .."button[2.0,0.2;2,1;cls;Clear S]" + .."button[4.0,0.2;2,1;save;Save]" + .."button[6.0,0.2;2,1;del;Delete Env.]" + .."field[8.3,0.5;2,1;punchpos;Last punched position;"..pp.."]" + .."textarea[0.3,1.5;10,9.5;code;Environment initialization code;"..minetest.formspec_escape(code).."]" + .."label[0.0,9.7;"..err.."]" return form end |