after two days of study some mods and some try&error i got a little GUI-Menu which i call from console via a interface call.
Code: Select all
remote.call("IFaceFooUI", "show")
Code: Select all
gt = game.gettext
remote.addinterface("IFaceFooUI", { show = function()
local rootFrame = game.player.gui.left.add{ type = "frame", name = "FooUIFrame", caption = gt("FooUICaption"), direction = "vertical" }
rootFrame.add{ type = "flow", name = "FooUIFlow", direction = "horizontal" }
rootFrame.FooUIFlow.add{ type = "button", name = "FooUIResourceButton", caption = gt("btnResourcesCaption") }
rootFrame.FooUIFlow.add{ type = "button", name = "FooUIManufactButton", caption = gt("btnManufactCaption") }
rootFrame.FooUIFlow.add{ type = "button", name = "FooUICloseButton", caption = gt("FooUICloseCaption") }
end
})
But: Is there a alternative to remote.call(...)?
Can i define a new shortcut (which is configurable in the Game-Settings-Menu (where you can set your graphics and sound, etc.)?
Can i define new console-commands like /showFooUI?
Thanks in advance and have a nice day!