Example #1
0
    // Token: 0x0600088A RID: 2186 RVA: 0x0007CAE8 File Offset: 0x0007ACE8
    public override void paint(mGraphics g)
    {
        if (!ServerListScreen.loadScreen)
        {
            g.setColor(0);
            g.fillRect(0, 0, GameCanvas.w, GameCanvas.h);
            if (!ServerListScreen.bigOk)
            {
            }
        }
        else
        {
            GameCanvas.paintBGGameScr(g);
        }
        int num = 2;

        mFont.tahoma_7_white.drawString(g, "v" + GameMidlet.VERSION, GameCanvas.w - 2, num + 15, 1, mFont.tahoma_7_grey);
        if (!ServerListScreen.isGetData || ServerListScreen.loadScreen)
        {
            if (mSystem.clientType == 1 && !GameCanvas.isTouch)
            {
                mFont.tahoma_7_white.drawString(g, ServerListScreen.linkweb, GameCanvas.w - 2, GameCanvas.h - 15, 1, mFont.tahoma_7_grey);
            }
            else
            {
                mFont.tahoma_7_white.drawString(g, ServerListScreen.linkweb, GameCanvas.w - 2, num, 1, mFont.tahoma_7_grey);
            }
        }
        else
        {
            mFont.tahoma_7_white.drawString(g, ServerListScreen.linkweb, GameCanvas.w - 2, num, 1, mFont.tahoma_7_grey);
        }
        int w = GameCanvas.w;

        if (ServerListScreen.cmdDeleteRMS != null)
        {
            mFont.tahoma_7_white.drawString(g, mResources.xoadulieu, GameCanvas.w - 2, GameCanvas.h - 15, 1, mFont.tahoma_7_grey);
        }
        if (GameCanvas.currentDialog == null)
        {
            if (!ServerListScreen.loadScreen)
            {
                if (!ServerListScreen.bigOk)
                {
                    g.drawImage(LoginScr.imgTitle, GameCanvas.hw, GameCanvas.hh - 32, 3);
                    if (!ServerListScreen.isGetData)
                    {
                        mFont.tahoma_7b_white.drawString(g, mResources.taidulieudechoi, GameCanvas.hw, GameCanvas.hh + 24, 2);
                        if (ServerListScreen.cmdDownload != null)
                        {
                            ServerListScreen.cmdDownload.paint(g);
                        }
                    }
                    else
                    {
                        if (ServerListScreen.cmdDownload != null)
                        {
                            ServerListScreen.cmdDownload.paint(g);
                        }
                        mFont.tahoma_7b_white.drawString(g, mResources.downloading_data + ServerListScreen.percent + "%", GameCanvas.w / 2, GameCanvas.hh + 24, 2);
                        GameScr.paintOngMauPercent(GameScr.frBarPow20, GameScr.frBarPow21, GameScr.frBarPow22, (float)(GameCanvas.w / 2 - 50), (float)(GameCanvas.hh + 45), 100, 100f, g);
                        GameScr.paintOngMauPercent(GameScr.frBarPow0, GameScr.frBarPow1, GameScr.frBarPow2, (float)(GameCanvas.w / 2 - 50), (float)(GameCanvas.hh + 45), 100, (float)ServerListScreen.percent, g);
                    }
                }
            }
            else
            {
                int num2 = GameCanvas.hh - 15 * this.cmd.Length - 15;
                if (num2 < 25)
                {
                    num2 = 25;
                }
                if (LoginScr.imgTitle != null)
                {
                    g.drawImage(LoginScr.imgTitle, GameCanvas.hw, num2, 3);
                }
                for (int i = 0; i < this.cmd.Length; i++)
                {
                    this.cmd[i].paint(g);
                }
                g.setClip(0, 0, GameCanvas.w, GameCanvas.h);
                if (ServerListScreen.testConnect == -1)
                {
                    if (GameCanvas.gameTick % 20 > 10)
                    {
                        g.drawRegion(GameScr.imgRoomStat, 0, 14, 7, 7, 0, (GameCanvas.w - mFont.tahoma_7b_dark.getWidth(this.cmd[2 + this.nCmdPlay].caption) >> 1) - 10, this.cmd[2 + this.nCmdPlay].y + 10, 0);
                    }
                }
                else
                {
                    g.drawRegion(GameScr.imgRoomStat, 0, ServerListScreen.testConnect * 7, 7, 7, 0, (GameCanvas.w - mFont.tahoma_7b_dark.getWidth(this.cmd[2 + this.nCmdPlay].caption) >> 1) - 10, this.cmd[2 + this.nCmdPlay].y + 9, 0);
                }
            }
        }
        base.paint(g);
    }