diff options
author | hlqkj <kris88hl@gmail.com> | 2021-03-09 10:03:42 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-03-22 11:06:26 +0100 |
commit | b9c824db00f73c28b6b728e35a9967bc54054020 (patch) | |
tree | 1b3a6f316273874612317309143d2f04c6606125 | |
parent | 75474ec07e0ed497eb4abbe902aa9187fc657937 (diff) | |
download | advtrains-b9c824db00f73c28b6b728e35a9967bc54054020.tar.gz advtrains-b9c824db00f73c28b6b728e35a9967bc54054020.tar.bz2 advtrains-b9c824db00f73c28b6b728e35a9967bc54054020.zip |
Rework active_common formspec layout
- Aligned stuff
- Added style to use monospaced font in the code editor textarea
- Added label to the environment dropdown
-rw-r--r-- | advtrains_luaautomation/active_common.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua index d168bad..36cb8cd 100644 --- a/advtrains_luaautomation/active_common.lua +++ b/advtrains_luaautomation/active_common.lua @@ -41,9 +41,14 @@ function ac.getform(pos, meta_p) sel=#envs_asvalues end end - local form = "size[10,10]dropdown[0,0;3;env;"..table.concat(envs_asvalues, ",")..";"..sel.."]" - .."button[4,0;2,1;save;Save]button[7,0;2,1;cle;Clear local env] textarea[0.2,1;10,10;code;Code;"..minetest.formspec_escape(code).."]" - .."label[0,9.8;"..err.."]" + local form = "size[10,10]" + .."style[code;font=mono]" + .."label[0,-0.1;Environment]" + .."dropdown[0,0.3;3;env;"..table.concat(envs_asvalues, ",")..";"..sel.."]" + .."button[5,0.2;2,1;save;Save]" + .."button[7,0.2;3,1;cle;Clear Local Env.]" + .."textarea[0.3,1.5;10,9.5;code;Code;"..minetest.formspec_escape(code).."]" + .."label[0,9.7;"..err.."]" return form end |