Hy.
I'm making my title screen with all the options before you start. I'm making it as a room with hotspots. One hotspot is the load "button". Oh, and I'm using the Tumbleweed template.
I used this code:
function hLoad_AnyClick()
{
gLoad.Visible=true;
}
But when the GUI pops up, all the windows are empty, even though there should be save files in it. And if you click on any of the windows, the game crashes.
Is "gLoad" a gui from template or your own? I'd assume that Thumbleweed has its own code to fill in GUI lists, and you have to call some function instead of displaying GUI yourself. Perhaps, look how their original global script handles this (or maybe something is in their documentation).
In general, list boxes don't really do anything automatically, you need to fill them with a script command, either by manually adding items, or calling ListBox.FillSaveGameList() or ListBox.FillDirList().
Quote from: viktor on Tue 05/01/2021 14:12:39And if you click on any of the windows, the game crashes.
Please always include any messages displayed with the crash, that makes it possible to diagnose a problem.
Not easy to find but you're supposed to call
CustomLoad.ShowLoadDialog();
Similar commands can be found for CustomSave.* and OptionsGui.*.
Quote from: Khris on Tue 05/01/2021 16:12:59
Not easy to find but you're supposed to call
CustomLoad.ShowLoadDialog();
Similar commands can be found for CustomSave.* and OptionsGui.*.
That did it, thank you :)