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); }
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; }
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); }
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]); }
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); }
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); }
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); }
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; } }
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); } } }
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); }
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); }
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); } }
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); }
private void DrawScore(string score, int team) { GUI.color = this.c; GUI.DrawTexture(this.rTeam[team], this.tBlack); GUI.color = Color.white; if (team == 0) { GUI2.DrawTextRes(this.rTeam[team], score, TextAnchor.MiddleCenter, _Color.Red, 0, 14, true); } else { GUI2.DrawTextRes(this.rTeam[team], score, TextAnchor.MiddleCenter, _Color.Blue, 0, 14, true); } }
private void DrawTimer() { int num = (int)(ScoreTop.TimeTimer - Time.time); if (num != ScoreTop.TimeLeft) { ScoreTop.TimeLeft = num; ScoreTop.UpdateTimeLeft(); } if (!ScoreTop.bombIndicator) { GUI2.DrawTextRes(this.rScore, ScoreTop.sTimeLeft, TextAnchor.MiddleCenter, _Color.White, 0, 12, true); } }
private bool DrawButton(Rect r, string text, string text2, _Color color2 = _Color.Gray) { this.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y); if (r.Contains(this.mpos)) { GUI2.DrawTextRes(r, text, TextAnchor.MiddleRight, _Color.Red, 1, 14, true); GUI2.DrawTextRes(new Rect(r.x + r.width + GUI2.YRES(20f), r.y, GUI2.YRES(256f), r.height), text2, TextAnchor.MiddleLeft, color2, 1, 10, false); } else { GUI2.DrawTextRes(r, text, TextAnchor.MiddleRight, _Color.White, 1, 14, true); } return(GUI2.HideButton(r)); }
public static void Draw() { if (!ChooseTeam.show) { return; } ChooseTeam.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y); if (ChooseTeam.rLineTeam0.Contains(ChooseTeam.mpos)) { GUI.color = new Color(1f, 0.2f, 0f, 1f); } else { GUI.color = new Color(1f, 0.2f, 0f, 0.5f); } GUI.DrawTexture(ChooseTeam.rLineTeam0, ChooseTeam.tWhite); GUI.DrawTexture(ChooseTeam.rAnlgeTeam0, ChooseTeam.tAngle0); if (ChooseTeam.rLineTeam1.Contains(ChooseTeam.mpos)) { GUI.color = new Color(0f, 0.5f, 1f, 1f); } else { Color color = new Color(0f, 0.5f, 1f, 0.5f); GUI.color = color; GUI.color = color; } GUI.DrawTexture(ChooseTeam.rLineTeam1, ChooseTeam.tWhite); GUI.DrawTexture(ChooseTeam.rAnlgeTeam1, ChooseTeam.tAngle1); GUI.color = new Color(1f, 1f, 1f, 0.5f); GUI.DrawTexture(ChooseTeam.rBox0, ChooseTeam.tBlack); GUI.DrawTexture(ChooseTeam.rBox1, ChooseTeam.tBlack); GUI.DrawTexture(ChooseTeam.rMsgTeam, ChooseTeam.tBlack); GUI.color = Color.white; GUI2.DrawTextRes(ChooseTeam.rTextTeam0, "MERCS", TextAnchor.MiddleLeft, _Color.White, 0, 24, true); GUI2.DrawTextRes(ChooseTeam.rBox0, "1", TextAnchor.MiddleCenter, _Color.White, 0, 24, true); GUI2.DrawTextRes(ChooseTeam.rTextTeam1, "WARCORPS", TextAnchor.MiddleLeft, _Color.White, 0, 24, true); GUI2.DrawTextRes(ChooseTeam.rBox1, "2", TextAnchor.MiddleCenter, _Color.White, 0, 24, true); GUI2.DrawTextRes(ChooseTeam.rMsgTeam, Lang.Get("_CHOOSE_TEAM"), TextAnchor.MiddleCenter, _Color.White, 0, 18, true); if (GUI2.HideButton(ChooseTeam.rLineTeam0)) { ChooseTeam.Choose(0); } if (GUI2.HideButton(ChooseTeam.rLineTeam1)) { ChooseTeam.Choose(1); } }
private void DrawMenuSlot(int id, Rect r, string text) { BuyMenu.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y); GUI2.DrawTextRes(new Rect(r.x + GUI2.YRES(8f), r.y + GUI2.YRES(3f), GUI2.YRES(20f), GUI2.YRES(20f)), id.ToString(), TextAnchor.MiddleCenter, _Color.Yellow, 1, 14, true); if (r.Contains(BuyMenu.mpos)) { GUI2.DrawTextRes(new Rect(r.x + GUI2.YRES(36f), r.y, r.width, r.height), text, TextAnchor.MiddleLeft, _Color.Red, 1, 14, true); } else { GUI2.DrawTextRes(new Rect(r.x + GUI2.YRES(36f), r.y, r.width, r.height), text, TextAnchor.MiddleLeft, _Color.White, 1, 14, true); } if (GUI2.HideButton(r)) { BuyMenu.catid = id; } }
private static void DrawSystem() { if (Message.system.Count == 0) { return; } GUI.color = Message.a; float x = (float)Screen.width - GUI2.YRES(308f); float num = GUI2.YRES(4f) + GUI2.YRES(14f) * 4f; for (int i = 0; i < Message.system.Count; i++) { Rect r = new Rect(x, num, GUI2.YRES(300f), GUI2.YRES(20f)); num -= GUI2.YRES(14f); GUI2.DrawTextRes(r, Message.system[i].msg, TextAnchor.MiddleRight, _Color.White, 0, 12, true); } GUI.color = Color.white; }
private void DrawBuyLight() { BuyMenu.menuLevel = 1; int num = (int)GUI2.YRES(22f); int num2 = (int)GUI2.YRES(2f); float y = this.rMainMenu[0].y; GUI2.DrawTextRes(new Rect(this.rMainMenu[0].x, this.rMainMenu[0].y - this.rMainMenu[0].height * 1.4f, GUI2.YRES(200f), GUI2.YRES(26f)), this.sCategoryName[BuyMenu.catid], TextAnchor.MiddleLeft, _Color.White, 1, 12, true); bool flag = false; int num3 = 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 { GUI2.DrawTextRes(new Rect(this.rMainMenu[0].x, y + (float)((num + num2) * num3), GUI2.YRES(140f), (float)num), (num3 + 1).ToString() + ". " + WeaponData.GetData(i).wName, TextAnchor.MiddleLeft, _Color.White, 1, 12, true); GUI2.DrawTextRes(new Rect(this.rMainMenu[0].x, y + (float)((num + num2) * num3), GUI2.YRES(140f), (float)num), WeaponData.GetData(i).cost.ToString(), TextAnchor.MiddleRight, _Color.White, 1, 12, true); BuyMenu.buySlotWeapon[num3] = i; num3++; } } } } if (flag && ScoreTop.GameMode == 2 && BasePlayer.team == 1) { BuyMenu.buySlotWeapon[num3] = 49; GUI2.DrawTextRes(new Rect(this.rMainMenu[0].x, y + (float)((num + num2) * num3), GUI2.YRES(140f), (float)num), (num3 + 1).ToString() + ". " + WeaponData.GetData(49).wName, TextAnchor.MiddleLeft, _Color.White, 1, 12, true); GUI2.DrawTextRes(new Rect(this.rMainMenu[0].x, y + (float)((num + num2) * num3), GUI2.YRES(140f), (float)num), WeaponData.GetData(49).cost.ToString(), TextAnchor.MiddleRight, _Color.White, 1, 12, true); num3++; } GUI2.DrawTextRes(new Rect(this.rMainMenu[0].x, y + (float)((num + num2) * num3) + this.rMainMenu[0].height * 0.2f, GUI2.YRES(200f), GUI2.YRES(22f)), "0. " + Lang.Get("_BACK"), TextAnchor.MiddleLeft, _Color.White, 1, 12, true); for (int j = num3; j < 10; j++) { BuyMenu.buySlotWeapon[j] = 0; } }
private static void DrawTeam(int team) { float num = GUI2.YRES(240f); float num2 = GUI2.YRES(240f); float num3 = GUI2.YRES(4f); float num4 = GUI2.YRES(20f); if (ScoreBoard.gamemode == 3) { num = GUI2.YRES(240f); num2 = GUI2.YRES(256f); num3 = GUI2.YRES(4f); num4 = GUI2.YRES(15f); } GUI.color = new Color(1f, 1f, 1f, 0.75f); GUI.DrawTexture(ScoreBoard.rTeamBack[team], ScoreBoard.tGray1); GUI.color = Color.white; GUI.DrawTexture(ScoreBoard.rTeamHeader[team], ScoreBoard.tGray0); GUI2.DrawTextRes(ScoreBoard.rTeamHeaderName[team], ScoreBoard.teamname[team], TextAnchor.MiddleLeft, (_Color)ScoreBoard.teamcolor[team], 0, 12, true); GUI.DrawTexture(ScoreBoard.rTeamHeaderClan[team], ScoreBoard.tClan); GUI.DrawTexture(ScoreBoard.rTeamHeaderKills[team], ScoreBoard.tKills); GUI.DrawTexture(ScoreBoard.rTeamHeaderDeaths[team], ScoreBoard.tDeaths); GUI.DrawTexture(ScoreBoard.rTeamHeaderPoints[team], ScoreBoard.tPoints); float x = ScoreBoard.rTeamBack[team].x; float num5 = ScoreBoard.rTeamBack[team].y + num4; if (ScoreBoard.gamemode == 3) { num5 += GUI2.YRES(5f); } for (int i = 0; i < ScoreBoard.c; i++) { int num6 = ScoreBoard.sorted[i]; if (PlayerControll.Player[num6] != null) { if (PlayerControll.Player[num6].Team == team) { ScoreBoard.DrawPlayerData(x, num5, num6); num5 += num4; } } } }
private void DrawPlayerName(Vector3 p, string name, bool drawname) { p.y += 2.5f; Vector3 vector = Camera.main.WorldToScreenPoint(p); vector.y = (float)Screen.height - vector.y; float num = GUI2.CalcSizeRes(name, 0, 8); if (drawname) { GUI.color = this.a; GUI2.DrawTextRes(new Rect(vector.x - num / 2f, vector.y, num, GUI2.YRES(8f)), name, TextAnchor.MiddleLeft, _Color.White, 0, 8, true); GUI.color = Color.white; } else if (this.tTeam != null) { GUI.DrawTexture(new Rect(vector.x - GUI2.YRES(4f), vector.y + GUI2.YRES(9f), GUI2.YRES(8f), GUI2.YRES(8f)), this.tTeam); } }
private static void DrawRoundData() { Rect position = new Rect(ScoreBoard.rTeamBack[0].x, ScoreBoard.rTeamBack[0].y - GUI2.YRES(20f) - GUI2.YRES(4f), GUI2.YRES(240f), GUI2.YRES(20f)); Rect rect = new Rect(ScoreBoard.rTeamBack[0].x, ScoreBoard.rTeamBack[0].y - GUI2.YRES(20f) - GUI2.YRES(4f), GUI2.YRES(32f), GUI2.YRES(20f)); GUI.DrawTexture(position, ScoreBoard.tGray0); GUI.DrawTexture(rect, ScoreBoard.tGray2); GUI2.DrawTextRes(rect, ScoreBoard.sTeamScore[0], TextAnchor.MiddleCenter, _Color.White, 0, 12, true); for (int i = 0; i < 10; i++) { if (i < ScoreBoard.teamscore[0]) { GUI.color = GUI2.GetColor(_Color.Red); } else { GUI.color = Color.gray; } GUI.DrawTexture(new Rect(rect.x + GUI2.YRES(26f) + GUI2.YRES(20f) * (float)i, rect.y, GUI2.YRES(40f), GUI2.YRES(20f)), ScoreBoard.tLine); GUI.color = Color.white; } Rect position2 = new Rect(ScoreBoard.rTeamBack[0].x + GUI2.YRES(240f) + GUI2.YRES(4f) * 2f, ScoreBoard.rTeamBack[0].y - GUI2.YRES(20f) - GUI2.YRES(4f), GUI2.YRES(240f), GUI2.YRES(20f)); Rect rect2 = new Rect(ScoreBoard.rTeamBack[0].x + GUI2.YRES(240f) + GUI2.YRES(4f) * 2f, ScoreBoard.rTeamBack[0].y - GUI2.YRES(20f) - GUI2.YRES(4f), GUI2.YRES(32f), GUI2.YRES(20f)); GUI.DrawTexture(position2, ScoreBoard.tGray0); GUI.DrawTexture(rect2, ScoreBoard.tGray2); GUI2.DrawTextRes(rect2, ScoreBoard.sTeamScore[1], TextAnchor.MiddleCenter, _Color.White, 0, 12, true); for (int j = 0; j < 10; j++) { if (j < ScoreBoard.teamscore[1]) { GUI.color = GUI2.GetColor(_Color.Blue); } else { GUI.color = Color.gray; } GUI.DrawTexture(new Rect(rect2.x + GUI2.YRES(26f) + GUI2.YRES(20f) * (float)j, rect2.y, GUI2.YRES(40f), GUI2.YRES(20f)), ScoreBoard.tLine); GUI.color = Color.white; } }
private void DrawRespawnBar() { if (!HUD.respawnshow) { return; } float num = HUD.respawntime - Time.time; if (num <= 0f) { HUD.respawnshow = false; } float num2 = num / HUD.respawnseconds; GUI.color = new Color(1f, 1f, 1f, 0.75f); GUI.DrawTexture(this.rRespawnBack, this.tBlack); GUI.color = Color.white; GUI.DrawTexture(this.rRespawnSeconds, this.tGray0); GUI.DrawTexture(new Rect(this.rRespawnBar.x, this.rRespawnBar.y, this.rRespawnBar.width - this.rRespawnBar.width * num2, this.rRespawnBar.height), this.tWhite); GUI2.DrawTextRes(this.rRespawnBar, Lang.Get("_RESPAWN"), TextAnchor.MiddleCenter, _Color.Black, 0, 10, false); GUI2.DrawTextRes(this.rRespawnSeconds, num.ToString("00"), TextAnchor.MiddleCenter, _Color.White, 0, 12, false); }
private static void DrawPlayer(int id) { Vector2 mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y); if (id == MenuBanList.selected) { GUI.DrawTexture(MenuBanList.rPlayerBack[id], MenuBanList.tRed); } else if (GUIM.Contains(MenuBanList.rPlayerBack[id], mpos)) { GUI.DrawTexture(MenuBanList.rPlayerBack[id], MenuBanList.tRed); if (Input.GetMouseButtonDown(0)) { MenuBanList.selected = id; } } else { GUI.DrawTexture(MenuBanList.rPlayerBack[id], MenuBanList.tGray); } GUI2.DrawTextRes(MenuBanList.rPlayerID[id], id.ToString(), TextAnchor.MiddleCenter, _Color.White, 0, 12, false); GUI2.DrawTextRes(MenuBanList.rPlayerName[id], MenuBanList.banList[id].playerName, TextAnchor.MiddleLeft, _Color.White, 0, 12, false); GUI2.DrawTextRes(MenuBanList.rPlayerSID[id], MenuBanList.banList[id].playerSID, TextAnchor.MiddleLeft, _Color.White, 0, 12, false); }
public static void DrawBadge() { if (!Message.dead) { return; } if (Message.badge_name == string.Empty) { return; } GUI.color = new Color(0f, 0f, 0f, 0.75f); GUI.DrawTexture(new Rect(0f, 0f, (float)Screen.width, GUI2.YRES(80f)), Message.tBlack); GUI.DrawTexture(new Rect(0f, (float)Screen.height - GUI2.YRES(102f), (float)Screen.width, GUI2.YRES(102f)), Message.tBlack); GUI.color = Color.white; int num = Message.badge_back; int num2 = Message.badge_icon; Rect r = new Rect(((float)Screen.width - GUI2.YRES(256f)) / 2f, GUI2.YRES(380f), GUI2.YRES(256f), GUI2.YRES(20f)); float num3 = (Time.time - Message.badge_time) * 10f * GUI2.YRES(64f); if (Message.badge_wid > 0) { if (num3 < GUI2.YRES(63f)) { GUI.color = Color.red; } Texture2D icon; if (Message.badge_wid_custom > 0) { icon = MenuShop.shopdata[Message.badge_wid_custom].icon; } else { icon = WeaponData.GetData(Message.badge_wid).icon; } if (icon) { if (icon.width == icon.height) { GUI.DrawTexture(new Rect(((float)Screen.width - GUI2.YRES(256f)) / 2f + GUI2.YRES(272f), GUI2.YRES(400f) - GUI2.YRES(25f), GUI2.YRES(100f), GUI2.YRES(100f)), icon); } else { GUI.DrawTexture(new Rect(((float)Screen.width - GUI2.YRES(256f)) / 2f + GUI2.YRES(272f), GUI2.YRES(400f), GUI2.YRES(100f), GUI2.YRES(50f)), icon); } Rect position = new Rect(((float)Screen.width - GUI2.YRES(256f)) / 2f + GUI2.YRES(272f), GUI2.YRES(400f) + GUI2.YRES(50f), GUI2.YRES(128f), GUI2.YRES(14f)); GUI.color = Color.black; GUI.DrawTexture(position, Message.tGradient); GUI.color = Color.white; if (Message.badge_wid_custom > 0) { GUI2.DrawTextRes(new Rect(position.x + GUI2.YRES(4f), position.y, position.width, position.height), MenuShop.shopdata[Message.badge_wid_custom].name, TextAnchor.MiddleLeft, _Color.White, 0, 10, true); } else { GUI2.DrawTextRes(new Rect(position.x + GUI2.YRES(4f), position.y, position.width, position.height), WeaponData.GetData(Message.badge_wid).wName, TextAnchor.MiddleLeft, _Color.White, 0, 10, true); } } GUI.color = Color.white; } GUI2.DrawTextRes(r, Lang.Get("_YOU_KILLED_BY"), TextAnchor.MiddleCenter, _Color.White, 0, 14, true); if (num3 > GUI2.YRES(64f)) { num3 = GUI2.YRES(64f); } if (num3 < GUI2.YRES(63f)) { GUI.DrawTexture(new Rect(((float)Screen.width - GUI2.YRES(256f)) / 2f, GUI2.YRES(400f) + (GUI2.YRES(64f) - num3) / 2f, GUI2.YRES(256f), num3), Message.tWhite); return; } Rect position2 = new Rect(((float)Screen.width - GUI2.YRES(256f)) / 2f, GUI2.YRES(400f), GUI2.YRES(256f), GUI2.YRES(64f)); Rect position3 = new Rect(((float)Screen.width - GUI2.YRES(256f)) / 2f + GUI2.YRES(8f), GUI2.YRES(400f), GUI2.YRES(64f), GUI2.YRES(64f)); if (num > 0) { GUI.DrawTexture(position2, MenuShop.shopdata[num].icon); } else { GUI.DrawTexture(position2, Message.tEmptyBack); } if (num2 > 0) { GUI.DrawTexture(position3, MenuShop.shopdata[num2].icon); } Rect rect = new Rect(position3.x + GUI2.YRES(68f), position3.y + GUI2.YRES(14f), GUI2.YRES(32f), GUI2.YRES(16f)); Rect position4 = new Rect(position3.x + GUI2.YRES(68f) + GUI2.YRES(32f), position3.y + GUI2.YRES(14f), GUI2.YRES(128f), GUI2.YRES(16f)); Rect r2 = new Rect(position3.x + GUI2.YRES(68f) + GUI2.YRES(32f) + GUI2.YRES(4f), position3.y + GUI2.YRES(14f), GUI2.YRES(128f), GUI2.YRES(16f)); Rect rect2 = new Rect(rect.x, rect.y + GUI2.YRES(20f), GUI2.YRES(160f), GUI2.YRES(16f)); GUI.DrawTexture(rect, Message.tWhite); GUI.color = new Color(0f, 0f, 0f, 0.75f); GUI.DrawTexture(position4, Message.tBlack); GUI.color = Color.white; GUI2.DrawTextRes(rect, "Lv." + Message.badge_lvl, TextAnchor.MiddleCenter, _Color.Blue, 0, 12, false); GUI2.DrawTextRes(r2, Message.badge_name, TextAnchor.MiddleLeft, _Color.White, 0, 12, true); if (Message.badge_clanname != string.Empty) { GUI.color = new Color(0f, 0f, 0f, 0.75f); GUI.DrawTexture(rect2, Message.tBlack); GUI.color = Color.white; GUI2.DrawTextRes(rect2, Message.badge_clanname, TextAnchor.MiddleCenter, _Color.White, 0, 12, true); } }
private void DrawFrags(string score) { GUI2.DrawTextRes(this.rScore, score, TextAnchor.MiddleCenter, _Color.White, 0, 15, true); }
private void DrawItem(Rect r, int wid = 0, int slot = 0) { BuyMenu.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y); if (r.Contains(BuyMenu.mpos)) { GUI.color = this.teamcolor[BuyMenu.team]; } else { GUI.color = new Color(0.35f, 0.35f, 0.35f, 0.75f); } if (wid == 0) { GUI.color = new Color(0.15f, 0.15f, 0.15f, 0.75f); } GUI.DrawTexture(r, this.tWhite); GUI.color = Color.white; if (wid > 0) { Rect rect = new Rect(r.x + GUI2.YRES(2f), r.y + GUI2.YRES(2f), GUI2.YRES(14f), GUI2.YRES(14f)); GUI.DrawTexture(rect, this.tBlack); if (rect.Contains(BuyMenu.mpos)) { GUI2.DrawTextRes(rect, ">>", TextAnchor.MiddleCenter, _Color.Yellow, 0, 12, false); } else if (BuyMenu.menuLevel == 0) { GUI2.DrawTextRes(rect, ">", TextAnchor.MiddleCenter, _Color.Yellow, 0, 12, false); } else if (BuyMenu.menuLevel == 1) { GUI2.DrawTextRes(rect, (slot + 1).ToString(), TextAnchor.MiddleCenter, _Color.Yellow, 0, 11, false); } GUI.color = new Color(1f, 1f, 1f, 0.25f); GUI.DrawTexture(new Rect(r.x + GUI2.YRES(17f), r.y + GUI2.YRES(2f), r.width - GUI2.YRES(19f), GUI2.YRES(14f)), this.tBlack); GUI.color = Color.white; GUI2.DrawTextRes(new Rect(r.x + GUI2.YRES(20f), r.y + GUI2.YRES(2f), r.width - GUI2.YRES(22f), GUI2.YRES(14f)), WeaponData.GetData(wid).wName, TextAnchor.MiddleLeft, _Color.White, 0, 12, true); int num = wid; if (WeaponData.CheckCustomSkin(wid) && BaseData.profileWeapon[wid] > 0) { num = BaseData.profileWeapon[wid]; } Texture2D icon; if (num >= 128) { icon = MenuShop.shopdata[num].icon; } else { icon = WeaponData.GetData(wid).icon; } if (icon) { float num2 = r.x; float width = r.width; float height = r.width / 2f; float num3 = r.y + GUI2.YRES(13f); if (num >= 128) { height = r.width; num3 = r.y + GUI2.YRES(6f) - r.height / 4f; if (WeaponData.GetData(wid).buyMenuSlot == 1) { height = r.width * 0.75f; width = r.width * 0.75f; num3 += r.width * 0.1f; num2 += r.width * 0.125f; } } if (WeaponData.GetData(wid).buyMenuSlot == 1 && num < 128) { GUI.color = Color.black; GUI.DrawTexture(new Rect(r.x + 1f + GUI2.YRES(15f), r.y + GUI2.YRES(20f) + 1f, r.height, r.height / 2f), WeaponData.GetData(wid).icon); GUI.color = Color.white; GUI.DrawTexture(new Rect(r.x + GUI2.YRES(15f), r.y + GUI2.YRES(20f), r.height, r.height / 2f), WeaponData.GetData(wid).icon); } else { GUI.color = Color.black; GUI.DrawTexture(new Rect(num2 + 1f, num3 + 1f, width, height), icon); GUI.color = Color.white; GUI.DrawTexture(new Rect(num2, num3, width, height), icon); } } GUI.DrawTexture(new Rect(r.x, r.y + GUI2.YRES(66f), r.width, GUI2.YRES(14f)), this.tGray2); GUI.DrawTexture(new Rect(r.x + r.width - GUI2.YRES(17f), r.y + GUI2.YRES(66f), GUI2.YRES(14f), GUI2.YRES(14f)), this.tMoney); GUI2.DrawTextRes(new Rect(r.x, r.y + GUI2.YRES(66f), r.width - GUI2.YRES(20f), GUI2.YRES(14f)), WeaponData.GetData(wid).sCost, TextAnchor.MiddleRight, _Color.White, 0, 12, false); if (GUI2.HideButton(r)) { this.SendBuy(slot); } } }
private void DrawInfectionMessage() { GUI2.DrawTextRes(this.rInfMsg, Lang.Get("До заражения") + " " + (BuyMenu.showtime - Time.time).ToString("0") + " сек.", TextAnchor.MiddleCenter, _Color.Red, 0, 16, true); }
private void OnGUI() { if (HUD.forcehide) { return; } this.DrawRespawnBar(); if (!HUD.show) { return; } if (SpecCam.show) { Rect rect = new Rect(0f, (float)Screen.height - GUI2.YRES(32f), (float)Screen.width, GUI2.YRES(32f)); GUI.color = this.cb; GUI.DrawTexture(rect, this.tBlack); GUI.color = Color.white; if (SpecCam.FID >= 0 && SpecCam.mode == 1 && PlayerControll.Player[SpecCam.FID] != null) { if (PlayerControll.Player[SpecCam.FID].Team == 0) { GUI2.DrawTextColorRes(rect, PlayerControll.Player[SpecCam.FID].Name, TextAnchor.MiddleCenter, _Color.Red, 1, 12, true); } else if (PlayerControll.Player[SpecCam.FID].Team == 1) { GUI2.DrawTextColorRes(rect, PlayerControll.Player[SpecCam.FID].Name, TextAnchor.MiddleCenter, _Color.Blue, 1, 12, true); } if (SpecCam.FID == C4.diffuserId) { this.DrawDiffuseBar(); } } else { GUI2.DrawTextColorRes(rect, Lang.Get("_FREECAM"), TextAnchor.MiddleCenter, _Color.White, 1, 12, true); } this.DrawTVBars(); return; } GUI.DrawTexture(this.rHealthBack, this.tGradientLeft); GUI.DrawTexture(this.rAmmoBack, this.tGradientRight); if (HUD.bombState != 0) { GUI.DrawTexture(this.rBombBack, this.tGradientRight); } GUI.DrawTexture(this.rHealthIcon, this.tHealthIcon); GUI2.DrawTextRes(this.rHealthNumber, HUD.sHealth, TextAnchor.MiddleLeft, _Color.White, 0, 28, true); GUI.DrawTexture(this.rArmorIcon, this.tArmorIcon); GUI2.DrawTextRes(this.rArmorNumber, HUD.sArmor, TextAnchor.MiddleLeft, _Color.White, 0, 28, true); GUI.DrawTexture(this.rGrenBack, this.tGradientRight); if (BasePlayer.fg > 0) { if (BasePlayer.selectedGrenade == 0) { GUI.DrawTexture(this.rFGIcon, this.tFGIconWhite); } else { GUI.DrawTexture(this.rFGIcon, this.tFGIconOrange); } } else { GUI.DrawTexture(this.rFGIcon, this.tFGIconGray); } if (BasePlayer.fb > 0) { if (BasePlayer.selectedGrenade == 1) { GUI.DrawTexture(this.rFBIcon, this.tFBIconWhite); } else { GUI.DrawTexture(this.rFBIcon, this.tFBIconOrange); } } else { GUI.DrawTexture(this.rFBIcon, this.tFBIconGray); } if (BasePlayer.sg > 0) { if (BasePlayer.selectedGrenade == 2) { GUI.DrawTexture(this.rSGIcon, this.tSGIconWhite); } else { GUI.DrawTexture(this.rSGIcon, this.tSGIconOrange); } } else { GUI.DrawTexture(this.rSGIcon, this.tSGIconGray); } if (HUD.bombState == 1) { GUI.DrawTexture(this.rBombIcon, this.tBombIconNormal); HUD.tBombIndic = 0f; } if (HUD.bombState == 2) { if (HUD.tBombIndic < HUD.tBombInterv) { GUI.DrawTexture(this.rBombIcon, this.tBombIconActive); } if (HUD.tBombIndic >= HUD.tBombInterv) { GUI.DrawTexture(this.rBombIcon, this.tBombIconNormal); } HUD.tBombIndic += Time.deltaTime; if (HUD.tBombIndic > HUD.tBombInterv * 2f) { HUD.tBombIndic = 0f; } } if (HUD.diffuseState == 1) { GUI.DrawTexture(this.rDefuseKitBack, this.tGradientRight); GUI.DrawTexture(this.rDiffuseIcon, this.tDiffuseIconNormal); } this.DrawDiffuseBar(); GUI.DrawTexture(this.rMoneyBack, this.tGradientLeft); GUI.DrawTexture(this.rMoneyIcon, this.tMoneyIcon); GUI2.DrawTextRes(this.rMoneyNumber, HUD.sMoney, TextAnchor.MiddleLeft, _Color.White, 0, 16, true); GUI.DrawTexture(this.rAmmoIcon, this.tAmmoIcon); if (BasePlayer.currweapon != null && WeaponData.GetData(BasePlayer.currweapon.data.wid).maxBackpack > 0) { GUI2.DrawTextRes(this.rAmmoNumber, BasePlayer.currweapon.sClip, TextAnchor.MiddleRight, _Color.White, 0, 28, true); GUI2.DrawTextRes(this.rAmmoNumber2, BasePlayer.sAmmo[BasePlayer.currweapon.data.ammoType], TextAnchor.MiddleCenter, _Color.White, 0, 16, true); } }