function MainMenuButtons::onWake(%this) { } function MainMenuButtons::onSleep(%this) { } //Optional, as the check defaults to true, but here as an example case function MainMenuButtonList::canOpen(%this) { return true; } function MainMenuButtonList::onOpen(%this) { MainMenuButtonList.setAsActiveMenuList(); $activeMenuButtonContainer-->button1.disable(); $activeMenuButtonContainer-->button2.disable(); $activeMenuButtonContainer-->button3.disable(); $activeMenuButtonContainer-->button4.set("btn_a", "Return", "Go", "MainMenuButtonList.activate();"); $activeMenuButtonContainer-->button5.disable(); } //Optional, as the check defaults to true, but here as an example case function MainMenuButtonList::canClose(%this) { return true; } function MainMenuButtonList::onClose(%this) { } function openSinglePlayerMenu() { $pref::HostMultiPlayer=false; MainMenuGui.pushPage(ChooseLevelDlg); } function openMultiPlayerMenu() { $pref::HostMultiPlayer=true; MainMenuGui.pushPage(ChooseLevelDlg); } function openJoinServerMenu() { MainMenuGui.pushPage(JoinServerMenu); } function openOptionsMenu() { MainMenuGui.pushPage(OptionsMenu); } function openWorldEditorBtn() { fastLoadWorldEdit(1); } function openGUIEditorBtn() { fastLoadGUIEdit(1); }