// Token: 0x0600072D RID: 1837 RVA: 0x0005F750 File Offset: 0x0005D950 public void startAt(MyVector menuItems, int pos) { if (this.showMenu) { return; } this.isClose = false; this.touch = false; this.close = false; this.tDelay = 0; if (menuItems.size() == 1) { this.menuSelectedItem = 0; Command command = (Command)menuItems.elementAt(0); if (command != null && command.caption.Equals(mResources.saying)) { command.performAction(); this.showMenu = false; InfoDlg.showWait(); return; } } SoundMn.gI().openMenu(); this.isNotClose = new bool[menuItems.size()]; for (int i = 0; i < this.isNotClose.Length; i++) { this.isNotClose[i] = false; } this.disableClose = false; ChatPopup.currChatPopup = null; Effect2.vEffect2.removeAllElements(); Effect2.vEffect2Outside.removeAllElements(); InfoDlg.hide(); if (menuItems.size() == 0) { return; } this.menuItems = menuItems; this.menuW = 60; this.menuH = 60; for (int j = 0; j < menuItems.size(); j++) { Command command2 = (Command)menuItems.elementAt(j); command2.isPlaySoundButton = false; int width = mFont.tahoma_7_yellow.getWidth(command2.caption); command2.subCaption = mFont.tahoma_7_yellow.splitFontArray(command2.caption, this.menuW - 10); Res.outz("c caption= " + command2.caption); } Menu.menuTemY = new int[menuItems.size()]; this.menuX = (GameCanvas.w - menuItems.size() * this.menuW) / 2; if (this.menuX < 1) { this.menuX = 1; } this.menuY = GameCanvas.h - this.menuH - (Paint.hTab + 1) - 1; if (GameCanvas.isTouch) { this.menuY -= 3; } this.menuY += 27; for (int k = 0; k < Menu.menuTemY.Length; k++) { Menu.menuTemY[k] = GameCanvas.h; } this.showMenu = true; this.menuSelectedItem = 0; Menu.cmxLim = this.menuItems.size() * this.menuW - GameCanvas.w; if (Menu.cmxLim < 0) { Menu.cmxLim = 0; } Menu.cmtoX = 0; Menu.cmx = 0; Menu.xc = 50; this.w = menuItems.size() * this.menuW - 1; if (this.w > GameCanvas.w - 2) { this.w = GameCanvas.w - 2; } if (GameCanvas.isTouch && !Main.isPC) { this.menuSelectedItem = -1; } }