(SOLVED) Title screen open Load GUI

Started by viktor, Tue 05/01/2021 14:12:39

Previous topic - Next topic

viktor

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:
Code: ags
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.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

Crimson Wizard

#1
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.

Khris

Not easy to find but you're supposed to call
Code: ags
  CustomLoad.ShowLoadDialog();


Similar commands can be found for  CustomSave.*  and  OptionsGui.*.

viktor

Quote from: Khris on Tue 05/01/2021 16:12:59
Not easy to find but you're supposed to call
Code: ags
  CustomLoad.ShowLoadDialog();


Similar commands can be found for  CustomSave.*  and  OptionsGui.*.

That did it, thank you :)
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

SMF spam blocked by CleanTalk