This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteI wouldn't rely on me though, as I'm not very self-motivated...Lol... That's not supposed to be a good thing.
QuoteYou can effectively turn off a visible GUI by setting it's .Clickable property to false.Unfortunately not that simple. When a GUI.Clickable is set to false, the mouse over hilight functions still work on the buttons.
//=============
// DECLARATIONS
//=============
bool FreezeMainMenu;
export FreezeMainMenu;
//============================
// FREEZE MAIN MENU CONDITIONS
//============================
if (FreezeMainMenu == true) {
bNewGame.Clickable = false;
bNewGame.MouseOverGraphic = 394;
bLoadGame.Clickable = false;
bLoadGame.MouseOverGraphic = 397;
bMainOptions.Clickable = false;
bMainOptions.MouseOverGraphic = 395;
bCredits.Clickable = false;
bCredits.MouseOverGraphic = 393;
bQuit.Clickable = false;
bQuit.MouseOverGraphic = 396;
}
else {
bNewGame.Clickable = true;
bNewGame.MouseOverGraphic = 399;
bLoadGame.Clickable = true;
bLoadGame.MouseOverGraphic = 402;
bMainOptions.Clickable = true;
bMainOptions.MouseOverGraphic = 400;
bCredits.Clickable = true;
bCredits.MouseOverGraphic = 398;
bQuit.Clickable = true;
bQuit.MouseOverGraphic = 401;
}
import bool FreezeMainMenu;
if (gAskFirst.Visible == true) {
gOptions.Enabled = false; // Disables all clicking in this GUI but does not pass the mouse clicks through it.
}
// top of global script
static bool Game.LockSave;
function repeatedly_execute_always ( )
{
if (Game.LockSave == true) {
bMainSave.NormalGraphic = 361;
bMainSave.Enabled = false;
bSave.NormalGraphic = 363;
bSave.Enabled = false;
}
else {
bMainSave.NormalGraphic = 873;
bMainSave.Enabled = true;
bSave.NormalGraphic = 333;
bSave.Enabled = true;
}
}
function repeatedly_execute ( )
{
Button* ButtonsWithSounds = bMainCancel;
Button* bMainSave = ButtonsWithSounds;
Button* bMainLoad = ButtonsWithSounds;
Button* bMainLoad = ButtonsWithSounds;
Button* bMainRestart = ButtonsWithSounds;
Button* bMainQuit = ButtonsWithSounds;
Button* bModalYes = ButtonsWithSounds;
Button* bModalNo = ButtonsWithSounds;
Button* bNewGame = ButtonsWithSounds;
Button* bLoadGame = ButtonsWithSounds;
Button* bOptions = ButtonsWithSounds;
Button* bCredits = ButtonsWithSounds;
Button* bQuit = ButtonsWithSounds;
Button* bLoadGameCancel = ButtonsWithSounds;
Button* bLoadGameLoad = ButtonsWithSounds;
Button* bSaveGameCancel = ButtonsWithSounds;
Button* bSaveGameSave = ButtonsWithSounds;
Button* bCombatHelpOk = ButtonsWithSounds;
if (mouse.IsButtonDown(eMouseLeft) && Button.GetAtScreenXY(mouse.x, mouse.y)=="ButtonsWithSounds") {
aClickDown.Play(eAudioPriorityVeryLow, eOnce);
}
else if (mouse.IsButtonReleased(eMouseLeft) && Button.GetAtScreenXY(mouse.x, mouse.y)=="ButtonsWithSounds") {
aClickUp.Play(eAudioPriorityVeryLow, eOnce);
}
}
function repeatedly_execute ( )
{
String ButtonsWithSounds = bMainCancel;
String bMainSave = ButtonsWithSounds;
String bMainLoad = ButtonsWithSounds;
String bMainLoad = ButtonsWithSounds;
String bMainRestart = ButtonsWithSounds;
String bMainQuit = ButtonsWithSounds;
String bModalYes = ButtonsWithSounds;
String bModalNo = ButtonsWithSounds;
String bNewGame = ButtonsWithSounds;
String bLoadGame = ButtonsWithSounds;
String bOptions = ButtonsWithSounds;
String bCredits = ButtonsWithSounds;
String bQuit = ButtonsWithSounds;
String bLoadGameCancel = ButtonsWithSounds;
String bLoadGameLoad = ButtonsWithSounds;
String bSaveGameCancel = ButtonsWithSounds;
String bSaveGameSave = ButtonsWithSounds;
String bCombatHelpOk = ButtonsWithSounds;
if (mouse.IsButtonDown(eMouseLeft) && Button.GetAtScreenXY(mouse.x, mouse.y)=="ButtonsWithSounds") {
aClickDown.Play(eAudioPriorityVeryLow, eOnce);
}
else if (mouse.IsButtonReleased(eMouseLeft) && Button.GetAtScreenXY(mouse.x, mouse.y)=="ButtonsWithSounds") {
aClickUp.Play(eAudioPriorityVeryLow, eOnce);
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.031 seconds with 15 queries.