// Token: 0x06000732 RID: 1842 RVA: 0x00060484 File Offset: 0x0005E684 public void doCloseMenu() { Res.outz("CLOSE MENU"); this.isClose = false; this.showMenu = false; InfoDlg.hide(); if (this.close) { GameCanvas.panel.cp = null; global::Char.chatPopup = null; if (GameCanvas.panel2 != null && GameCanvas.panel2.cp != null) { GameCanvas.panel2.cp = null; } } else if (this.touch) { GameCanvas.panel.cp = null; if (GameCanvas.panel2 != null && GameCanvas.panel2.cp != null) { GameCanvas.panel2.cp = null; } if (this.menuSelectedItem >= 0) { Command command = (Command)this.menuItems.elementAt(this.menuSelectedItem); if (command != null) { SoundMn.gI().buttonClose(); command.performAction(); } } } }
// Token: 0x0600061B RID: 1563 RVA: 0x0004C340 File Offset: 0x0004A540 public void perform(int idAction, object p) { if (idAction != 8000) { if (idAction != 8001) { if (idAction != 10019) { if (idAction == 10020) { GameCanvas.endDlg(); } } else { Session_ME.gI().close(); GameCanvas.endDlg(); GameCanvas.serverScreen.switchToMe(); } } else { if (GameCanvas.loginScr.isLogin2) { GameCanvas.startYesNoDlg(mResources.note, new Command(mResources.YES, this, 10019, null), new Command(mResources.NO, this, 10020, null)); return; } if (Main.isWindowsPhone) { GameMidlet.isBackWindowsPhone = true; } Session_ME.gI().close(); GameCanvas.serverScreen.switchToMe(); } } else { if (CreateCharScr.tAddName.getText().Equals(string.Empty)) { GameCanvas.startOKDlg(mResources.char_name_blank); return; } if (CreateCharScr.tAddName.getText().Length < 5) { GameCanvas.startOKDlg(mResources.char_name_short); return; } if (CreateCharScr.tAddName.getText().Length > 15) { GameCanvas.startOKDlg(mResources.char_name_long); return; } InfoDlg.showWait(); Service.gI().createChar(CreateCharScr.tAddName.getText(), CreateCharScr.indexGender, CreateCharScr.hairID[CreateCharScr.indexGender][CreateCharScr.indexHair]); } }
// Token: 0x060006EA RID: 1770 RVA: 0x00006723 File Offset: 0x00004923 public static void update() { if (InfoDlg.delay > 0) { InfoDlg.delay--; if (InfoDlg.delay == 0) { InfoDlg.hide(); } } }
// Token: 0x06000733 RID: 1843 RVA: 0x00060568 File Offset: 0x0005E768 public void performSelect() { InfoDlg.hide(); if (this.menuSelectedItem >= 0) { Command command = (Command)this.menuItems.elementAt(this.menuSelectedItem); if (command != null) { command.performAction(); } } }
// Token: 0x0600042F RID: 1071 RVA: 0x00023A9C File Offset: 0x00021C9C public void perform(int idAction, object p) { if (idAction != 1) { if (idAction == 2) { GameScr.gI().auto = 0; if (global::Char.myCharz().isInEnterOfflinePoint() != null) { Service.gI().charMove(); InfoDlg.showWait(); Service.gI().getMapOffline(); global::Char.ischangingMap = true; return; } if (global::Char.myCharz().isInEnterOnlinePoint() != null) { Service.gI().charMove(); Service.gI().requestChangeMap(); global::Char.isLockKey = true; global::Char.ischangingMap = true; GameCanvas.clearKeyHold(); GameCanvas.clearKeyPressed(); InfoDlg.showWait(); return; } int xEnd = (int)((this.minX + this.maxX) / 2); int yEnd = (int)this.maxY; global::Char.myCharz().currentMovePoint = new MovePoint(xEnd, yEnd); global::Char.myCharz().cdir = ((global::Char.myCharz().cx - global::Char.myCharz().currentMovePoint.xEnd <= 0) ? 1 : -1); global::Char.myCharz().endMovePointCommand = new Command(null, this, 2, null); return; } } else { int xEnd2 = (int)((this.minX + this.maxX) / 2); int yEnd2 = (int)this.maxY; if (this.maxY > this.minY + 24) { yEnd2 = (int)((this.minY + this.maxY) / 2); } GameScr.gI().auto = 0; global::Char.myCharz().currentMovePoint = new MovePoint(xEnd2, yEnd2); global::Char.myCharz().cdir = ((global::Char.myCharz().cx - global::Char.myCharz().currentMovePoint.xEnd <= 0) ? 1 : -1); Service.gI().charMove(); } }
// Token: 0x06000897 RID: 2199 RVA: 0x0007D454 File Offset: 0x0007B654 public void perform(int idAction, object p) { Res.outz("perform " + idAction); if (idAction == 1000) { GameCanvas.connect(); } if (idAction == 1 || idAction == 4) { this.cancel(); } if (idAction == 2) { ServerListScreen.stopDownload = false; ServerListScreen.cmdDownload = new Command(mResources.huy, this, 4, null); ServerListScreen.cmdDownload.x = GameCanvas.w / 2 - mScreen.cmdW / 2; ServerListScreen.cmdDownload.y = GameCanvas.hh + 65; this.right = null; if (!GameCanvas.isTouch) { ServerListScreen.cmdDownload.x = GameCanvas.w / 2 - mScreen.cmdW / 2; ServerListScreen.cmdDownload.y = GameCanvas.h - mScreen.cmdH - 1; } this.center = new Command(string.Empty, this, 4, null); if (!ServerListScreen.isGetData) { Service.gI().getResource(1, null); if (!GameCanvas.isTouch) { ServerListScreen.cmdDownload.isFocus = true; this.center = new Command(string.Empty, this, 4, null); } ServerListScreen.isGetData = true; } } if (idAction == 3) { Res.outz("toi day"); if (GameCanvas.loginScr == null) { GameCanvas.loginScr = new LoginScr(); } GameCanvas.loginScr.switchToMe(); bool flag = Rms.loadRMSString("acc") != null && !Rms.loadRMSString("acc").Equals(string.Empty); bool flag2 = Rms.loadRMSString("userAo" + ServerListScreen.ipSelect) != null && !Rms.loadRMSString("userAo" + ServerListScreen.ipSelect).Equals(string.Empty); if (!flag && !flag2) { GameCanvas.connect(); string text = Rms.loadRMSString("userAo" + ServerListScreen.ipSelect); if (text == null || text.Equals(string.Empty)) { Service.gI().login2(string.Empty); } else { GameCanvas.loginScr.isLogin2 = true; GameCanvas.connect(); Service.gI().setClientType(); Service.gI().login(text, string.Empty, GameMidlet.VERSION, 1); } if (Session_ME.connected) { GameCanvas.startWaitDlg(); } else { GameCanvas.startOKDlg(mResources.maychutathoacmatsong); } } else { GameCanvas.loginScr.doLogin(); } LoginScr.serverName = ServerListScreen.nameServer[ServerListScreen.ipSelect]; } if (idAction == 10100) { if (GameCanvas.loginScr == null) { GameCanvas.loginScr = new LoginScr(); } GameCanvas.loginScr.switchToMe(); GameCanvas.connect(); Service.gI().login2(string.Empty); Res.outz("tao user ao"); GameCanvas.startWaitDlg(); LoginScr.serverName = ServerListScreen.nameServer[ServerListScreen.ipSelect]; } if (idAction == 5) { ServerListScreen.doUpdateServer(); if (ServerListScreen.nameServer.Length == 1) { return; } MyVector myVector = new MyVector(string.Empty); for (int i = 0; i < ServerListScreen.nameServer.Length; i++) { myVector.addElement(new Command(ServerListScreen.nameServer[i], this, 6, null)); } GameCanvas.menu.startAt(myVector, 0); if (!GameCanvas.isTouch) { GameCanvas.menu.menuSelectedItem = ServerListScreen.ipSelect; } } if (idAction == 6) { ServerListScreen.ipSelect = GameCanvas.menu.menuSelectedItem; this.selectServer(); } if (idAction == 7) { if (GameCanvas.loginScr == null) { GameCanvas.loginScr = new LoginScr(); } GameCanvas.loginScr.switchToMe(); } if (idAction == 8) { bool flag3 = Rms.loadRMSInt("lowGraphic") == 1; MyVector myVector2 = new MyVector("cau hinh"); myVector2.addElement(new Command(mResources.cauhinhthap, this, 9, null)); myVector2.addElement(new Command(mResources.cauhinhcao, this, 10, null)); GameCanvas.menu.startAt(myVector2, 0); if (flag3) { GameCanvas.menu.menuSelectedItem = 0; } else { GameCanvas.menu.menuSelectedItem = 1; } } if (idAction == 9) { Rms.saveRMSInt("lowGraphic", 1); GameCanvas.startOK(mResources.plsRestartGame, 8885, null); } if (idAction == 10) { Rms.saveRMSInt("lowGraphic", 0); GameCanvas.startOK(mResources.plsRestartGame, 8885, null); } if (idAction == 11) { if (GameCanvas.loginScr == null) { GameCanvas.loginScr = new LoginScr(); } GameCanvas.loginScr.switchToMe(); string text2 = Rms.loadRMSString("userAo" + ServerListScreen.ipSelect); if (text2 == null || text2.Equals(string.Empty)) { Service.gI().login2(string.Empty); } else { GameCanvas.loginScr.isLogin2 = true; GameCanvas.connect(); Service.gI().setClientType(); Service.gI().login(text2, string.Empty, GameMidlet.VERSION, 1); } GameCanvas.startWaitDlg(mResources.PLEASEWAIT); Res.outz("tao user ao"); } if (idAction == 12) { GameMidlet.instance.exit(); } if (idAction == 13 && (!ServerListScreen.isGetData || ServerListScreen.loadScreen)) { switch (mSystem.clientType) { case 1: mSystem.callHotlineJava(); break; case 3: case 5: mSystem.callHotlineIphone(); break; case 4: mSystem.callHotlinePC(); break; case 6: mSystem.callHotlineWindowsPhone(); break; } } if (idAction == 14) { Command cmdYes = new Command(mResources.YES, GameCanvas.serverScreen, 15, null); Command cmdNo = new Command(mResources.NO, GameCanvas.serverScreen, 16, null); GameCanvas.startYesNoDlg(mResources.deletaDataNote, cmdYes, cmdNo); } if (idAction == 15) { Rms.clearAll(); GameCanvas.startOK(mResources.plsRestartGame, 8885, null); } if (idAction == 16) { InfoDlg.hide(); GameCanvas.currentDialog = null; } }
// Token: 0x060006E8 RID: 1768 RVA: 0x0000670F File Offset: 0x0000490F public static void showWait(string str) { InfoDlg.show(str, null, 700); InfoDlg.isLock = true; }
// Token: 0x060006E7 RID: 1767 RVA: 0x000066F7 File Offset: 0x000048F7 public static void showWait() { InfoDlg.show(mResources.PLEASEWAIT, null, 1000); InfoDlg.isLock = true; }
// 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; } }