summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--streetsmod/forms.lua14
-rw-r--r--streetsmod/forms/cmd_streets.smartfs1
2 files changed, 5 insertions, 10 deletions
diff --git a/streetsmod/forms.lua b/streetsmod/forms.lua
index 28ceb31..c636c85 100644
--- a/streetsmod/forms.lua
+++ b/streetsmod/forms.lua
@@ -1,10 +1,4 @@
-streets.forms.chatcmd = smartfs.create("streets:chatcmd", function(state)
- state:size(10,6)
- local tlist = state:element("list", { pos={x=0,y=1}, size={w=6,h=5}, name = "streets:chatcmd_modlist" } )
- tlist:removeItem()
- for k, v in pairstreets.S(streets.extendedBy) do
- tlist:addItem(tostring(k) .. " " .. streets.S("installed") .. ": " .. tostring(v))
- end
- state:label(6.5, 1, "streets:chatcmd_version", streets.S("Running version") .. ": " .. streets.version)
- state:label(6.5, 1.5, "streets:chatcmd_loadtime", streets.S("Load time") .. ": " .. round(streets.load.fin - streets.load.start,4) .. "s")
-end) \ No newline at end of file
+-- Form for chatcommand /streets
+ streets.forms.chatcmd = smartfs.create("streets:chatcmd", function(state)
+ state:load(streets.modpath .. "/forms/cmd_streets.smartfs")
+ end) \ No newline at end of file
diff --git a/streetsmod/forms/cmd_streets.smartfs b/streetsmod/forms/cmd_streets.smartfs
new file mode 100644
index 0000000..3dbd29c
--- /dev/null
+++ b/streetsmod/forms/cmd_streets.smartfs
@@ -0,0 +1 @@
+return { ["ele"] = { ["streets:chatcmd_version"] = { ["type"] = "label", ["pos"] = { ["y"] = 1, ["x"] = 6.5 }, ["name"] = "streets:chatcmd_version", ["value"] = "Running version: 1.4.4dev" }, ["streets:chatcmd_guibg"] = { ["type"] = "code", ["name"] = "streets:chatcmd_guibg", ["code"] = "bgcolor[#080808BB;true]background[5,5;1,1;gui_formbg.png;true]" }, ["streets:chatcmd_modlist"] = { ["pos"] = { ["y"] = 1, ["x"] = 0 }, ["size"] = { ["h"] = 5, ["w"] = 6 }, ["type"] = "list", ["name"] = "streets:chatcmd_modlist", ["items"] = { "digilines installed: false", "mesecons installed: false", "moreblocks installed: false", "wool installed: true", "technic installed: false", "prefab installed: false", "awards installed: false" } } }, ["size"] = { ["h"] = 6, ["w"] = 10 } } \ No newline at end of file