Initial commit

This commit is contained in:
Brian Beck 2025-09-11 16:56:30 -07:00
parent 2211ed7650
commit ebb3dc9cdd
10121 changed files with 801 additions and 4 deletions

View file

@ -0,0 +1,47 @@
function SimSet::removeStable(%this, %object)
{
if(%this.getCount() < 2)
{
%this.remove(%object);
return;
}
%last = %this.getObject(%this.getCount() - 1);
%this.remove(%object);
%this.pushToBack(%last);
}
if(!isObject(GameDialogSet))
{
new SimSet(GameDialogSet);
RootGroup.add(GameDialogSet);
}
function GuiCanvas::setGameMode(%this, %on)
{
if(%this.gameMode == %on)
return;
%this.gameMode = %on;
if(%this.gameMode)
{
%this.setContent(%this.gameContent);
for(%i = 0; %i < GameDialogSet.getCount(); %i++)
%this.pushDialog(GameDialogSet.getObject(%i));
}
else
Canvas.setContent(LobbyGui);
}
function GuiCanvas::pushGameDialog(%this, %dialog)
{
GameDialogSet.add(%dialog);
if(%this.gameMode)
%this.pushDialog(%dialog);
}
function GuiCanvas::popGameDialog(%this, %dialog)
{
GameDialogSet.removeStable(%dialog);
if(%this.gameMode)
%this.popDialog(%dialog);
}