Adding new leftside panels from the mods folder?
Posted: Thu Apr 26, 2018 6:50 pm
Is it possible to add new GUI elements from the mod folder?
Recently I tried to create a new leftside pane to show a report on the current empire's population demographics. I was able to get the game to load and create the plane using this code:
I was able to verify that create_leftside_pane() was being called and the pane was created and accessible from inside @TopBarContents.lua, but when I actually tried to open the pane the game would immediately crash to desktop.
If I put my code into Lua state the pane works just fine.
Recently I tried to create a new leftside pane to show a report on the current empire's population demographics. I was able to get the game to load and create the plane using this code:
Code: Select all
reload_script [[GUI\~GalaxyMap\GalaxyMap.lua]]
PlanetPopPane(gui.GalaxyMap)
If I put my code into Lua state the pane works just fine.