private void accountOver() { if (MenuPopup.isAMenuVisible()) { this.btnMyAccount_Click(false); } }
private void adminOver() { if (MenuPopup.isAMenuVisible()) { this.btnAdminMenu_Click(); } }
private void fileOver() { if (MenuPopup.isAMenuVisible()) { this.button2_Click(false); } }
private void helpOver() { if (MenuPopup.isAMenuVisible()) { this.btnHelp_Click(false); } }
private void button2_Click(bool sfx) { if (sfx) { GameEngine.Instance.playInterfaceSound("WorldMapScreen_menu_settings"); } MenuPopup popup = new MenuPopup(); Point point = base.csd.PointToScreen(this.btnFileMenu.Position); popup.setPosition(point.X, point.Y + 0x18); popup.setCallBack(new MenuPopup.MenuCallback(this.menu1Callback)); popup.addMenuItem(SK.Text("MENU_Settings", "Settings"), 1); popup.addMenuItem(SK.Text("MENU_Edit_Avatar", "Edit Avatar"), 5); popup.addMenuItem(SK.Text("User_Manage_Relations", "Manage Diplomacy"), 300); int ownSelectedVillage = InterfaceMgr.Instance.OwnSelectedVillage; if (((ownSelectedVillage >= 0) && !GameEngine.Instance.World.isCapital(ownSelectedVillage)) && GameEngine.Instance.World.isUserVillage(ownSelectedVillage)) { popup.addBar(); popup.addMenuItem(SK.Text("MENU_Rename_Current_Village", "Rename Current Village"), 9); CustomSelfDrawPanel.CSDControl control = popup.addMenuItem(SK.Text("MENU_Convert_Current_Village", "Convert Current Village"), 12); CustomSelfDrawPanel.CSDControl control2 = popup.addMenuItem(SK.Text("MENU_Abandon_Current_Village", "Abandon Current Village"), 11); control.CustomTooltipID = 0x4b0; control2.CustomTooltipID = 0x4b1; } popup.showMenu(); }
private void combatOver() { if (MenuPopup.isAMenuVisible()) { this.btnCombat_Click(); } }
private void btnMail_MouseEnter(object sender, EventArgs e) { if (MenuPopup.isAMenuVisible()) { this.btnMail_Click(null, null); } }
private void btnHelp_Click(bool sfx) { if (sfx) { GameEngine.Instance.playInterfaceSound("WorldMapScreen_menu_help"); } MenuPopup popup = new MenuPopup(); Point point = base.csd.PointToScreen(this.btnHelpMenu.Position); popup.setPosition(point.X, point.Y + 0x18); popup.setCallBack(new MenuPopup.MenuCallback(this.menu1Callback)); popup.addMenuItem(SK.Text("MENU_SHK_Help", "Stronghold Kingdoms Help"), 0x6c); popup.addMenuItem(SK.Text("MENU_Game_Rules", "Game Rules"), 0x6d); if (Program.mySettings.LanguageIdent == "en") { popup.addMenuItem("Terms & Conditions", 0x97); } else { popup.addMenuItem(SK.Text("MENU_TandC", "Terms & Conditions").Replace("&", "&&"), 0x97); } popup.addMenuItem(SK.Text("MENU_Privacy", "Privacy Policy"), 0x98); popup.addMenuItem(SK.Text("MENU_Forum", "Forum"), 0x6b); popup.addBar(); popup.addMenuItem(SK.Text("MENU_Show_Admin_Message", "Show Admin Message"), 0x67); popup.addBar(); if (GameEngine.Instance.World.isTutorialResumable()) { popup.addMenuItem(SK.Text("Options_Resume_Tutorial", "Resume Tutorial"), 0x455); } popup.addMenuItem(SK.Text("Options_Player_Guide", "Player Guide"), 0x4b1); popup.addBar(); popup.addMenuItem(SK.Text("MENU_About_Stronghold Kingdoms", "About Stronghold Kingdoms"), 0x66); popup.showMenu(); }
private void btnAdminMenu_Click() { MenuPopup popup = new MenuPopup(); Point point = base.csd.PointToScreen(this.btnAdminMenu.Position); popup.setPosition(point.X, point.Y + 0x18); popup.setCallBack(new MenuPopup.MenuCallback(this.menu1Callback)); popup.addMenuItem("Edit Admin Message", 0xc9); popup.addMenuItem("Retrieve Game Info", 0xcb); popup.addBar(); popup.addMenuItem("Country Playback (Admins Only)", 0xca); popup.addMenuItem("Province Playback (Admins Only)", 0x23f2); popup.addMenuItem("Stop Playback (Admins Only)", 0x23f3); popup.addBar(); popup.addMenuItem("Fix Lost Units (CAREFUL!)", 0xd1); popup.addMenuItem("Castle Copy Mode", 0x5207); if (!GameEngine.Instance.World.MapEditing) { popup.addMenuItem("Open County - Select Capital", 0x8ab); } else { int villageID = GameEngine.Instance.World.lastClickedVillage(); if (GameEngine.Instance.World.isCountyCapital(villageID) && !GameEngine.Instance.World.isVillageVisible(villageID)) { int countyID = GameEngine.Instance.World.getCountyFromVillageID(villageID); popup.addMenuItem("Open County : " + GameEngine.Instance.World.getCountyName(countyID), 0x8ab); } else { popup.addMenuItem("Open County : NONE SELECTED", 0x8ab); } } popup.addBar(); popup.addMenuItem("Toggle Village IDs", 0xe7); popup.addMenuItem("Toggle Village Names", 0xe8); popup.addBar(); popup.addMenuItem("Create Ingame Message", 0xdd); popup.addMenuItem("Remove Ingame Message", 0xdf); popup.showMenu(); }
private void btnMyAccount_Click(bool sfx) { if (sfx) { GameEngine.Instance.playInterfaceSound("WorldMapScreen_menu_myaccount"); } MenuPopup popup = new MenuPopup(); Point point = base.csd.PointToScreen(this.btnMyAccount.Position); popup.setPosition(point.X, point.Y + 0x18); popup.setCallBack(new MenuPopup.MenuCallback(this.menu1Callback)); popup.addMenuItem(SK.Text("MENU_Account_Information", "Account Information"), 0x5209); if ((!GameEngine.Instance.World.isBigpointAccount && !Program.bigpointInstall) && (!Program.aeriaInstall && !Program.bigpointPartnerInstall)) { popup.addMenuItem(SK.Text("MENU_Invite_A_Friend", "Invite a Friend"), 0x520a); } popup.addMenuItem(SK.Text("MENU_Redeem_Offer_Code", "Redeem Offer Code"), 0x520b); popup.addBar(); if (GameEngine.Instance.LocalWorldData.Alternate_Ruleset != 1) { popup.addMenuItem(SK.Text("MENU_VacationMode", "Vacation Mode Options"), 0x5211); } popup.showMenu(); }
private void lblVillageName_Click() { if (((this.villageListMenu != null) && this.villageListMenu.Visible) || InterfaceMgr.Instance.menuPopupClosedRecently()) { GameEngine.Instance.playInterfaceSound("WorldMapScreen_village_droplist_close"); InterfaceMgr.Instance.closeMenuPopup(); } else { GameEngine.Instance.playInterfaceSound("WorldMapScreen_village_droplist_open"); this.villageListMenu = new MenuPopup(); this.villageListMenu.setCallBack(new MenuPopup.MenuCallback(this.comboVillageList_SelectionChangeCommitted)); this.villageListMenu.setDoubleClickCallBack(new MenuPopup.MenuCallback(this.doubleClickedItem)); this.villageListMenu.setLineHeight(15); this.villageListMenu.closeOnClickOnly(); this.villageListMenu.mouseOverDelegates(new MenuPopup.MenuItemRolloverDelegate(this.mouseOverItem), new MenuPopup.MenuItemRolloverDelegate(this.mouseLeaveItem)); this.villageListMenu.setBackColour(Color.FromArgb(0xff, 0xba, 0xaf, 0xa3)); Point point = base.PointToScreen(this.villageButton.Position); this.villageListMenu.setPosition(point.X + 0x12, point.Y + 0x15); List <WorldMap.VillageNameItem> list = GameEngine.Instance.World.getUserVillageNamesListAndCapitals(); int num = 0; foreach (WorldMap.VillageNameItem item in list) { if (item.capital || (item.villageID < 0)) { break; } num++; } if (num >= 3) { this.villageListMenu.addMenuItem(SK.Text("Menu_Your_Villages", "Your Villages") + " (" + num.ToString() + ")", -1).Enabled = false; } else { this.villageListMenu.addMenuItem(SK.Text("Menu_Your_Villages", "Your Villages"), -1).Enabled = false; } this.villageListMenu.addBar(); bool flag = false; foreach (WorldMap.VillageNameItem item2 in list) { if (item2.villageID < 0) { this.villageListMenu.newColumn(); flag = true; } bool bold = false; if (flag && GameEngine.Instance.World.isUserVillage(item2.villageID)) { bold = true; } CustomSelfDrawPanel.CSDControl control3 = this.villageListMenu.addMenuItem(item2.villageName, item2.villageID, bold); if (item2.villageID < 0) { control3.Enabled = false; this.villageListMenu.addBar(); } } this.villageListMenu.showMenu(); MainWindow.captureCloseMenuEvent = true; } }
public static bool isAMenuVisible() { MenuPopup popup = InterfaceMgr.Instance.getMenuPopup(); return((popup != null) && popup.Visible); }