示例#1
0
 // Token: 0x06000306 RID: 774 RVA: 0x00004C59 File Offset: 0x00002E59
 public void perform(int idAction, object p)
 {
     if (idAction == 1000)
     {
         ChatTextField.gI().startChat(GameScr.gI(), mResources.chat_player);
     }
 }
 // Token: 0x06000883 RID: 2179 RVA: 0x0007C484 File Offset: 0x0007A684
 public virtual void paint(mGraphics g)
 {
     g.translate(-g.getTranslateX(), -g.getTranslateY());
     g.setClip(0, 0, GameCanvas.w, GameCanvas.h + 1);
     if (!ChatTextField.gI().isShow || !Main.isPC)
     {
         if (GameCanvas.currentDialog == null && !GameCanvas.menu.showMenu)
         {
             GameCanvas.paintz.paintCmdBar(g, this.left, this.center, this.right);
         }
     }
 }
 // Token: 0x06000881 RID: 2177 RVA: 0x0007C070 File Offset: 0x0007A270
 public virtual void updateKey()
 {
     if (GameCanvas.keyPressed[(!Main.isPC) ? 5 : 25] || mScreen.getCmdPointerLast(GameCanvas.currentScreen.center))
     {
         GameCanvas.keyPressed[(!Main.isPC) ? 5 : 25] = false;
         mScreen.keyTouch = -1;
         GameCanvas.isPointerJustRelease = false;
         if (this.center != null)
         {
             this.center.performAction();
         }
     }
     if (GameCanvas.keyPressed[12] || mScreen.getCmdPointerLast(GameCanvas.currentScreen.left))
     {
         GameCanvas.keyPressed[12]       = false;
         mScreen.keyTouch                = -1;
         GameCanvas.isPointerJustRelease = false;
         if (ChatTextField.gI().isShow)
         {
             if (ChatTextField.gI().left != null)
             {
                 ChatTextField.gI().left.performAction();
             }
         }
         else if (this.left != null)
         {
             this.left.performAction();
         }
     }
     if (GameCanvas.keyPressed[13] || mScreen.getCmdPointerLast(GameCanvas.currentScreen.right))
     {
         GameCanvas.keyPressed[13]       = false;
         mScreen.keyTouch                = -1;
         GameCanvas.isPointerJustRelease = false;
         if (ChatTextField.gI().isShow)
         {
             if (ChatTextField.gI().right != null)
             {
                 ChatTextField.gI().right.performAction();
             }
         }
         else if (this.right != null)
         {
             this.right.performAction();
         }
     }
 }
 // Token: 0x06000882 RID: 2178 RVA: 0x0007C1E8 File Offset: 0x0007A3E8
 public static bool getCmdPointerLast(Command cmd)
 {
     if (cmd == null)
     {
         return(false);
     }
     if (cmd.x >= 0 && cmd.y != 0)
     {
         return(cmd.isPointerPressInside());
     }
     if (GameCanvas.currentDialog != null)
     {
         if (GameCanvas.currentDialog.center != null && GameCanvas.isPointerHoldIn(GameCanvas.w - mScreen.cmdW >> 1, GameCanvas.h - mScreen.cmdH - 5, mScreen.cmdW, mScreen.cmdH + 10))
         {
             mScreen.keyTouch = 1;
             if (cmd == GameCanvas.currentDialog.center && GameCanvas.isPointerClick && GameCanvas.isPointerJustRelease)
             {
                 return(true);
             }
         }
         if (GameCanvas.currentDialog.left != null && GameCanvas.isPointerHoldIn(0, GameCanvas.h - mScreen.cmdH - 5, mScreen.cmdW, mScreen.cmdH + 10))
         {
             mScreen.keyTouch = 0;
             if (cmd == GameCanvas.currentDialog.left && GameCanvas.isPointerClick && GameCanvas.isPointerJustRelease)
             {
                 return(true);
             }
         }
         if (GameCanvas.currentDialog.right != null && GameCanvas.isPointerHoldIn(GameCanvas.w - mScreen.cmdW, GameCanvas.h - mScreen.cmdH - 5, mScreen.cmdW, mScreen.cmdH + 10))
         {
             mScreen.keyTouch = 2;
             if ((cmd == GameCanvas.currentDialog.right || cmd == ChatTextField.gI().right) && GameCanvas.isPointerClick && GameCanvas.isPointerJustRelease)
             {
                 return(true);
             }
         }
     }
     else
     {
         if (cmd == GameCanvas.currentScreen.left && GameCanvas.isPointerHoldIn(0, GameCanvas.h - mScreen.cmdH - 5, mScreen.cmdW, mScreen.cmdH + 10))
         {
             mScreen.keyTouch = 0;
             if (GameCanvas.isPointerClick && GameCanvas.isPointerJustRelease)
             {
                 return(true);
             }
         }
         if (cmd == GameCanvas.currentScreen.right && GameCanvas.isPointerHoldIn(GameCanvas.w - mScreen.cmdW, GameCanvas.h - mScreen.cmdH - 5, mScreen.cmdW, mScreen.cmdH + 10))
         {
             mScreen.keyTouch = 2;
             if (GameCanvas.isPointerClick && GameCanvas.isPointerJustRelease)
             {
                 return(true);
             }
         }
         if ((cmd == GameCanvas.currentScreen.center || ChatPopup.currChatPopup != null) && GameCanvas.isPointerHoldIn(GameCanvas.w - mScreen.cmdW >> 1, GameCanvas.h - mScreen.cmdH - 5, mScreen.cmdW, mScreen.cmdH + 10))
         {
             mScreen.keyTouch = 1;
             if (GameCanvas.isPointerClick && GameCanvas.isPointerJustRelease)
             {
                 return(true);
             }
         }
     }
     return(false);
 }