Example #1
0
    public void OnResize()
    {
        int num  = (int)GUI2.YRES(50f);
        int num2 = (int)GUI2.YRES(1f);
        int num3 = (int)GUI2.YRES(8f);
        int num4 = num3 + (int)GUI2.YRES(2f);
        int num5 = (int)GUI2.YRES(8f);

        for (int i = 0; i < 16; i++)
        {
            float num6 = (float)Screen.width / 2f - (float)(num + num4 * 16);
            this.rDotRed[15 - i]     = new Rect(num6 + (float)(num4 * i), (float)num5, (float)num3, (float)num3);
            this.rDotRedBack[15 - i] = new Rect(num6 + (float)(num4 * i) - (float)num2, (float)(num5 - num2), (float)num3, (float)num3);
        }
        for (int j = 0; j < 16; j++)
        {
            float num7 = (float)Screen.width / 2f + (float)num + (float)((int)GUI2.YRES(3f));
            this.rDotBlue[j]     = new Rect(num7 + (float)(num4 * j), (float)num5, (float)num3, (float)num3);
            this.rDotBlueBack[j] = new Rect(num7 + (float)(num4 * j) - (float)num2, (float)(num5 - num2), (float)num3, (float)num3);
        }
        this.rTeam[0]  = new Rect((float)Screen.width / 2f - GUI2.YRES(50f), (float)num2, GUI2.YRES(32f), GUI2.YRES(22f));
        this.rTeam[1]  = new Rect((float)Screen.width / 2f + GUI2.YRES(18f), (float)num2, GUI2.YRES(32f), GUI2.YRES(22f));
        this.rScore    = new Rect((float)Screen.width / 2f - GUI2.YRES(36f) / 2f, (float)num2, GUI2.YRES(36f), GUI2.YRES(22f));
        this.rBombIcon = new Rect((float)Screen.width / 2f - GUI2.YRES(32f) / 2f, (float)num2 + GUI2.YRES(4f), GUI2.YRES(32f), GUI2.YRES(16f));
    }
Example #2
0
    private static void DrawPlayerData(float x, float y, int id)
    {
        float height = GUI2.YRES(20f);

        if (ScoreBoard.gamemode == 3)
        {
            height = GUI2.YRES(15f);
        }
        if (id == Client.ID)
        {
            GUI.color = new Color(1f, 1f, 1f, 0.25f);
            GUI.DrawTexture(new Rect(x, y, GUI2.YRES(240f), height), ScoreBoard.tWhite);
            GUI.color = Color.white;
        }
        _Color fontcolor = _Color.White;

        if (PlayerControll.Player[id].DeadFlag != 0)
        {
            fontcolor = _Color.Gray;
        }
        GUI2.DrawTextRes(new Rect(x, y, GUI2.YRES(16f), height), PlayerControll.Player[id].sLevel, TextAnchor.MiddleCenter, _Color.Yellow, 0, 10, true);
        GUI2.DrawTextRes(new Rect(x + GUI2.YRES(18f), y, GUI2.YRES(70f), height), PlayerControll.Player[id].Name, TextAnchor.MiddleLeft, fontcolor, 0, 9, true);
        if (!PlayerControll.Player[id].bomb || BasePlayer.team == 0)
        {
        }
        GUI2.DrawTextRes(new Rect(x + GUI2.YRES(85f), y, GUI2.YRES(100f), height), PlayerControll.Player[id].ClanName, TextAnchor.MiddleLeft, _Color.Yellow, 0, 8, true);
        GUI2.DrawTextRes(new Rect(x + GUI2.YRES(92f), y, GUI2.YRES(100f), height), PlayerControll.Player[id].sFrags, TextAnchor.MiddleCenter, fontcolor, 0, 10, true);
        GUI2.DrawTextRes(new Rect(x + GUI2.YRES(126f), y, GUI2.YRES(100f), height), PlayerControll.Player[id].sDeaths, TextAnchor.MiddleCenter, fontcolor, 0, 10, true);
        GUI2.DrawTextRes(new Rect(x + GUI2.YRES(160f), y, GUI2.YRES(100f), height), PlayerControll.Player[id].sPoints, TextAnchor.MiddleCenter, fontcolor, 0, 10, true);
    }
Example #3
0
 public void OnResize()
 {
     this.rLoadingBackgr = new Rect((float)Screen.width / 2f - GUI2.YRES(324f) / 2f, (float)Screen.height / 2f - GUI2.YRES(106f) / 2f, GUI2.YRES(324f), GUI2.YRES(106f));
     this.rLoadingCooler = new Rect((float)Screen.width / 2f + GUI2.YRES(77f), (float)Screen.height / 2f - GUI2.YRES(20.5f), GUI2.YRES(40f), GUI2.YRES(40f));
     this.rLoadingProgr  = new Rect((float)Screen.width / 2f - GUI2.YRES(118f), (float)Screen.height / 2f + GUI2.YRES(4f), GUI2.YRES(200f), GUI2.YRES(18f));
     this.rLoadingText   = new Rect((float)Screen.width / 2f - GUI2.YRES(58f), (float)Screen.height / 2f - GUI2.YRES(22f), GUI2.YRES(100f), GUI2.YRES(20f));
 }
Example #4
0
    private static void DrawMoney()
    {
        if (!Award.showmoney)
        {
            return;
        }
        if (Time.time > Award.moneytime)
        {
            Award.showmoney = false;
            HUD.SetMoneyInc(Award.money);
            return;
        }
        float num      = 2f - (Award.moneytime - Time.time);
        float num2     = 0f;
        int   fontsize = 16;

        if (num < 0.1f)
        {
            fontsize = 21 - (int)(num / 0.02f);
        }
        else if (num > 1.9f)
        {
            num2 = GUI2.YRES((num - 1.9f) * 8f * 10f);
        }
        GUI2.DrawTextColorRes(new Rect(Award.rMoney.x, Award.rMoney.y + num2, Award.rMoney.width, Award.rMoney.height), Award.sMoney, TextAnchor.MiddleCenter, _Color.Green, 0, fontsize, true);
    }
Example #5
0
    public static void Draw()
    {
        if (!ScoreBoard.show && !ScoreBoard.showforce)
        {
            return;
        }
        ScoreBoard.DrawTeam(0);
        ScoreBoard.DrawTeam(1);
        ScoreBoard.DrawMapData();
        if (ScoreBoard.gamemode > 0)
        {
            ScoreBoard.DrawRoundData();
        }
        int num = 0;

        GUI.color = ScoreBoard.ca;
        for (int i = 0; i < 16; i++)
        {
            if (PlayerControll.Player[i] != null)
            {
                if (PlayerControll.Player[i].Team == 255)
                {
                    GUI2.DrawTextRes(new Rect(GUI2.YRES(8f), GUI2.YRES(380f) + (float)num * GUI2.YRES(15f), GUI2.YRES(200f), GUI2.YRES(14f)), PlayerControll.Player[i].Name, TextAnchor.LowerLeft, _Color.White, 0, 14, true);
                    num++;
                }
            }
        }
        if (num > 0)
        {
            GUI2.DrawTextRes(new Rect(GUI2.YRES(8f), GUI2.YRES(380f) - GUI2.YRES(15f), GUI2.YRES(200f), GUI2.YRES(14f)), Lang.Get("_SPECTATORS") + ":", TextAnchor.LowerLeft, _Color.White, 0, 14, true);
        }
        ScoreBoard.DrawPlayerReward();
        GUI.color = Color.white;
    }
Example #6
0
 public void OnResize()
 {
     this.rHealthBack    = new Rect(0f, (float)Screen.height - GUI2.YRES(32f), GUI2.YRES(160f), GUI2.YRES(32f));
     this.rAmmoBack      = new Rect((float)Screen.width - GUI2.YRES(96f), this.rHealthBack.y, GUI2.YRES(96f), GUI2.YRES(32f));
     this.rGrenBack      = new Rect((float)Screen.width - GUI2.YRES(80f), this.rHealthBack.y - GUI2.YRES(22f), GUI2.YRES(80f), GUI2.YRES(20f));
     this.rMoneyBack     = new Rect(0f, this.rHealthBack.y - GUI2.YRES(22f), GUI2.YRES(40f), GUI2.YRES(20f));
     this.rBombBack      = new Rect((float)Screen.width - GUI2.YRES(58f), (float)Screen.height - GUI2.YRES(82f), GUI2.YRES(58f), GUI2.YRES(25f));
     this.rDefuseKitBack = new Rect((float)Screen.width - GUI2.YRES(44f), (float)Screen.height - GUI2.YRES(88f), GUI2.YRES(44f), GUI2.YRES(30f));
     this.rHealthIcon    = new Rect(GUI2.YRES(4f), (float)Screen.height - GUI2.YRES(28f), GUI2.YRES(24f), GUI2.YRES(24f));
     this.rHealthNumber  = new Rect(GUI2.YRES(32f), this.rHealthBack.y, GUI2.YRES(128f), GUI2.YRES(32f));
     this.rArmorIcon     = new Rect(GUI2.YRES(80f) + GUI2.YRES(4f), (float)Screen.height - GUI2.YRES(28f), GUI2.YRES(24f), GUI2.YRES(24f));
     this.rArmorNumber   = new Rect(GUI2.YRES(80f) + GUI2.YRES(32f), this.rHealthBack.y, GUI2.YRES(128f), GUI2.YRES(32f));
     if (ScoreBoard.gamemode == 3 && BasePlayer.team == 0)
     {
         this.rArmorIcon   = new Rect(GUI2.YRES(106f) + GUI2.YRES(4f), (float)Screen.height - GUI2.YRES(28f), GUI2.YRES(24f), GUI2.YRES(24f));
         this.rArmorNumber = new Rect(GUI2.YRES(106f) + GUI2.YRES(32f), this.rHealthBack.y, GUI2.YRES(128f), GUI2.YRES(32f));
     }
     this.rFGIcon         = new Rect((float)Screen.width - GUI2.YRES(58f), (float)Screen.height - GUI2.YRES(52f), GUI2.YRES(16f), GUI2.YRES(16f));
     this.rGrenNumber     = new Rect((float)Screen.width - GUI2.YRES(18f) - GUI2.YRES(18f), (float)Screen.height - GUI2.YRES(52f), GUI2.YRES(16f), GUI2.YRES(16f));
     this.rFBIcon         = new Rect((float)Screen.width - GUI2.YRES(38f), (float)Screen.height - GUI2.YRES(52f), GUI2.YRES(16f), GUI2.YRES(16f));
     this.rSGIcon         = new Rect((float)Screen.width - GUI2.YRES(18f), (float)Screen.height - GUI2.YRES(52f), GUI2.YRES(16f), GUI2.YRES(16f));
     this.rBombIcon       = new Rect((float)Screen.width - GUI2.YRES(50f), (float)Screen.height - GUI2.YRES(82f), GUI2.YRES(48f), GUI2.YRES(24f));
     this.rDiffuseIcon    = new Rect((float)Screen.width - GUI2.YRES(34f), (float)Screen.height - GUI2.YRES(88f), GUI2.YRES(30f), GUI2.YRES(30f));
     this.rDiffuseBack    = new Rect((float)Screen.width / 2f - GUI2.YRES(150f), GUI2.YRES(180f), GUI2.YRES(300f), GUI2.YRES(10f));
     this.rDiffuseLine    = new Rect((float)Screen.width / 2f - GUI2.YRES(148f), GUI2.YRES(182f), GUI2.YRES(296f), GUI2.YRES(6f));
     this.rAmmoIcon       = new Rect((float)Screen.width - GUI2.YRES(32f), (float)Screen.height - GUI2.YRES(16f), GUI2.YRES(28f), GUI2.YRES(14f));
     this.rAmmoNumber     = new Rect((float)Screen.width - GUI2.YRES(100f), (float)Screen.height - GUI2.YRES(32f), GUI2.YRES(64f), GUI2.YRES(32f));
     this.rAmmoNumber2    = new Rect((float)Screen.width - GUI2.YRES(32f), (float)Screen.height - GUI2.YRES(32f), GUI2.YRES(28f), GUI2.YRES(16f));
     this.rMoneyIcon      = new Rect(GUI2.YRES(4f), (float)Screen.height - GUI2.YRES(52f), GUI2.YRES(16f), GUI2.YRES(16f));
     this.rMoneyNumber    = new Rect(GUI2.YRES(4f) + GUI2.YRES(22f), (float)Screen.height - GUI2.YRES(52f), GUI2.YRES(64f), GUI2.YRES(16f));
     this.rRespawnBack    = new Rect((float)Screen.width / 2f - GUI2.YRES(90f), (float)Screen.height - GUI2.YRES(80f), GUI2.YRES(180f), GUI2.YRES(20f));
     this.rRespawnSeconds = new Rect((float)Screen.width / 2f - GUI2.YRES(90f), (float)Screen.height - GUI2.YRES(80f), GUI2.YRES(32f), GUI2.YRES(20f));
     this.rRespawnBar     = new Rect((float)Screen.width / 2f - GUI2.YRES(90f) + GUI2.YRES(32f) + GUI2.YRES(4f), (float)Screen.height - GUI2.YRES(80f) + GUI2.YRES(4f), GUI2.YRES(140f), GUI2.YRES(12f));
 }
Example #7
0
    private void DrawTVBars()
    {
        int num  = (int)GUI2.YRES(26f);
        int num2 = (int)GUI2.YRES(1f);
        int num3 = 0;
        int num4 = 0;

        for (int i = 0; i < 16; i++)
        {
            if (PlayerControll.Player[i] != null)
            {
                if (PlayerControll.Player[i].Team == 0)
                {
                    int health = 100;
                    if (PlayerControll.Player[i].DeadFlag == 1)
                    {
                        health = 0;
                    }
                    this.DrawBarPlayer(new Rect(0f, GUI2.YRES(180f) + (float)((num + num2) * num3), GUI2.YRES(160f), (float)num), i, PlayerControll.Player[i].Name, PlayerControll.Player[i].currweapon, health, 0);
                    num3++;
                }
                else if (PlayerControll.Player[i].Team == 1)
                {
                    int health2 = 100;
                    if (PlayerControll.Player[i].DeadFlag == 1)
                    {
                        health2 = 0;
                    }
                    this.DrawBarPlayer(new Rect((float)Screen.width - GUI2.YRES(160f), GUI2.YRES(180f) + (float)((num + num2) * num4), GUI2.YRES(160f), (float)num), i, PlayerControll.Player[i].Name, PlayerControll.Player[i].currweapon, health2, 1);
                    num4++;
                }
            }
        }
    }
Example #8
0
    private void DrawMenu()
    {
        BuyMenu.menuLevel = 0;
        Rect position = new Rect(0f, 0f, (float)Screen.width, (float)Screen.height);

        GUI.DrawTexture(position, this.tLoad);
        GUI.DrawTexture(new Rect(0f, GUI2.YRES(80f), GUI2.YRES(200f), GUI2.YRES(20f)), this.tGradient);
        GUI2.DrawTextRes(new Rect(GUI2.YRES(60f), GUI2.YRES(80f), GUI2.YRES(200f), GUI2.YRES(26f)), Lang.Get("_ACTIVE_WEAPONS"), TextAnchor.MiddleLeft, _Color.White, 1, 14, true);
        BuyMenu.buySlotWeapon[0] = 4;
        BuyMenu.buySlotWeapon[1] = 17;
        BuyMenu.buySlotWeapon[2] = 27;
        BuyMenu.buySlotWeapon[3] = 120;
        BuyMenu.buySlotWeapon[4] = 121;
        this.DrawItem(this.rActiveSlots[0], BuyMenu.buySlotWeapon[0], 0);
        this.DrawItem(this.rActiveSlots[1], BuyMenu.buySlotWeapon[1], 1);
        this.DrawItem(this.rActiveSlots[2], BuyMenu.buySlotWeapon[2], 2);
        this.DrawItem(this.rActiveSlots[3], BuyMenu.buySlotWeapon[3], 3);
        this.DrawItem(this.rActiveSlots[4], BuyMenu.buySlotWeapon[4], 4);
        GUI.DrawTexture(new Rect(0f, GUI2.YRES(64f) + GUI2.YRES(138f), GUI2.YRES(200f), GUI2.YRES(20f)), this.tGradient);
        GUI2.DrawTextRes(new Rect(GUI2.YRES(60f), GUI2.YRES(64f) + GUI2.YRES(138f), GUI2.YRES(200f), GUI2.YRES(26f)), Lang.Get("_WEAPON_BUY"), TextAnchor.MiddleLeft, _Color.White, 1, 14, true);
        this.DrawMenuSlot(1, this.rMainMenu[0], this.sCategoryName[1]);
        this.DrawMenuSlot(2, this.rMainMenu[1], this.sCategoryName[2]);
        this.DrawMenuSlot(3, this.rMainMenu[2], this.sCategoryName[3]);
        this.DrawMenuSlot(4, this.rMainMenu[3], this.sCategoryName[4]);
        this.DrawMenuSlot(5, this.rMainMenu[4], this.sCategoryName[5]);
        this.DrawMenuSlot(6, this.rMainMenu[5], this.sCategoryName[6]);
        this.DrawMenuSlot(7, this.rMainMenu[6], this.sCategoryName[7]);
    }
Example #9
0
    private static void DrawPlayerReward()
    {
        if (!ScoreBoard.showforce)
        {
            return;
        }
        GUI.DrawTexture(ScoreBoard.rBonusHeader, ScoreBoard.tGray0);
        GUI.color = new Color(1f, 1f, 1f, 0.75f);
        GUI.DrawTexture(ScoreBoard.rBonusBody, ScoreBoard.tGray1);
        GUI.color = Color.white;
        GUI2.DrawTextRes(ScoreBoard.rBonusHeader, Lang.Get("_YOU_REWARDS"), TextAnchor.MiddleCenter, _Color.White, 0, 12, true);
        GUI2.DrawTextRes(new Rect(ScoreBoard.rBonusBody.x + GUI2.YRES(140f), ScoreBoard.rBonusBody.y, GUI2.YRES(40f), GUI2.YRES(64f)), ScoreBoard.winexp.ToString(), TextAnchor.MiddleCenter, _Color.White, 0, 20, true);
        GUI.color = Color.black;
        GUI.DrawTexture(new Rect(ScoreBoard.rBonusBody.x + GUI2.YRES(180f) + 1f, ScoreBoard.rBonusBody.y + GUI2.YRES(16f) + 1f, GUI2.YRES(32f), GUI2.YRES(32f)), ScoreBoard.tExp);
        GUI.color = Color.white;
        GUI.DrawTexture(new Rect(ScoreBoard.rBonusBody.x + GUI2.YRES(180f), ScoreBoard.rBonusBody.y + GUI2.YRES(16f), GUI2.YRES(32f), GUI2.YRES(32f)), ScoreBoard.tExp);
        GUI.DrawTexture(ScoreBoard.rWinnerHeader, ScoreBoard.tGray0);
        GUI.color = new Color(1f, 1f, 1f, 0.75f);
        GUI.DrawTexture(ScoreBoard.rWinnerBody, ScoreBoard.tGray1);
        GUI.color = Color.white;
        GUI2.DrawTextRes(ScoreBoard.rWinnerHeader, Lang.Get("_WINNER"), TextAnchor.MiddleCenter, _Color.White, 0, 12, true);
        _Color fontcolor = _Color.Red;

        if (ScoreBoard.winteam == 1)
        {
            fontcolor = _Color.Blue;
        }
        GUI2.DrawTextRes(ScoreBoard.rWinnerBody, ScoreBoard.teamname[ScoreBoard.winteam], TextAnchor.MiddleCenter, fontcolor, 0, 18, true);
    }
Example #10
0
 void OnGUI()
 {
     GUI2.ScaleGUI();
     if (GUI2.Button(jugar, "Empezar nueva partida")) //cambiar para borrar datos guardados
     //o asignarle unos valores iniciales que ya se modificaran la proxima vez que guardemos
     {
         PlayerPrefs.SetInt("experiencia", 1);
         PlayerPrefs.SetFloat("vida", 100);
         PlayerPrefs.SetInt("escenario", 1);
         PlayerPrefs.SetInt("comprobacion", 1);
         //Application.LoadLevel(PlayerPrefs.GetInt("escenario"));
         SceneManager.LoadScene(PlayerPrefs.GetInt("escenario"));
     }
     if (GUI2.Button(cargarPartida, "Cargar Partida")) //aqui podrias ampliar la condicion para que si no se cumple...
     {                                                 //entonces no deja clickear
         if (PlayerPrefs.GetInt("comprobacion") == 1)
         {
             //Application.LoadLevel(PlayerPrefs.GetInt("escenario"));
             SceneManager.LoadScene(PlayerPrefs.GetInt("escenario"));
         }
     }
     if (GUI2.Button(salir, "Salir"))
     {
         Application.Quit();
         //SceneManager.
     }
     GUI2.ResetGUI();
 }
Example #11
0
    private void DrawPlayerRadar(Vector3 p, bool b)
    {
        Vector3 b2   = this.LocalPlayer.transform.position - p;
        float   num  = 48f;
        float   num2 = 1f;
        float   num3 = Vector3.Distance(Vector3.zero, b2);

        if (num3 > num)
        {
            Vector3 vector = b2.normalized * num;
            if (b)
            {
                GUI.DrawTexture(new Rect(this.rRadar.center.x + GUI2.YRES(-vector.x) * num2 - GUI2.YRES(6f), this.rRadar.center.y + GUI2.YRES(vector.z) * num2 - GUI2.YRES(3f), GUI2.YRES(12f), GUI2.YRES(6f)), this.tBombIcon);
            }
            else
            {
                GUI.DrawTexture(new Rect(this.rRadar.center.x + GUI2.YRES(-vector.x) * num2 - GUI2.YRES(1f), this.rRadar.center.y + GUI2.YRES(vector.z) * num2 - GUI2.YRES(1f), GUI2.YRES(2f), GUI2.YRES(2f)), this.tYellow);
            }
        }
        else if (b)
        {
            GUI.DrawTexture(new Rect(this.rRadar.center.x + GUI2.YRES(-b2.x) * num2 - GUI2.YRES(6f), this.rRadar.center.y + GUI2.YRES(b2.z) * num2 - GUI2.YRES(3f), GUI2.YRES(12f), GUI2.YRES(6f)), this.tBombIcon);
        }
        else
        {
            GUI.DrawTexture(new Rect(this.rRadar.center.x + GUI2.YRES(-b2.x) * num2 - GUI2.YRES(1f), this.rRadar.center.y + GUI2.YRES(b2.z) * num2 - GUI2.YRES(1f), GUI2.YRES(2f), GUI2.YRES(2f)), this.tWhite);
        }
    }
Example #12
0
    private static void DrawMessage()
    {
        if (Message.currmessage < 0)
        {
            return;
        }
        Rect rect = new Rect(0f, (float)Screen.height - GUI2.YRES(124f), (float)Screen.width, GUI2.YRES(20f));

        GUI.color = new Color(1f, 1f, 1f, 0.75f);
        GUI.DrawTexture(rect, Message.tBlack);
        GUI.color = Color.white;
        string text = Message.sMessage[Message.currmessage];

        if (ScoreBoard.gamemode == 3)
        {
            if (Message.currmessage == 2)
            {
                text = Lang.Get("_ZOMBIE_WIN");
            }
            if (Message.currmessage == 3)
            {
                text = Lang.Get("_PEOPLE_WIN");
            }
        }
        GUI2.DrawTextRes(rect, text, TextAnchor.MiddleCenter, _Color.White, 0, 12, true);
    }
Example #13
0
 void OnGUI()
 {
     GUI2.ScaleGUI();
     if (GUI2.Button(rectangulo, "Cambio de camara"))
     {
         if (camara1.enabled == true)
         {
             //cuando le damos al boton, se desactiva la camara y
             //el script/characterController para que no se muevan
             //los dos personajes a la vez
             camara1.enabled  = false;
             camara2.enabled  = true;
             control1.enabled = false;
             control2.enabled = true;
             script.enabled   = true;
         }
         else
         {
             camara1.enabled  = true;
             camara2.enabled  = false;
             control1.enabled = true;
             control2.enabled = false;
             script.enabled   = false;
         }
     }
     GUI2.ResetGUI();
 }
Example #14
0
    private static void DrawMapData()
    {
        Rect position = new Rect(ScoreBoard.rTeamBack[0].x, ScoreBoard.rTeamBack[0].y + ScoreBoard.rTeamBack[0].height + GUI2.YRES(4f), GUI2.YRES(240f) * 2f + GUI2.YRES(4f) * 2f, GUI2.YRES(20f));

        GUI.DrawTexture(position, ScoreBoard.tGray0);
        GUI2.DrawTextRes(new Rect(position.x + GUI2.YRES(4f), position.y, position.width, position.height), ScoreBoard.sMap, TextAnchor.MiddleLeft, _Color.Gray, 0, 12, true);
        GUI2.DrawTextRes(new Rect(position.x, position.y, position.width - GUI2.YRES(4f), position.height), ScoreBoard.sGameMode, TextAnchor.MiddleRight, _Color.Gray, 0, 12, true);
    }
Example #15
0
    private void OnResize()
    {
        Vector2 vector = new Vector2((float)Screen.width, (float)Screen.height) / 2f;
        int     num    = (int)GUI2.YRES(32f);

        this.rCrosshaitHit = new Rect(vector.x - (float)num / 2f, vector.y - (float)num / 2f, (float)num, (float)num);
        Crosshair.CalcResize();
    }
Example #16
0
 public void OnResize()
 {
     Message.rMessage       = new Rect(40f, (float)(Screen.height - 100), (float)(Screen.width - 40), 20f);
     Message.rAttention     = new Rect((float)Screen.width / 2f - GUI2.YRES(150f) / 2f, GUI2.YRES(60f), GUI2.YRES(150f), GUI2.YRES(50f));
     Message.rAttentionText = new Rect((float)Screen.width / 2f - GUI2.YRES(150f) / 2f + GUI2.YRES(52f), GUI2.YRES(60f), GUI2.YRES(150f), GUI2.YRES(50f));
     Message.rShortMessage  = new Rect((float)Screen.width / 2f - GUI2.YRES(300f) / 2f, (float)Screen.height - GUI2.YRES(120f), GUI2.YRES(300f), GUI2.YRES(50f));
     Message.rWarmupMessage = new Rect((float)Screen.width / 2f - GUI2.YRES(300f) / 2f, GUI2.YRES(12f), GUI2.YRES(300f), GUI2.YRES(50f));
 }
Example #17
0
 private static void DrawWarmupTimeMsg()
 {
     if (GameData.restartroundmode != 1)
     {
         return;
     }
     GUI.color = Color.white;
     GUI2.DrawTextRes(Message.rWarmupMessage, Lang.Get("_WARMUP_TIME"), TextAnchor.MiddleCenter, _Color.White, 0, 12, true);
 }
Example #18
0
 public void OnResize()
 {
     Award.rPoints        = new Rect(0f, 0f, (float)Screen.width, (float)Screen.height);
     Award.rPoints.center = new Vector2((float)Screen.width / 2f, (float)Screen.height / 2f - GUI2.YRES(64f));
     Award.rCustomPoints  = new Rect(Award.rPoints.x, Award.rPoints.y + GUI2.YRES(16f), Award.rPoints.width, Award.rPoints.height);
     Award.rMoney         = new Rect(GUI2.YRES(5f), (float)Screen.height - GUI2.YRES(68f), GUI2.YRES(64f), GUI2.YRES(20f));
     Award.rAwardBack     = new Rect((float)Screen.width / 2f, GUI2.YRES(100f), GUI2.YRES(192f), GUI2.YRES(96f));
     Award.rFlashScreen   = new Rect(0f, 0f, (float)Screen.width, (float)Screen.height);
 }
Example #19
0
    private static void OnResize()
    {
        float num  = (float)((int)GUI2.YRES(2f));
        float num2 = (float)((int)GUI2.YRES(20f));
        float num3 = GUI2.YRES(200f);
        float num4 = (num2 + num) * 16f + num;

        Vote.rBack = new Rect((float)Screen.width / 2f - num3 / 2f, ((float)Screen.height - num4) / 2f, num3, num4);
    }
Example #20
0
    private void DrawBarPlayer(Rect r, int id, string name, int wid, int health, int side)
    {
        int    num       = (int)GUI2.YRES(1f);
        _Color fontcolor = _Color.White;

        if (health == 0)
        {
            fontcolor = _Color.Gray;
        }
        if (side == 0)
        {
            GUI.DrawTexture(r, this.tGradientLeft);
            if (SpecCam.show && SpecCam.mode == 1 && SpecCam.FID == id)
            {
                GUI.DrawTexture(new Rect(r.x, r.y, GUI2.YRES(2f), r.height), this.tYellow);
            }
            GUI2.DrawTextRes(new Rect(r.x + GUI2.YRES(4f), r.y + GUI2.YRES(2f), r.width, GUI2.YRES(16f)), name, TextAnchor.MiddleLeft, fontcolor, 1, 11, true);
            GUI.DrawTexture(new Rect(r.x + GUI2.YRES(4f), r.y + GUI2.YRES(15f), GUI2.YRES(100f), GUI2.YRES(6f)), this.tGray0);
            GUI.DrawTexture(new Rect(r.x + GUI2.YRES(4f) + (float)num, r.y + GUI2.YRES(15f) + (float)num, (GUI2.YRES(100f) - (float)(num * 2)) * ((float)health * 0.01f), GUI2.YRES(6f) - (float)(num * 2)), this.tRed);
            Rect position = new Rect(r.x + GUI2.YRES(108f), r.y, GUI2.YRES(52f), GUI2.YRES(26f));
            if (wid >= 1 && wid <= 5)
            {
                position = new Rect(r.x + GUI2.YRES(108f), r.y + GUI2.YRES(6f), GUI2.YRES(28f), GUI2.YRES(14f));
            }
            if (wid > 0 && WeaponData.GetData(wid).icon2 != null)
            {
                GUI.color = Color.black;
                GUI.DrawTexture(new Rect(position.x + (float)num, position.y + (float)num, position.width, position.height), WeaponData.GetData(wid).icon2);
                GUI.color = Color.white;
                GUI.DrawTexture(position, WeaponData.GetData(wid).icon2);
            }
        }
        else if (side == 1)
        {
            GUI.DrawTexture(r, this.tGradientRight);
            if (SpecCam.show && SpecCam.mode == 1 && SpecCam.FID == id)
            {
                GUI.DrawTexture(new Rect(r.x + r.width - GUI2.YRES(2f), r.y, GUI2.YRES(2f), r.height), this.tYellow);
            }
            GUI2.DrawTextRes(new Rect(r.x, r.y + GUI2.YRES(2f), r.width - GUI2.YRES(4f), GUI2.YRES(16f)), name, TextAnchor.MiddleRight, fontcolor, 1, 11, true);
            GUI.DrawTexture(new Rect(r.x + GUI2.YRES(56f), r.y + GUI2.YRES(15f), GUI2.YRES(100f), GUI2.YRES(6f)), this.tGray0);
            GUI.DrawTexture(new Rect(r.x + GUI2.YRES(56f) + (float)num, r.y + GUI2.YRES(15f) + (float)num, (GUI2.YRES(100f) - (float)(num * 2)) * ((float)health * 0.01f), GUI2.YRES(6f) - (float)(num * 2)), this.tBlue);
            Rect position2 = new Rect(r.x, r.y, GUI2.YRES(52f), GUI2.YRES(26f));
            if (wid >= 1 && wid <= 5)
            {
                position2 = new Rect(r.x + GUI2.YRES(24f), r.y + GUI2.YRES(6f), GUI2.YRES(28f), GUI2.YRES(14f));
            }
            if (wid > 0 && WeaponData.GetData(wid).icon2_inverted != null)
            {
                GUI.color = Color.black;
                GUI.DrawTexture(new Rect(position2.x + (float)num, position2.y + (float)num, position2.width, position2.height), WeaponData.GetData(wid).icon2_inverted);
                GUI.color = Color.white;
                GUI.DrawTexture(position2, WeaponData.GetData(wid).icon2_inverted);
            }
        }
    }
Example #21
0
    private void DrawBuy()
    {
        BuyMenu.menuLevel = 1;
        GUI.DrawTexture(this.rBuyBack, this.tGray0);
        GUI2.DrawTextRes(this.rBuyBack, this.sCategoryName[BuyMenu.catid], TextAnchor.MiddleCenter, _Color.White, 0, 14, true);
        GUI.DrawTexture(this.rArmorySlotsNull[0], this.tGray2);
        GUI.DrawTexture(this.rArmorySlotsNull[1], this.tGray2);
        bool flag = false;
        int  num  = 0;

        for (int i = 1; i < 128; i++)
        {
            if (WeaponData.CheckWeapon(i))
            {
                if (WeaponData.GetData(i).buyMenuSlot == BuyMenu.catid)
                {
                    if (WeaponData.GetData(i).wid == 49)
                    {
                        flag = true;
                    }
                    else
                    {
                        BuyMenu.buySlotWeapon[num] = i;
                        this.DrawItem(this.rArmorySlots[num], i, num);
                        num++;
                    }
                }
            }
        }
        if (flag && ScoreTop.GameMode == 2 && BasePlayer.team == 1)
        {
            BuyMenu.buySlotWeapon[num] = 49;
            this.DrawItem(this.rArmorySlots[num], 49, num);
            num++;
        }
        for (int j = num; j < 10; j++)
        {
            BuyMenu.buySlotWeapon[j] = 0;
            this.DrawItem(this.rArmorySlots[j], 0, 0);
        }
        GUI.DrawTexture(this.rBuyBack2, this.tGray0);
        BuyMenu.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y);
        GUI2.DrawTextRes(new Rect(this.rBuyBack2.x + GUI2.YRES(6f), this.rBuyBack2.y, this.rBuyBack2.width, this.rBuyBack2.height), "0", TextAnchor.MiddleLeft, _Color.Yellow, 0, 12, true);
        if (this.rBuyBack2.Contains(BuyMenu.mpos))
        {
            GUI2.DrawTextRes(new Rect(this.rBuyBack2.x + GUI2.YRES(12f), this.rBuyBack2.y, this.rBuyBack2.width, this.rBuyBack2.height), " - " + Lang.Get("_BACK"), TextAnchor.MiddleLeft, _Color.Red, 0, 10, true);
        }
        else
        {
            GUI2.DrawTextRes(new Rect(this.rBuyBack2.x + GUI2.YRES(12f), this.rBuyBack2.y, this.rBuyBack2.width, this.rBuyBack2.height), " - " + Lang.Get("_BACK"), TextAnchor.MiddleLeft, _Color.White, 0, 10, true);
        }
        if (GUI2.HideButton(this.rBuyBack2))
        {
            BuyMenu.catid = -1;
        }
    }
Example #22
0
 private void DrawDiffuseBar()
 {
     if (HUD.bombDiffuseVal >= 0f)
     {
         this.rDiffuseProgress = new Rect((float)Screen.width / 2f - GUI2.YRES(148f), GUI2.YRES(182f), GUI2.YRES(296f * (HUD.bombDiffuseVal / HUD.bombDiffuseMax)), GUI2.YRES(6f));
         GUI.DrawTexture(this.rDiffuseBack, this.tBlack);
         GUI.DrawTexture(this.rDiffuseLine, this.tGray0);
         GUI.DrawTexture(this.rDiffuseProgress, this.tYellow);
     }
 }
Example #23
0
    private static void DrawChat()
    {
        if (Message.chat.Count == 0)
        {
            return;
        }
        if (Time.time > Message.lastcheck)
        {
            Message.lastcheck = Time.time + 0.5f;
            for (int i = 0; i < Message.chat.Count; i++)
            {
                if (Time.time > Message.chat[i].time + 5f)
                {
                    Message.chat.RemoveAt(0);
                }
            }
        }
        float x   = GUI2.YRES(8f);
        float num = (float)Screen.height - GUI2.YRES(90f);

        for (int j = Message.chat.Count - 1; j >= 0; j--)
        {
            Rect r = new Rect(x, num, GUI2.YRES(460f), GUI2.YRES(20f));
            num -= GUI2.YRES(14f);
            if (Message.chat[j].flag == 0)
            {
                GUI2.DrawTextColorRes(r, string.Concat(new string[]
                {
                    "<color=",
                    Message.sColor[Message.chat[j].ateam],
                    ">",
                    Message.chat[j].aname,
                    "</color> : ",
                    Message.chat[j].msg
                }), TextAnchor.MiddleLeft, _Color.White, 0, 12, true);
            }
            else if (Message.chat[j].flag == 1)
            {
                GUI2.DrawTextColorRes(r, string.Concat(new string[]
                {
                    "<color=",
                    Message.sColor[Message.chat[j].ateam],
                    ">",
                    Message.chat[j].aname,
                    "</color> (команде) : ",
                    Message.chat[j].msg
                }), TextAnchor.MiddleLeft, _Color.White, 0, 12, true);
            }
            else if (Message.chat[j].flag == 2)
            {
                GUI2.DrawTextColorRes(r, "<color=" + Message.sColor[3] + ">SERVER</color> : " + Message.chat[j].msg, TextAnchor.MiddleLeft, _Color.White, 0, 12, true);
            }
        }
    }
Example #24
0
 private static void DrawBombMsg()
 {
     if (Message.tBombMessage + 4f < Time.time)
     {
         return;
     }
     GUI.color = new Color(1f, 1f, 1f, 0.8f);
     GUI.DrawTexture(Message.rAttention, Message.tAttention);
     GUI.color = Color.white;
     GUI2.DrawTextRes(Message.rAttentionText, "Бомба заложена.\r\nВзрыв через 40 сек.", TextAnchor.MiddleLeft, _Color.White, 0, 9, true);
 }
Example #25
0
    public void OnResize()
    {
        this.rBuyMsg = new Rect(((float)Screen.width - GUI2.YRES(200f)) / 2f, GUI2.YRES(400f), GUI2.YRES(200f), GUI2.YRES(20f));
        int num  = (int)GUI2.YRES(2f);
        int num2 = (int)GUI2.YRES(19f);
        int num3 = (int)GUI2.YRES(110f);
        int num4 = (int)GUI2.YRES(80f);
        int num5 = (int)GUI2.YRES(22f);
        int num6 = (int)GUI2.YRES(2f);
        int num7 = (int)GUI2.YRES(60f);
        int num8 = (int)GUI2.YRES(230f);

        if (Options.gamebuy == 1)
        {
            num7 = (int)GUI2.YRES(40f);
            num8 = (int)GUI2.YRES(140f);
        }
        this.rMainBack           = new Rect(((float)Screen.width - GUI2.YRES(300f)) / 2f, GUI2.YRES(158f), GUI2.YRES(300f), (float)num5);
        this.rMainMenu[0]        = new Rect((float)num7, (float)(num8 + (num5 + num6) * 0), this.rMainBack.width, this.rMainBack.height);
        this.rMainMenu[1]        = new Rect((float)num7, (float)(num8 + (num5 + num6) * 1), this.rMainBack.width, this.rMainBack.height);
        this.rMainMenu[2]        = new Rect((float)num7, (float)(num8 + (num5 + num6) * 2), this.rMainBack.width, this.rMainBack.height);
        this.rMainMenu[3]        = new Rect((float)num7, (float)(num8 + (num5 + num6) * 3), this.rMainBack.width, this.rMainBack.height);
        this.rMainMenu[4]        = new Rect((float)num7, (float)(num8 + (num5 + num6) * 4), this.rMainBack.width, this.rMainBack.height);
        this.rMainMenu[5]        = new Rect((float)num7, (float)(num8 + (num5 + num6) * 5), this.rMainBack.width, this.rMainBack.height);
        this.rMainMenu[6]        = new Rect((float)num7, (float)(num8 + (num5 + num6) * 6), this.rMainBack.width, this.rMainBack.height);
        this.rBuyBack            = new Rect(((float)Screen.width - GUI2.YRES(600f)) / 2f, GUI2.YRES(80f), (float)(num3 * 5 + num2 * 2 + num * 6), (float)num5);
        this.rBuyBack2           = new Rect(this.rBuyBack.x, this.rBuyBack.height + this.rBuyBack.y + (float)(num4 * 2) + (float)(num * 3), (float)(num3 * 5 + num2 * 2 + num * 6), (float)num5);
        this.rActiveSlotsNull[0] = new Rect(this.rBuyBack.x, this.rBuyBack.y + (float)(num5 + num), (float)num2, (float)num4);
        this.rActiveSlotsNull[1] = new Rect(this.rBuyBack.x + (float)(num3 * 5) + (float)num2 + (float)(num * 6), this.rBuyBack.y + (float)(num5 + num), (float)num2, (float)num4);
        this.rActiveSlots[0]     = new Rect(this.rBuyBack.x + (float)num2 + (float)num + (float)((num + num3) * 0), GUI2.YRES(104f), (float)num3, (float)num4);
        this.rActiveSlots[1]     = new Rect(this.rBuyBack.x + (float)num2 + (float)num + (float)((num + num3) * 1), GUI2.YRES(104f), (float)num3, (float)num4);
        this.rActiveSlots[2]     = new Rect(this.rBuyBack.x + (float)num2 + (float)num + (float)((num + num3) * 2), GUI2.YRES(104f), (float)num3, (float)num4);
        this.rActiveSlots[3]     = new Rect(this.rBuyBack.x + (float)num2 + (float)num + (float)((num + num3) * 3), GUI2.YRES(104f), (float)num3, (float)num4);
        this.rActiveSlots[4]     = new Rect(this.rBuyBack.x + (float)num2 + (float)num + (float)((num + num3) * 4), GUI2.YRES(104f), (float)num3, (float)num4);
        this.rActiveSlots[5]     = new Rect(this.rBuyBack.x + (float)num2 + (float)num + (float)((num + num3) * 5), GUI2.YRES(104f), (float)num3, (float)num4);
        this.rBuyArmory          = new Rect(this.rBuyBack.x, this.rBuyBack.y, this.rBuyBack.width, this.rBuyBack.height);
        this.rArmorySlots[0]     = new Rect(this.rActiveSlots[0].x, this.rBuyArmory.y + (float)num5 + (float)num, this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[1]     = new Rect(this.rActiveSlots[1].x, this.rBuyArmory.y + (float)num5 + (float)num, this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[2]     = new Rect(this.rActiveSlots[2].x, this.rBuyArmory.y + (float)num5 + (float)num, this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[3]     = new Rect(this.rActiveSlots[3].x, this.rBuyArmory.y + (float)num5 + (float)num, this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[4]     = new Rect(this.rActiveSlots[4].x, this.rBuyArmory.y + (float)num5 + (float)num, this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[5]     = new Rect(this.rActiveSlots[0].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)(num + num4), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[6]     = new Rect(this.rActiveSlots[1].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)(num + num4), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[7]     = new Rect(this.rActiveSlots[2].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)(num + num4), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[8]     = new Rect(this.rActiveSlots[3].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)(num + num4), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[9]     = new Rect(this.rActiveSlots[4].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)(num + num4), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[10]    = new Rect(this.rActiveSlots[0].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)((num + num4) * 2), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[11]    = new Rect(this.rActiveSlots[1].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)((num + num4) * 2), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[12]    = new Rect(this.rActiveSlots[2].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)((num + num4) * 2), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[13]    = new Rect(this.rActiveSlots[3].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)((num + num4) * 2), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlots[14]    = new Rect(this.rActiveSlots[4].x, this.rBuyArmory.y + (float)num5 + (float)num + (float)((num + num4) * 2), this.rActiveSlots[0].width, this.rActiveSlots[0].height);
        this.rArmorySlotsNull[0] = new Rect(this.rBuyBack.x, this.rArmorySlots[0].y, (float)num2, (float)(num4 * 2 + num * 1));
        this.rArmorySlotsNull[1] = new Rect(this.rBuyBack.x + this.rBuyBack.width - (float)num2, this.rArmorySlots[0].y, (float)num2, (float)(num4 * 2 + num * 1));
    }
Example #26
0
 public static void DrawEditRes(Rect r, ref string text, TextAnchor pos, _Color fontcolor, int fontpos, int fontsize, bool fontshadow)
 {
     GUI.SetNextControlName("123");
     GUI2.guistyle.wordWrap         = false;
     GUI2.guistyle.clipping         = TextClipping.Clip;
     GUI2.guistyle.font             = GUI2.fontlist[fontpos];
     GUI2.guistyle.alignment        = pos;
     GUI2.guistyle.fontSize         = (int)GUI2.YRES((float)fontsize);
     GUI2.guistyle.normal.textColor = GUI2.colorlist[(int)fontcolor];
     text = GUI.TextField(r, text, GUI2.guistyle);
     GUI.FocusControl("123");
 }
Example #27
0
    public static void ResizeDeath()
    {
        if (Message.death.Count == 0)
        {
            return;
        }
        float x   = GUI2.YRES(8f);
        float num = GUI2.YRES(4f) + GUI2.YRES(14f) * 4f;

        for (int i = Message.death.Count - 1; i >= 0; i--)
        {
            Message.death[i].r = new Rect(x, num, GUI2.YRES(300f), GUI2.YRES(20f));
            float width = GUI2.CalcSizeRes(Message.death[i].aname + Message.death[i].vname, 0, 12) + GUI2.YRES(70f);
            Message.death[i].rBack = new Rect(0f, Message.death[i].r.y + 6f, width, GUI2.YRES(12f));
            num -= GUI2.YRES(14f);
            Message.death[i].text1 = string.Concat(new string[]
            {
                "<color=",
                Message.sColor[Message.death[i].ateam],
                ">",
                Message.death[i].aname,
                "</color>"
            });
            Message.death[i].text2 = string.Concat(new string[]
            {
                "<color=",
                Message.sColor[Message.death[i].vteam],
                ">",
                Message.death[i].vname,
                "</color>"
            });
            float num2 = GUI2.CalcSizeRes(Message.death[i].text1, 0, 12);
            if ((Message.death[i].wid >= 0 && Message.death[i].wid <= 5) || Message.death[i].wid == 27)
            {
                Message.death[i].rIcon = new Rect(Message.death[i].r.x + num2, Message.death[i].r.y + GUI2.YRES(4f), GUI2.YRES(24f), GUI2.YRES(12f));
            }
            else
            {
                Message.death[i].rIcon = new Rect(Message.death[i].r.x + num2 + GUI2.YRES(2f), Message.death[i].r.y, GUI2.YRES(44f), GUI2.YRES(22f));
            }
            float num3 = GUI2.CalcSizeRes(Message.death[i].text2, 0, 12);
            Message.death[i].rIconBlack = new Rect(Message.death[i].rIcon.x + 1f, Message.death[i].rIcon.y + 1f, Message.death[i].rIcon.width, Message.death[i].rIcon.height);
            float num4 = 0f;
            if (Message.death[i].hitzone == 1)
            {
                Message.death[i].rHSBlack = new Rect(Message.death[i].rIcon.x + Message.death[i].rIcon.width + GUI2.YRES(4f) + 1f, Message.death[i].r.y + GUI2.YRES(2f) + 1f, GUI2.YRES(16f), GUI2.YRES(16f));
                Message.death[i].rHS      = new Rect(Message.death[i].rIcon.x + Message.death[i].rIcon.width + GUI2.YRES(4f), Message.death[i].r.y + GUI2.YRES(2f), GUI2.YRES(16f), GUI2.YRES(16f));
                num4 = GUI2.YRES(20f);
            }
            Message.death[i].r2 = new Rect(Message.death[i].rIcon.x + Message.death[i].rIcon.width + GUI2.YRES(4f) + num4, Message.death[i].r.y, Message.death[i].r.width, Message.death[i].r.height);
        }
    }
Example #28
0
 private static void DrawFreezeTimeMsg()
 {
     if (BuyMenu.isActive() || ChooseTeam.show)
     {
         return;
     }
     if (Message.freezeTimeLeft == 0)
     {
         return;
     }
     GUI.color = Color.white;
     GUI2.DrawTextRes(Message.rShortMessage, "Freeze time (sec): " + Message.freezeTimeLeft + "...", TextAnchor.MiddleCenter, _Color.White, 0, 12, true);
 }
Example #29
0
    private void DrawBuyMessage()
    {
        GUI.DrawTexture(this.rBuyMsg, this.tGradient);
        Rect position = new Rect(this.rBuyMsg.x + GUI2.YRES(8f), this.rBuyMsg.y, GUI2.YRES(20f), GUI2.YRES(20f));
        int  num      = (int)GUI2.YRES(1f);

        GUI.DrawTexture(position, this.tKeyBuy);
        GUI2.DrawTextRes(this.rBuyMsg, Lang.Get("_WEAPON_BUY"), TextAnchor.MiddleCenter, _Color.White, 0, 12, true);
        if (GameData.restartroundmode != 1)
        {
            GUI2.DrawTextRes(new Rect(this.rBuyMsg.x + GUI2.YRES(170f), this.rBuyMsg.y, GUI2.YRES(20f), GUI2.YRES(20f)), (BuyMenu.showtime - Time.time).ToString("0") + " ", TextAnchor.MiddleCenter, _Color.White, 0, 12, true);
        }
    }
Example #30
0
 private void DrawMenuLight()
 {
     BuyMenu.menuLevel = 0;
     GUI2.DrawTextRes(new Rect(this.rMainMenu[0].x, this.rMainMenu[0].y - this.rMainMenu[0].height * 1.4f, GUI2.YRES(200f), GUI2.YRES(26f)), Lang.Get("_WEAPON_BUY"), TextAnchor.MiddleLeft, _Color.White, 1, 12, true);
     GUI2.DrawTextRes(this.rMainMenu[0], "1. " + this.sCategoryName[0], TextAnchor.MiddleLeft, _Color.White, 1, 12, true);
     GUI2.DrawTextRes(this.rMainMenu[1], "2. " + this.sCategoryName[1], TextAnchor.MiddleLeft, _Color.White, 1, 12, true);
     GUI2.DrawTextRes(this.rMainMenu[2], "3. " + this.sCategoryName[2], TextAnchor.MiddleLeft, _Color.White, 1, 12, true);
     GUI2.DrawTextRes(this.rMainMenu[3], "4. " + this.sCategoryName[3], TextAnchor.MiddleLeft, _Color.White, 1, 12, true);
     GUI2.DrawTextRes(this.rMainMenu[4], "5. " + this.sCategoryName[4], TextAnchor.MiddleLeft, _Color.White, 1, 12, true);
     GUI2.DrawTextRes(this.rMainMenu[5], "6. " + this.sCategoryName[5], TextAnchor.MiddleLeft, _Color.White, 1, 12, true);
     GUI2.DrawTextRes(this.rMainMenu[6], "7. " + this.sCategoryName[6], TextAnchor.MiddleLeft, _Color.White, 1, 12, true);
     GUI2.DrawTextRes(new Rect(this.rMainMenu[0].x, this.rMainMenu[6].y + this.rMainMenu[6].height * 1.2f, GUI2.YRES(200f), GUI2.YRES(26f)), "ESC. " + Lang.Get("_CLOSE"), TextAnchor.MiddleLeft, _Color.White, 1, 12, true);
 }