So I decided to create a new script called AssistingFunctions for some code, simply because I couldn't figure out a good place to put it. If you know of a better place, please put it there, or we could keep the script and use it for helping-functions that could be called anywhere.
Anyhow, here's the code, I kinda pleased with how neat and simple it turned out. This uses the same option screen as the one in-game, but deactives the buttons we don't want to be pressable.
Put the following function in AssistingScript.asc
Code:
function disableOptionGUIButtons(bool visible)
{
btnSaveGame.Visible = visible;
btnLoadGame.Visible = visible;
btnRestartGame.Visible = visible;
btnQuitGame.Visible = visible;
}
Put the following line in AssistingScript.ash
Code:
import function disableOptionGUIButtons(bool visible);
Edit the following function in room100.asc
Code:
function hOPTION_Interact()
{
gOptions.Visible = true;
}
In room100, I made the following function by using the Event-section of AGS
Code:
function room_AfterFadeIn()
{
disableOptionGUIButtons(false);
}
And similar for leaving
Code:
function room_Leave()
{
disableOptionGUIButtons(true);
}
This is polish, but it should be fixed because it's super annoying, remove following function in GlobalScript.asc
Code:
function gOptions_OnClick(GUI *theGui, MouseButton button)
{
gOptions.Visible = false;
}
EDIT: I just noticed that the function name "disableOptionsGUIButtons" is misleading considering what it does, feel free to change it to something more appropriate.