예제 #1
0
 public void OnResize()
 {
     TopBar.rButton[0] = new Rect((float)Screen.width / 2f - GUIM.YRES(10f) + GUIM.YRES(0f), 0f, GUIM.YRES(96f), GUIM.YRES(40f));
     TopBar.rButton[1] = new Rect((float)Screen.width / 2f - GUIM.YRES(10f) + GUIM.YRES(104f), 0f, GUIM.YRES(96f), GUIM.YRES(40f));
     TopBar.rButton[2] = new Rect((float)Screen.width / 2f - GUIM.YRES(10f) + GUIM.YRES(208f), 0f, GUIM.YRES(96f), GUIM.YRES(40f));
     TopBar.rClose     = new Rect((float)Screen.width - GUIM.YRES(32f), GUIM.YRES(11f), GUIM.YRES(18f), GUIM.YRES(18f));
 }
예제 #2
0
    private static void DrawBadge()
    {
        GUIM.DrawText(new Rect(Profile.rBackBadge.x, Profile.rBackBadge.y - GUIM.YRES(18f), Profile.rBackBadge.width, GUIM.YRES(18f)), Lang.Get("_BADGE"), TextAnchor.MiddleLeft, BaseColor.White, 1, 12, false);
        Profile.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y);
        GUIM.DrawBox(Profile.rBackBadge, Profile.tBlack);
        Rect position  = new Rect(Profile.rBackBadge.x + GUIM.YRES(8f), Profile.rBackBadge.y + GUIM.YRES(8f), GUIM.YRES(240f), GUIM.YRES(60f));
        Rect position2 = new Rect(Profile.rBackBadge.x + GUIM.YRES(4f) + GUIM.YRES(12f), Profile.rBackBadge.y + GUIM.YRES(8f), GUIM.YRES(60f), GUIM.YRES(60f));

        if (BaseData.badge_back == 0)
        {
            GUI.DrawTexture(position, Profile.tBadgeBack);
        }
        else
        {
            GUI.DrawTexture(position, MenuShop.shopdata[BaseData.badge_back].icon);
        }
        if (BaseData.badge_icon == 0)
        {
            GUI.color = new Color(0f, 0f, 0f, 0.5f);
            GUI.DrawTexture(position2, Profile.tBadgeIcon);
            GUI.color = Color.white;
        }
        else
        {
            GUI.DrawTexture(position2, MenuShop.shopdata[BaseData.badge_icon].icon);
        }
    }
예제 #3
0
    private static bool DrawPrice(Rect r, string cost, string gold, string goldbonus)
    {
        GUI.DrawTexture(r, MenuGold.tGray);
        Rect rect = r;

        r = new Rect(r.x, r.y, GUIM.YRES(128f), rect.height - GUIM.YRES(4f));
        GUIM.DrawText(r, gold, TextAnchor.MiddleRight, BaseColor.White, 1, 20, true);
        r = new Rect(r.x + GUIM.YRES(130f), r.y, rect.height, rect.height);
        GUI.DrawTexture(new Rect(r.x + GUIM.YRES(4f), r.y + GUIM.YRES(4f), r.width - GUIM.YRES(8f), r.height - GUIM.YRES(8f)), MenuGold.tGold);
        if (goldbonus != string.Empty)
        {
            r = new Rect(r.x + r.height, r.y, GUIM.YRES(96f), rect.height - GUIM.YRES(4f));
            GUIM.DrawText(r, goldbonus, TextAnchor.MiddleRight, BaseColor.White, 1, 20, true);
            r = new Rect(r.x + GUIM.YRES(98f), r.y, rect.height, rect.height);
            GUI.DrawTexture(new Rect(r.x + GUIM.YRES(4f), r.y + GUIM.YRES(4f), r.width - GUIM.YRES(8f), r.height - GUIM.YRES(8f)), MenuGold.tGold);
            r = new Rect(r.x + r.height + GUIM.YRES(4f), r.y, GUIM.YRES(96f), rect.height - GUIM.YRES(4f));
            GUIM.DrawText(r, Lang.Get("_BONUS"), TextAnchor.MiddleLeft, BaseColor.White, 1, 20, true);
        }
        r = new Rect(rect.x + rect.width - GUIM.YRES(140f), r.y, GUIM.YRES(140f), rect.height);
        GUI.DrawTexture(r, MenuGold.tBuy);
        if (GameData.gVK)
        {
            r = new Rect(r.x, r.y, r.width, r.height - GUIM.YRES(4f));
            GUIM.DrawText(new Rect(r.x, r.y, r.width - GUIM.YRES(72f), r.height), cost, TextAnchor.MiddleRight, BaseColor.White, 1, 20, true);
            GUI.DrawTexture(new Rect(r.x + GUIM.YRES(74f), r.y + GUIM.YRES(6f), GUIM.YRES(24f), GUIM.YRES(24f)), MenuGold.tVK);
        }
        if (GameData.gFB)
        {
            GUIM.DrawText(r, cost, TextAnchor.MiddleCenter, BaseColor.White, 1, 20, true);
        }
        return(GUIM.HideButton(r));
    }
예제 #4
0
    public static void Draw()
    {
        if (!MenuOptions.show)
        {
            return;
        }
        float num = Time.time - MenuOptions.showtime + 0.001f;

        if (num > 0.05f)
        {
            num = 0.05f;
        }
        num *= 20f;
        Matrix4x4 matrix = GUI.matrix;
        Vector3   s      = new Vector3(num, num, 1f);
        Vector3   pos    = new Vector3(MenuOptions.rBack.center.x - MenuOptions.rBack.center.x * num, MenuOptions.rBack.center.y - MenuOptions.rBack.center.y * num, 1f);

        GUI.matrix = Matrix4x4.TRS(pos, Quaternion.identity, s);
        GUIM.DrawBox(MenuOptions.rBack, MenuOptions.tBlack);
        GUIM.DrawBox(MenuOptions.rBackSave, MenuOptions.tBlack);
        MenuOptions.DrawButtonOption(0, new Rect(MenuOptions.rBack.x + GUIM.YRES(4f), MenuOptions.rBack.y + GUIM.YRES(4f), GUIM.YRES(120f), GUIM.YRES(24f)), Lang.Get("_VIDEO"));
        MenuOptions.DrawButtonOption(1, new Rect(MenuOptions.rBack.x + GUIM.YRES(4f) + GUIM.YRES(124f) * 1f, MenuOptions.rBack.y + GUIM.YRES(4f), GUIM.YRES(120f), GUIM.YRES(24f)), Lang.Get("_AUDIO"));
        MenuOptions.DrawButtonOption(2, new Rect(MenuOptions.rBack.x + GUIM.YRES(4f) + GUIM.YRES(124f) * 2f, MenuOptions.rBack.y + GUIM.YRES(4f), GUIM.YRES(120f), GUIM.YRES(24f)), Lang.Get("_GAME"));
        MenuOptions.DrawButtonOption(3, new Rect(MenuOptions.rBack.x + GUIM.YRES(4f) + GUIM.YRES(124f) * 3f, MenuOptions.rBack.y + GUIM.YRES(4f), GUIM.YRES(120f), GUIM.YRES(24f)), Lang.Get("_CONTROL"));
        if (MenuOptions.currCat == 0)
        {
            MenuOptions.DrawVideo();
        }
        else if (MenuOptions.currCat == 1)
        {
            MenuOptions.DrawAudio();
        }
        else if (MenuOptions.currCat == 2)
        {
            MenuOptions.DrawGame();
        }
        else if (MenuOptions.currCat == 3)
        {
            MenuOptions.DrawControl();
        }
        if (GUIM.Button(MenuOptions.rButtonSave, BaseColor.Blue, Lang.Get("_SAVE"), TextAnchor.MiddleCenter, BaseColor.White, 1, 12, true))
        {
            Options.Save();
            Options.Apply();
            Options.ApplyResolution();
            MenuOptions.saved = true;
            if (MenuOptions.ingame)
            {
                Options.ApplyInGame();
            }
            Main.lastwidth = 0f;
            HUD.lastwidth  = 0f;
        }
        if (MenuOptions.saved)
        {
            GUIM.DrawBox(MenuOptions.rBackSaved, MenuOptions.tBlack);
            GUIM.DrawText(MenuOptions.rBackSaved, Lang.Get("_OPTIONS_SAVED"), TextAnchor.MiddleCenter, BaseColor.Gray, 1, 12, false);
        }
        GUI.matrix = matrix;
    }
예제 #5
0
 private static void DrawControl()
 {
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 0f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), "W", ref vp_FPInput.control[0]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 1f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), "A", ref vp_FPInput.control[1]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 2f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), "S", ref vp_FPInput.control[2]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 3f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), "D", ref vp_FPInput.control[3]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 4f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), Lang.Get("_SPRINT"), ref vp_FPInput.control[4]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 5f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), Lang.Get("_CREEP"), ref vp_FPInput.control[20]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 6f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), Lang.Get("_JUMP"), ref vp_FPInput.control[5]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 7f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), Lang.Get("_CROUCH"), ref vp_FPInput.control[6]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 8f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), Lang.Get("_RELOAD"), ref vp_FPInput.control[7]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 9f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), Lang.Get("_LAST_WEAPON"), ref vp_FPInput.control[8]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 10f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), Lang.Get("_DROP_WEAPON"), ref vp_FPInput.control[11]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 11f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), Lang.Get("_FAST_KNIFE"), ref vp_FPInput.control[9]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 12f, MenuOptions.rBack.width / 2f - GUIM.YRES(80f), GUIM.YRES(24f)), Lang.Get("_THROW_GRENADE"), ref vp_FPInput.control[10]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(360f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 0f, MenuOptions.rBack.width / 2f - GUIM.YRES(76f), GUIM.YRES(24f)), Lang.Get("_CHOOSE_TEAM"), ref vp_FPInput.control[16]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(360f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 1f, MenuOptions.rBack.width / 2f - GUIM.YRES(76f), GUIM.YRES(24f)), Lang.Get("_SCOREBOARD"), ref vp_FPInput.control[17]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(360f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 2f, MenuOptions.rBack.width / 2f - GUIM.YRES(76f), GUIM.YRES(24f)), Lang.Get("_TEAM_CHAT"), ref vp_FPInput.control[18]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(360f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 3f, MenuOptions.rBack.width / 2f - GUIM.YRES(76f), GUIM.YRES(24f)), Lang.Get("_BUY_MENU"), ref vp_FPInput.control[19]);
     MenuOptions.DrawParamKey(new Rect(MenuOptions.rBack.x + GUIM.YRES(360f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 4f, MenuOptions.rBack.width / 2f - GUIM.YRES(76f), GUIM.YRES(24f)), Lang.Get("_AMMUNITION_BUY"), ref vp_FPInput.control[21]);
     if (GUIM.Button(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 15f, GUIM.YRES(120f), GUIM.YRES(24f)), BaseColor.Gray, Lang.Get("_RESET"), TextAnchor.MiddleCenter, BaseColor.White, 0, 14, false))
     {
         PlayerPrefs.DeleteKey("control");
         Options.LoadControl();
     }
 }
예제 #6
0
 public static void Draw()
 {
     GUI.DrawTexture(new Rect(0f, (float)Screen.height - GUIM.YRES(32f), (float)Screen.width, GUIM.YRES(32f)), BottomBar.tBlack);
     BottomBar.DrawButton(0, BottomBar.rButton[0], Lang.Get("_LANGUAGE"), BottomBar.tLang);
     BottomBar.DrawButton(1, BottomBar.rButton[1], Lang.Get("_MUTE"), BottomBar.tVolume);
     BottomBar.DrawButton(2, BottomBar.rButton[2], Lang.Get("_FULLSCREEN_F9"), BottomBar.tScreen);
 }
예제 #7
0
    private void OnResize()
    {
        int num = (int)GUIM.YRES(80f);

        BottomBar.rButton[0] = new Rect(GUIM.YRES(16f), (float)Screen.height - GUIM.YRES(32f), (float)num, GUIM.YRES(32f));
        BottomBar.rButton[1] = new Rect((float)(Screen.width - num * 2) - GUIM.YRES(8f) - GUIM.YRES(16f), (float)Screen.height - GUIM.YRES(32f), (float)num, GUIM.YRES(32f));
        BottomBar.rButton[2] = new Rect((float)(Screen.width - num) - GUIM.YRES(16f), (float)Screen.height - GUIM.YRES(32f), (float)num, GUIM.YRES(32f));
    }
예제 #8
0
 public void OnResize()
 {
     MenuShop.rBack       = new Rect((float)Screen.width / 2f + GUIM.YRES(47f), GUIM.YRES(80f), GUIM.YRES(420f), GUIM.YRES(565f));
     MenuShop.rBackHeader = new Rect(MenuShop.rBack.x, MenuShop.rBack.y, MenuShop.rBack.width, GUIM.YRES(160f));
     MenuShop.rBackBody   = new Rect(MenuShop.rBack.x, MenuShop.rBack.y + GUIM.YRES(170f), MenuShop.rBack.width, GUIM.YRES(395f));
     MenuShop.rBuy        = new Rect(MenuShop.rBackHeader.x + MenuShop.rBackHeader.width - GUIM.YRES(136f), MenuShop.rBackHeader.y + GUIM.YRES(120f), GUIM.YRES(120f), GUIM.YRES(24f));
     MenuShop.rView       = new Rect(MenuShop.rBackHeader.x + 16f, MenuShop.rBackHeader.y + GUIM.YRES(120f), GUIM.YRES(24f), GUIM.YRES(24f));
 }
예제 #9
0
 private static void DrawGame()
 {
     MenuOptions.DrawParamFloat(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 0f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_SENS"), ref Options.sens, 0.1f, 25f);
     MenuOptions.DrawParamFloat(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 1f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_ZOOM_SENS"), ref Options.zoomsens, 0.1f, 25f);
     MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 2f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_ZOOM_LOCK"), ref Options.zoomlock, null);
     MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 3f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_INVERT_MOUSE"), ref Options.invertmouse, null);
     MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 4f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_MOUSE_RAW_INPUT"), ref Options.rawinput, null);
     MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 5f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_LIGHT_GAME_BUY"), ref Options.gamebuy, null);
     MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 6f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_DYNAMIC_CROSSHAIR"), ref Options.dynamiccrosshair, null);
 }
예제 #10
0
    public static void DrawProfile()
    {
        GUIM.DrawText(new Rect(Profile.rBackProfile.x, Profile.rBackProfile.y - GUIM.YRES(18f), Profile.rBackProfile.width, GUIM.YRES(18f)), Lang.Get("_PROFILE"), TextAnchor.MiddleLeft, BaseColor.White, 1, 12, false);
        Profile.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y);
        BaseColor fontcolor = BaseColor.White;

        GUIM.DrawBox(Profile.rBackProfile, Profile.tBlack);
        if (Main.avatar == null)
        {
            GUI.DrawTexture(Profile.rAvatar, Profile.tBlack);
        }
        else
        {
            GUI.DrawTexture(Profile.rAvatar, Main.avatar);
        }
        if (GUIM.HideButton(Profile.rBackName) && !GameData.gSteam)
        {
            Profile.inEdit  = true;
            Profile.newname = BaseData.Name;
        }
        if (Profile.inEdit)
        {
            GUI.DrawTexture(Profile.rBackName, Profile.tGray);
            GUIM.DrawEdit(Profile.rBackName, ref Profile.newname, TextAnchor.MiddleCenter, BaseColor.White, 1, 14, true);
        }
        else
        {
            if (Profile.rBackName.Contains(Profile.mpos) && !GameData.gSteam)
            {
                GUI.DrawTexture(Profile.rBackName, Profile.tOrange);
            }
            else
            {
                GUI.DrawTexture(Profile.rBackName, Profile.tBlue);
            }
            GUIM.DrawText(Profile.rBackName, BaseData.Name, TextAnchor.MiddleCenter, fontcolor, 1, 14, true);
        }
        GUIM.DrawText(new Rect(Profile.rBackName.x, Profile.rBackProfile.y + GUIM.YRES(8f), Profile.rBackName.width, Profile.rBackName.height), Lang.Get("_NICKNAME"), TextAnchor.MiddleLeft, BaseColor.White, 1, 14, false);
        GUI.DrawTexture(new Rect(Profile.rBackProfile.x + GUIM.YRES(8f), Profile.rBackProfile.y + GUIM.YRES(80f), GUIM.YRES(48f), GUIM.YRES(24f)), Profile.tWhite);
        GUIM.DrawText(new Rect(Profile.rBackProfile.x + GUIM.YRES(8f), Profile.rBackProfile.y + GUIM.YRES(80f), GUIM.YRES(48f), GUIM.YRES(24f)), BaseData.Level, TextAnchor.MiddleCenter, BaseColor.Blue, 1, 14, false);
        GUI.DrawTexture(new Rect(Profile.rBackProfile.x + GUIM.YRES(58f), Profile.rBackProfile.y + GUIM.YRES(94f), GUIM.YRES(190f), GUIM.YRES(10f)), Profile.tGray);
        GUI.DrawTexture(new Rect(Profile.rBackProfile.x + GUIM.YRES(58f), Profile.rBackProfile.y + GUIM.YRES(94f), (float)BaseData.iProgress * 0.01f * GUIM.YRES(190f), GUIM.YRES(10f)), Profile.tOrange);
        GUIM.DrawText(new Rect(Profile.rBackProfile.x + GUIM.YRES(58f), Profile.rBackProfile.y + GUIM.YRES(80f), GUIM.YRES(190f), GUIM.YRES(12f)), BaseData.Progress, TextAnchor.MiddleRight, BaseColor.Gray, 1, 14, false);
        GUIM.DrawText(new Rect(Profile.rBackProfile.x + GUIM.YRES(58f), Profile.rBackProfile.y + GUIM.YRES(80f), GUIM.YRES(190f), GUIM.YRES(12f)), BaseData.EXPData, TextAnchor.MiddleLeft, BaseColor.Gray, 1, 14, false);
        if (GameData.gSteam)
        {
            return;
        }
        GUIM.DrawBox(Profile.rBackGold, Profile.tBlack);
        GUI.DrawTexture(new Rect(Profile.rBackGold.x + GUIM.YRES(14f), Profile.rBackGold.y + GUIM.YRES(6f), GUIM.YRES(30f), GUIM.YRES(30f)), Profile.tGold);
        GUIM.DrawText(new Rect(Profile.rBackGold.x + GUIM.YRES(50f), Profile.rBackGold.y + GUIM.YRES(1f), GUIM.YRES(110f), Profile.rBackGold.height - GUIM.YRES(4f)), BaseData.Gold, TextAnchor.MiddleLeft, BaseColor.White, 1, 20, false);
        Profile.DrawMenuButton(2, new Rect(Profile.rBackGold.x + GUIM.YRES(120f), Profile.rBackGold.y + GUIM.YRES(6f), GUIM.YRES(126f), GUIM.YRES(30f)), Profile.tGreen, Profile.tOrange);
        GUIM.DrawText(new Rect(Profile.rBackGold.x + GUIM.YRES(120f), Profile.rBackGold.y + GUIM.YRES(5f), GUIM.YRES(126f), GUIM.YRES(30f)), Lang.Get("_ADD_GOLD"), TextAnchor.MiddleCenter, BaseColor.White, 1, 14, true);
    }
예제 #11
0
    private static bool DrawParamFloat(Rect r, string text, ref float param, float min, float max)
    {
        float num = param;

        GUIM.DrawText(r, text, TextAnchor.MiddleLeft, BaseColor.White, 1, 12, true);
        param = GUIM.DrawSlider(new Rect(r.x + r.width - GUIM.YRES(240f), r.y + GUIM.YRES(6f), GUIM.YRES(200f), GUIM.YRES(24f)), (int)GUIM.YRES(200f), min, max, param);
        param = ((float)((int)(param * 10f)) + 0.05f) / 10f;
        GUI.DrawTexture(new Rect(r.x + r.width - GUIM.YRES(32f), r.y, GUIM.YRES(32f), GUIM.YRES(24f)), MenuOptions.tGray);
        GUIM.DrawText(new Rect(r.x + r.width - GUIM.YRES(32f), r.y, GUIM.YRES(32f), GUIM.YRES(24f)), param.ToString("0.0"), TextAnchor.MiddleCenter, BaseColor.White, 1, 12, true);
        return(param == num);
    }
예제 #12
0
 public void OnResize()
 {
     MenuOptions.rBack = new Rect((float)Screen.width / 2f - GUIM.YRES(165f), GUIM.YRES(80f), GUIM.YRES(632f), GUIM.YRES(525f));
     if (MenuOptions.ingame)
     {
         MenuOptions.rBack.center = new Vector2((float)Screen.width / 2f, (float)Screen.height / 2f);
     }
     MenuOptions.rBackSave   = new Rect(MenuOptions.rBack.x + MenuOptions.rBack.width - GUIM.YRES(200f), MenuOptions.rBack.y + MenuOptions.rBack.height + GUIM.YRES(8f), GUIM.YRES(200f), GUIM.YRES(32f));
     MenuOptions.rButtonSave = new Rect(MenuOptions.rBackSave.x + GUIM.YRES(4f), MenuOptions.rBackSave.y + GUIM.YRES(4f), GUIM.YRES(192f), GUIM.YRES(24f));
     MenuOptions.rBackSaved  = new Rect(MenuOptions.rBack.x, MenuOptions.rBack.y + MenuOptions.rBack.height + GUIM.YRES(8f), GUIM.YRES(200f), GUIM.YRES(32f));
 }
예제 #13
0
    public static void DrawButton(int state, string text, Rect r, Texture2D normal, Texture2D hover, Texture2D line)
    {
        TopBar.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y);
        Rect position = new Rect(r.x + (r.width - GUIM.YRES(50f)) / 2f, r.y - GUIM.YRES(8f), GUIM.YRES(50f), GUIM.YRES(50f));

        if (TopBar.clicktime[state] + 0.05f > Time.time)
        {
            GUI.DrawTexture(r, line);
            GUI.color = Color.black;
            GUI.DrawTexture(position, normal);
            GUI.color = Color.white;
            GUI.DrawTexture(new Rect(r.x, r.y + GUIM.YRES(38f), r.width, GUIM.YRES(16f)), line);
            GUIM.DrawText(new Rect(r.x, r.y + GUIM.YRES(38f), r.width, GUIM.YRES(16f)), text, TextAnchor.MiddleCenter, BaseColor.White, 1, 14, true);
        }
        else if (r.Contains(TopBar.mpos))
        {
            TopBar.buttontime[state] = Time.time;
            GUI.DrawTexture(position, hover);
            GUI.DrawTexture(new Rect(r.x, r.y + GUIM.YRES(38f), r.width, GUIM.YRES(16f)), line);
            GUIM.DrawText(new Rect(r.x, r.y + GUIM.YRES(38f), r.width, GUIM.YRES(16f)), text, TextAnchor.MiddleCenter, BaseColor.White, 1, 14, true);
            if (Input.GetMouseButton(0))
            {
                TopBar.clicktime[state] = Time.time;
            }
        }
        else
        {
            float num  = Time.time - TopBar.buttontime[state];
            float num2 = 16f - num * 100f;
            if (num2 < 2f)
            {
                num2 = 2f;
            }
            GUI.DrawTexture(position, normal);
            GUI.DrawTexture(new Rect(r.x, r.y + GUIM.YRES(38f), r.width, GUIM.YRES(num2)), line);
        }
        if (GUIM.HideButton(r))
        {
            Main.HideAll();
            if (state == 0)
            {
                MenuServers.SetActive(true);
            }
            if (state == 1)
            {
                MenuShop.SetActive(true);
            }
            if (state == 2)
            {
                MenuOptions.SetActive(true);
            }
        }
    }
예제 #14
0
 public static void DrawMenu()
 {
     GUIM.DrawText(new Rect(Profile.rBackMenu.x, Profile.rBackMenu.y - GUIM.YRES(18f), Profile.rBackMenu.width, GUIM.YRES(18f)), Lang.Get("_PLAYER_MENU"), TextAnchor.MiddleLeft, BaseColor.White, 1, 12, false);
     GUIM.DrawBox(Profile.rBackMenu, Profile.tBlack);
     Profile.DrawMenuButton(0, new Rect(Profile.rBackMenu.x + GUIM.YRES(2f), Profile.rBackMenu.y + GUIM.YRES(0f), GUIM.YRES(40f), GUIM.YRES(40f)), Profile.tPlayer[0], Profile.tPlayer[1]);
     Profile.DrawMenuButton(1, new Rect(Profile.rBackMenu.x + GUIM.YRES(2f) + GUIM.YRES(40f), Profile.rBackMenu.y + GUIM.YRES(0f), GUIM.YRES(40f), GUIM.YRES(40f)), Profile.tInventory[0], Profile.tInventory[1]);
     GUI.color = new Color(1f, 1f, 1f, 0.4f);
     GUI.DrawTexture(new Rect(Profile.rBackMenu.x + (GUIM.YRES(2f) + GUIM.YRES(40f)) * 2f, Profile.rBackMenu.y + GUIM.YRES(4f), GUIM.YRES(40f), GUIM.YRES(32f)), Profile.tBlack);
     GUI.DrawTexture(new Rect(Profile.rBackMenu.x + (GUIM.YRES(2f) + GUIM.YRES(40f)) * 3f, Profile.rBackMenu.y + GUIM.YRES(4f), GUIM.YRES(40f), GUIM.YRES(32f)), Profile.tBlack);
     GUI.DrawTexture(new Rect(Profile.rBackMenu.x + (GUIM.YRES(2f) + GUIM.YRES(40f)) * 4f, Profile.rBackMenu.y + GUIM.YRES(4f), GUIM.YRES(40f), GUIM.YRES(32f)), Profile.tBlack);
     GUI.DrawTexture(new Rect(Profile.rBackMenu.x + (GUIM.YRES(2f) + GUIM.YRES(40f)) * 5f, Profile.rBackMenu.y + GUIM.YRES(4f), GUIM.YRES(40f), GUIM.YRES(32f)), Profile.tBlack);
     GUI.color = Color.white;
 }
예제 #15
0
 public void OnResize()
 {
     MenuServers.rBack          = new Rect((float)Screen.width / 2f - GUIM.YRES(185f), GUIM.YRES(80f), GUIM.YRES(420f), GUIM.YRES(565f));
     MenuServers.rBackChannel   = new Rect(MenuServers.rBack.x + MenuServers.rBack.width + GUIM.YRES(12f), MenuServers.rBack.y, GUIM.YRES(200f), GUIM.YRES(28f) * (float)(MenuServers.CServerData.maxchannel + 1) + GUIM.YRES(4f));
     MenuServers.rBackPlay      = new Rect(MenuServers.rBack.x + MenuServers.rBack.width + GUIM.YRES(12f), MenuServers.rBack.y + MenuServers.rBack.height - GUIM.YRES(60f), GUIM.YRES(200f), GUIM.YRES(60f));
     MenuServers.rButtonPlay    = new Rect(MenuServers.rBackPlay.x + GUIM.YRES(4f), MenuServers.rBackPlay.y + GUIM.YRES(32f), MenuServers.rBackPlay.width - GUIM.YRES(8f), GUIM.YRES(24f));
     MenuServers.rButtonRefresh = new Rect(MenuServers.rBackPlay.x + GUIM.YRES(4f), MenuServers.rBackPlay.y + GUIM.YRES(4f), MenuServers.rBackPlay.width - GUIM.YRES(8f), GUIM.YRES(24f));
     MenuServers.rBackMode      = new Rect(MenuServers.rBackChannel.x, MenuServers.rBackChannel.y + MenuServers.rBackChannel.height + GUIM.YRES(28f), MenuServers.rBackChannel.width, GUIM.YRES(28f) * 3f + GUIM.YRES(4f));
     MenuServers.rButtonMode[0] = new Rect(MenuServers.rBackChannel.x + GUIM.YRES(4f), MenuServers.rBackChannel.y + MenuServers.rBackChannel.height + GUIM.YRES(28f) + GUIM.YRES(4f), MenuServers.rBackChannel.width - GUIM.YRES(8f), GUIM.YRES(24f));
     MenuServers.rButtonMode[1] = new Rect(MenuServers.rBackChannel.x + GUIM.YRES(4f), MenuServers.rBackChannel.y + MenuServers.rBackChannel.height + GUIM.YRES(28f) * 2f + GUIM.YRES(4f), MenuServers.rBackChannel.width - GUIM.YRES(8f), GUIM.YRES(24f));
     MenuServers.rButtonMode[2] = new Rect(MenuServers.rBackChannel.x + GUIM.YRES(4f), MenuServers.rBackChannel.y + MenuServers.rBackChannel.height + GUIM.YRES(28f) * 3f + GUIM.YRES(4f), MenuServers.rBackChannel.width - GUIM.YRES(8f), GUIM.YRES(24f));
     MenuServers.rButtonMode[3] = new Rect(MenuServers.rBackChannel.x + GUIM.YRES(4f), MenuServers.rBackChannel.y + MenuServers.rBackChannel.height + GUIM.YRES(28f) * 4f + GUIM.YRES(4f), MenuServers.rBackChannel.width - GUIM.YRES(8f), GUIM.YRES(24f));
 }
예제 #16
0
 public static void DrawText(Rect r, string text, TextAnchor pos, BaseColor fontcolor, int fontpos, int fontsize, bool fontshadow)
 {
     fontsize                = (int)GUIM.YRES((float)fontsize);
     GUIM.guistyle.font      = GUIM.fontlist[fontpos];
     GUIM.guistyle.alignment = pos;
     GUIM.guistyle.fontSize  = fontsize;
     if (fontshadow)
     {
         GUIM.guistyle.normal.textColor = GUIM.colorlist[0];
         GUI.Label(new Rect(r.x + 1f, r.y + 1f, r.width, r.height), text, GUIM.guistyle);
     }
     GUIM.guistyle.normal.textColor = GUIM.colorlist[(int)fontcolor];
     GUI.Label(r, text, GUIM.guistyle);
 }
예제 #17
0
 private void OnResize()
 {
     Profile.rBackMenu    = new Rect((float)Screen.width / 2f - GUIM.YRES(460f), GUIM.YRES(110f), GUIM.YRES(256f), GUIM.YRES(40f));
     Profile.rBackProfile = new Rect((float)Screen.width / 2f - GUIM.YRES(460f), GUIM.YRES(170f), GUIM.YRES(256f), GUIM.YRES(112f));
     if (GameData.gSteam)
     {
         Profile.rBackGold = new Rect(0f, 0f, 0f, 0f);
     }
     else
     {
         Profile.rBackGold = new Rect((float)Screen.width / 2f - GUIM.YRES(460f), GUIM.YRES(286f), GUIM.YRES(256f), GUIM.YRES(42f));
     }
     Profile.rBackBadge = new Rect((float)Screen.width / 2f - GUIM.YRES(460f), GUIM.YRES(302f) + Profile.rBackGold.height + GUIM.YRES(4f), GUIM.YRES(256f), GUIM.YRES(76f));
     Profile.rBackMask  = new Rect((float)Screen.width / 2f - GUIM.YRES(460f), GUIM.YRES(398f) + Profile.rBackGold.height + GUIM.YRES(4f), GUIM.YRES(256f), GUIM.YRES(76f));
     Profile.rBackName  = new Rect(Profile.rBackProfile.x + GUIM.YRES(80f), Profile.rBackProfile.y + GUIM.YRES(32f), GUIM.YRES(168f), GUIM.YRES(24f));
     Profile.rAvatar    = new Rect(Profile.rBackProfile.x + GUIM.YRES(8f), Profile.rBackProfile.y + GUIM.YRES(8f), GUIM.YRES(64f), GUIM.YRES(64f));
 }
예제 #18
0
 public static void Draw()
 {
     if (!MenuPlayer.show)
     {
         return;
     }
     GUI.color = new Color(1f, 1f, 1f, 0.8f);
     GUI.DrawTexture(new Rect((float)Screen.width / 2f + GUIM.YRES(180f), GUIM.YRES(96f), GUIM.YRES(16f), GUIM.YRES(16f)), MenuPlayer.tBlack);
     GUI.DrawTexture(new Rect((float)Screen.width / 2f + GUIM.YRES(180f) + GUIM.YRES(20f), GUIM.YRES(96f), GUIM.YRES(16f), GUIM.YRES(16f)), MenuPlayer.tBlack);
     GUI.color = Color.white;
     if (GUIM.Button(new Rect((float)Screen.width / 2f + GUIM.YRES(180f) + 2f, GUIM.YRES(96f) + 2f, GUIM.YRES(16f) - 4f, GUIM.YRES(16f) - 4f), BaseColor.Orange, string.Empty, TextAnchor.MiddleCenter, BaseColor.White, 0, 0, false))
     {
         MenuPlayer.ChangePlayer(0, 8, 22);
     }
     if (GUIM.Button(new Rect((float)Screen.width / 2f + GUIM.YRES(180f) + GUIM.YRES(20f) + 2f, GUIM.YRES(96f) + 2f, GUIM.YRES(16f) - 4f, GUIM.YRES(16f) - 4f), BaseColor.Blue, string.Empty, TextAnchor.MiddleCenter, BaseColor.White, 0, 0, false))
     {
         MenuPlayer.ChangePlayer(1, 8, 22);
     }
 }
예제 #19
0
    public static void DrawBox(Rect r, Texture2D t)
    {
        int num = (int)GUIM.YRES(1f);

        if (num < 0)
        {
            num = 1;
        }
        GUI.color = new Color(1f, 1f, 1f, 0.4f);
        GUI.DrawTexture(new Rect(r.x - (float)num, r.y - (float)num, r.width + (float)(num * 2), r.height + (float)(num * 2)), t);
        GUI.color = new Color(1f, 1f, 1f, 0.4f);
        GUI.DrawTexture(r, t);
        GUI.color = new Color(1f, 1f, 1f, 0.2f);
        GUI.DrawTexture(new Rect(r.x, r.y - (float)(num * 2), r.width, (float)num), t);
        GUI.DrawTexture(new Rect(r.x, r.y + r.height + (float)num, r.width, (float)num), t);
        GUI.DrawTexture(new Rect(r.x - (float)(num * 2), r.y, (float)num, r.height), t);
        GUI.DrawTexture(new Rect(r.x + r.width + (float)num, r.y, (float)num, r.height), t);
        GUI.color = Color.white;
    }
예제 #20
0
 private static void DrawMask()
 {
     GUIM.DrawText(new Rect(Profile.rBackMask.x, Profile.rBackMask.y - GUIM.YRES(18f), Profile.rBackMask.width, GUIM.YRES(18f)), Lang.Get("_MASKS"), TextAnchor.MiddleLeft, BaseColor.White, 1, 12, false);
     GUIM.DrawBox(Profile.rBackMask, Profile.tBlack);
     if (BaseData.mask_merc == 0)
     {
         GUI.DrawTexture(new Rect(Profile.rBackMask.x + GUIM.YRES(32f), Profile.rBackMask.y + GUIM.YRES(8f), GUIM.YRES(60f), GUIM.YRES(60f)), Profile.tMercMask);
     }
     else
     {
         GUI.DrawTexture(new Rect(Profile.rBackMask.x + GUIM.YRES(32f), Profile.rBackMask.y + GUIM.YRES(8f), GUIM.YRES(60f), GUIM.YRES(60f)), MenuShop.shopdata[BaseData.mask_merc].icon);
     }
     if (BaseData.mask_warcorp == 0)
     {
         GUI.DrawTexture(new Rect(Profile.rBackMask.x + Profile.rBackMask.width - GUIM.YRES(92f), Profile.rBackMask.y + GUIM.YRES(8f), GUIM.YRES(60f), GUIM.YRES(60f)), Profile.tCorpMask);
     }
     else
     {
         GUI.DrawTexture(new Rect(Profile.rBackMask.x + Profile.rBackMask.width - GUIM.YRES(92f), Profile.rBackMask.y + GUIM.YRES(8f), GUIM.YRES(60f), GUIM.YRES(60f)), MenuShop.shopdata[BaseData.mask_warcorp].icon);
     }
 }
예제 #21
0
    public static void Draw()
    {
        if (!MenuFriends.show)
        {
            return;
        }
        GUIM.DrawText(new Rect((float)Screen.width / 2f + GUIM.YRES(240f), GUIM.YRES(110f) - GUIM.YRES(18f), GUIM.YRES(200f), GUIM.YRES(18f)), Lang.Get("_FRIENDS"), TextAnchor.MiddleLeft, BaseColor.White, 1, 12, false);
        int num  = (int)GUIM.YRES(36f);
        int num2 = (int)GUIM.YRES(4f);
        int num3 = 0;
        int num4 = MenuFriends.currpage * 14;
        int num5 = (MenuFriends.currpage + 1) * 14;

        if (num5 > MenuFriends.friendlistorder.Count)
        {
            num5 = MenuFriends.friendlistorder.Count;
        }
        for (int i = num4; i < num5; i++)
        {
            MenuFriends.DrawFriend(new Rect((float)Screen.width / 2f + GUIM.YRES(240f), GUIM.YRES(110f) + (float)((num + num2) * num3), GUIM.YRES(200f), (float)num), MenuFriends.friendlistorder[i]);
            num3++;
        }
        if (GUIM.Button(new Rect((float)Screen.width / 2f + GUIM.YRES(396f), GUIM.YRES(110f) - GUIM.YRES(18f), GUIM.YRES(20f), GUIM.YRES(16f)), BaseColor.Black, "<", TextAnchor.MiddleCenter, BaseColor.Gray, 1, 16, false))
        {
            MenuFriends.currpage--;
            if (MenuFriends.currpage < 0)
            {
                MenuFriends.currpage = 0;
            }
        }
        if (GUIM.Button(new Rect((float)Screen.width / 2f + GUIM.YRES(396f) + GUIM.YRES(24f), GUIM.YRES(110f) - GUIM.YRES(18f), GUIM.YRES(20f), GUIM.YRES(16f)), BaseColor.Black, ">", TextAnchor.MiddleCenter, BaseColor.Gray, 1, 16, false))
        {
            MenuFriends.currpage++;
            if (MenuFriends.currpage > MenuFriends.friendlistorder.Count / 14)
            {
                MenuFriends.currpage = MenuFriends.friendlistorder.Count / 14;
            }
        }
    }
예제 #22
0
 public static void Draw()
 {
     GUI.DrawTexture(new Rect(0f, 0f, (float)Screen.width, GUIM.YRES(40f)), TopBar.tBlack);
     TopBar.rHeader_logo = new Rect(0f, 4f, 256f, 32f);
     GUIM.DrawTextureX(TopBar.rHeader_logo, TopBar.tHeader_logo);
     TopBar.DrawButton(0, Lang.Get("_PLAY"), TopBar.rButton[0], TopBar.tPlay[0], TopBar.tPlay[1], TopBar.tOrange);
     TopBar.DrawButton(1, Lang.Get("_SHOP"), TopBar.rButton[1], TopBar.tShop[0], TopBar.tShop[1], TopBar.tGreen);
     TopBar.DrawButton(2, Lang.Get("_OPTIONS"), TopBar.rButton[2], TopBar.tOptions[0], TopBar.tOptions[1], TopBar.tBlue);
     if (GameData.gSteam)
     {
         TopBar.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y);
         if (TopBar.rClose.Contains(TopBar.mpos))
         {
             GUI.color = Color.red;
         }
         GUI.DrawTexture(TopBar.rClose, TopBar.tClose);
         GUI.color = Color.white;
         if (GUIM.HideButton(TopBar.rClose))
         {
             Application.Quit();
         }
     }
 }
예제 #23
0
    private static void DrawParamKey(Rect r, string text, ref KeyCode param)
    {
        GUIM.DrawText(r, text, TextAnchor.MiddleLeft, BaseColor.White, 1, 12, true);
        Rect r2   = new Rect(r.x + r.width - GUIM.YRES(80f), r.y, GUIM.YRES(80f), GUIM.YRES(24f));
        bool flag = GUIM.Button(r2, BaseColor.Gray, param.ToString(), TextAnchor.MiddleCenter, BaseColor.White, 1, 14, false);

        if (flag)
        {
            MenuOptions.WaitKey  = true;
            MenuOptions.rWaitKey = r;
        }
        if (MenuOptions.WaitKey && MenuOptions.rWaitKey == r)
        {
            GUIM.Button(r2, BaseColor.Red, "_", TextAnchor.MiddleCenter, BaseColor.White, 1, 14, false);
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                MenuOptions.WaitKey = false;
            }
            for (int i = 0; i < 32; i++)
            {
                if (vp_FPInput.control[i] == Event.current.keyCode)
                {
                    return;
                }
            }
            if (Event.current.isKey)
            {
                param = Event.current.keyCode;
                MenuOptions.WaitKey = false;
            }
            if (Event.current.shift)
            {
                param = KeyCode.LeftShift;
                MenuOptions.WaitKey = false;
            }
        }
    }
예제 #24
0
    private static void DrawFriend(Rect r, MenuFriends.FriendData f)
    {
        if (f == null)
        {
            return;
        }
        int num = (int)GUIM.YRES(2f);

        GUIM.DrawBox(r, MenuFriends.tBlack);
        if (f.avatar != null)
        {
            GUI.DrawTexture(new Rect(r.x + (float)num, r.y + (float)num, GUIM.YRES(32f), GUIM.YRES(32f)), f.avatar);
        }
        GUIM.DrawText(new Rect(r.x + GUIM.YRES(40f), r.y + (float)num, GUIM.YRES(140f), GUIM.YRES(20f)), f.name, TextAnchor.MiddleLeft, BaseColor.White, 1, 14, false);
        if (f.ingame)
        {
            GUIM.DrawText(new Rect(r.x + GUIM.YRES(40f), r.y + GUIM.YRES(16f), GUIM.YRES(140f), GUIM.YRES(20f)), "WARMODE", TextAnchor.MiddleLeft, BaseColor.Yellow, 0, 12, false);
        }
        else
        {
            string state = MenuFriends.GetState(f.state);
            GUIM.DrawText(new Rect(r.x + GUIM.YRES(40f), r.y + GUIM.YRES(16f), GUIM.YRES(140f), GUIM.YRES(20f)), state, TextAnchor.MiddleLeft, BaseColor.Gray, 0, 12, false);
        }
    }
예제 #25
0
 private void OnResize()
 {
     MenuPreview.rBack       = new Rect((float)Screen.width / 2f - GUIM.YRES(165f), GUIM.YRES(80f), GUIM.YRES(632f), GUIM.YRES(525f));
     MenuPreview.rBackSave   = new Rect(MenuPreview.rBack.x + MenuPreview.rBack.width - GUIM.YRES(200f), MenuPreview.rBack.y + MenuPreview.rBack.height + GUIM.YRES(8f), GUIM.YRES(200f), GUIM.YRES(32f));
     MenuPreview.rButtonSave = new Rect(MenuPreview.rBackSave.x + GUIM.YRES(4f), MenuPreview.rBackSave.y + GUIM.YRES(4f), GUIM.YRES(192f), GUIM.YRES(24f));
 }
예제 #26
0
    public static void DrawTextureX(Rect r, Texture2D tex)
    {
        Rect position = new Rect(GUIM.YRES(r.x), GUIM.YRES(r.y), GUIM.YRES(r.width), GUIM.YRES(r.height));

        GUI.DrawTexture(position, tex);
    }
예제 #27
0
    private static bool DrawParamInt(Rect r, string text, ref int param, string[] options)
    {
        bool      result    = false;
        BaseColor fontcolor = BaseColor.White;

        if (options == null && param == 0)
        {
            fontcolor = BaseColor.Gray;
        }
        GUIM.DrawText(r, text, TextAnchor.MiddleLeft, fontcolor, 1, 12, true);
        if (options == null)
        {
            Rect r2 = new Rect(r.x + r.width - GUIM.YRES(68f), r.y, GUIM.YRES(32f), GUIM.YRES(24f));
            bool flag;
            if (param == 1)
            {
                flag = GUIM.Button(r2, BaseColor.White, MenuOptions.trigger[1], TextAnchor.MiddleCenter, BaseColor.Blue, 1, 10, false);
            }
            else
            {
                flag = GUIM.Button(r2, BaseColor.Gray, MenuOptions.trigger[1], TextAnchor.MiddleCenter, BaseColor.White, 1, 10, false);
            }
            if (flag)
            {
                param  = 1;
                result = true;
            }
            Rect r3 = new Rect(r.x + r.width - GUIM.YRES(32f), r.y, GUIM.YRES(32f), GUIM.YRES(24f));
            if (param == 0)
            {
                flag = GUIM.Button(r3, BaseColor.White, MenuOptions.trigger[0], TextAnchor.MiddleCenter, BaseColor.Blue, 1, 10, false);
            }
            else
            {
                flag = GUIM.Button(r3, BaseColor.Gray, MenuOptions.trigger[0], TextAnchor.MiddleCenter, BaseColor.White, 1, 10, false);
            }
            if (flag)
            {
                param  = 0;
                result = true;
            }
        }
        else if (options.Length >= 1)
        {
            Rect rect = new Rect(r.x + r.width - GUIM.YRES(32f) - GUIM.YRES(4f) - GUIM.YRES(200f), r.y, GUIM.YRES(200f), GUIM.YRES(24f));
            GUI.DrawTexture(rect, MenuOptions.tGray);
            GUIM.DrawText(rect, options[param], TextAnchor.MiddleCenter, BaseColor.White, 1, 12, true);
            Rect rect2 = new Rect(rect.x - GUIM.YRES(4f) - GUIM.YRES(32f), r.y, GUIM.YRES(32f), GUIM.YRES(24f));
            GUI.DrawTexture(rect2, MenuOptions.tGray);
            bool flag = GUIM.Button(rect2, BaseColor.Gray, "-", TextAnchor.MiddleCenter, BaseColor.White, 1, 16, false);
            if (flag)
            {
                param--;
                result = true;
            }
            Rect r4 = new Rect(r.x + r.width - GUIM.YRES(32f), r.y, GUIM.YRES(32f), GUIM.YRES(24f));
            flag = GUIM.Button(r4, BaseColor.Gray, "+", TextAnchor.MiddleCenter, BaseColor.White, 1, 16, false);
            if (flag)
            {
                param++;
                result = true;
            }
            if (param < 0)
            {
                param  = 0;
                result = false;
            }
            if (param >= options.Length)
            {
                param  = options.Length - 1;
                result = false;
            }
        }
        return(result);
    }
예제 #28
0
 private static void DrawAudio()
 {
     MenuOptions.DrawParamFloat(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 0f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_GAME_VOLUME"), ref Options.gamevol, 0f, 1f);
     MenuOptions.DrawParamFloat(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 1f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_MENU_VOLUME"), ref Options.menuvol, 0f, 1f);
 }
예제 #29
0
    private static void DrawVideo()
    {
        MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 0f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_DISPLAY_RESOLUTION"), ref Options.resolution, MenuOptions.restring);
        if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 1f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_PRESET"), ref Options.preset, MenuOptions.presetname))
        {
            if (Options.preset == 3)
            {
                Options.preset = 2;
            }
            if (Options.preset == 0)
            {
                Options.shadows         = 0;
                Options.antialiasing    = 0;
                Options.colorcorrection = 1;
                Options.posteffects     = 0;
                Options.ssao            = 0;
                Options.sharpness       = 0;
                Options.noise           = 0;
                Options.tone            = 0;
                Options.vig             = 0;
                Options.vsync           = 0;
            }
            if (Options.preset == 1)
            {
                Options.shadows         = 1;
                Options.antialiasing    = 0;
                Options.colorcorrection = 1;
                Options.posteffects     = 0;
                Options.ssao            = 0;
                Options.sharpness       = 0;
                Options.noise           = 0;
                Options.tone            = 0;
                Options.vig             = 0;
                Options.vsync           = 0;
            }
            if (Options.preset == 2)
            {
                Options.shadows         = 2;
                Options.antialiasing    = 1;
                Options.colorcorrection = 1;
                Options.posteffects     = 1;
                Options.ssao            = 1;
                Options.sharpness       = 1;
                Options.noise           = 1;
                Options.tone            = 1;
                Options.vig             = 1;
                Options.vsync           = 1;
            }
        }
        bool flag = false;

        if (MenuOptions.DrawParamFloat(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 2f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_BRIGHTNESS"), ref Options.brightness, 0.5f, 2f))
        {
            flag = true;
        }
        if (MenuOptions.DrawParamFloat(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(48f) + GUIM.YRES(28f) * 3f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_GAMMA"), ref Options.gamma, 0.5f, 2f))
        {
            flag = true;
        }
        if (flag)
        {
            Options.ApplyBrightness();
        }
        if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 5f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_SHADOWS_QUALITY"), ref Options.shadows, MenuOptions.sname))
        {
            Options.preset = 3;
        }
        if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 6f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_ANTI_ALIASING"), ref Options.antialiasing, MenuOptions.aaname))
        {
            Options.preset = 3;
        }
        if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 7f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_VSYNC"), ref Options.vsync, null))
        {
            Options.preset = 3;
        }
        if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 8f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_COLOR_CORRECTION"), ref Options.colorcorrection, null))
        {
            Options.preset = 3;
        }
        if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 9f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_POSTEFFECTS"), ref Options.posteffects, null))
        {
            Options.preset = 3;
        }
        if (Options.posteffects == 1)
        {
            if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 10f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_SSAO"), ref Options.ssao, null))
            {
                Options.preset = 3;
            }
            if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 11f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_SHARPNESS"), ref Options.sharpness, null))
            {
                Options.preset = 3;
            }
            if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 12f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_NOISE"), ref Options.noise, null))
            {
                Options.preset = 3;
            }
            if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 13f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_TONE"), ref Options.tone, null))
            {
                Options.preset = 3;
            }
            if (MenuOptions.DrawParamInt(new Rect(MenuOptions.rBack.x + GUIM.YRES(32f), MenuOptions.rBack.y + GUIM.YRES(64f) + GUIM.YRES(28f) * 14f, MenuOptions.rBack.width - GUIM.YRES(64f), GUIM.YRES(24f)), Lang.Get("_VIG"), ref Options.vig, null))
            {
                Options.preset = 3;
            }
        }
    }
예제 #30
0
    public void OnResize()
    {
        MenuBanList.rBack = new Rect((float)Screen.width / 2f - GUI2.YRES(200f), (float)Screen.height / 2f - GUI2.YRES(210f), GUI2.YRES(400f), GUI2.YRES(360f));
        float num  = GUI2.YRES(10f);
        float num2 = GUI2.YRES(10f);
        float num3 = GUI2.YRES(19f);
        float num4 = GUI2.YRES(6f);
        float num5 = GUI2.YRES(1f);

        for (int i = 0; i < 16; i++)
        {
            MenuBanList.rPlayerID[i]   = new Rect(num + MenuBanList.rBack.x, num2 + MenuBanList.rBack.y + num3 * (float)i, GUIM.YRES(40f), GUIM.YRES(20f));
            MenuBanList.rPlayerName[i] = new Rect(num + MenuBanList.rPlayerID[i].xMax + num4, num2 + MenuBanList.rBack.y + num3 * (float)i, GUIM.YRES(280f), GUIM.YRES(20f));
            MenuBanList.rPlayerSID[i]  = new Rect(num + MenuBanList.rPlayerName[i].xMax + num4, num2 + MenuBanList.rBack.y + num3 * (float)i, GUIM.YRES(200f), GUIM.YRES(20f));
            MenuBanList.rPlayerBack[i] = new Rect(MenuBanList.rPlayerID[i].x - num5, MenuBanList.rPlayerID[i].y - num5, MenuBanList.rPlayerSID[i].xMax - MenuBanList.rPlayerID[i].x + num5 * 2f, MenuBanList.rPlayerName[i].yMax - MenuBanList.rPlayerID[i].y + num5 * 2f);
        }
        MenuBanList.rKickButton = new Rect((float)Screen.width / 2f - GUI2.YRES(90f) / 2f - GUI2.YRES(80f), (float)Screen.height - GUI2.YRES(125f), GUI2.YRES(90f), GUI2.YRES(20f));
        MenuBanList.rBanButton  = new Rect((float)Screen.width / 2f - GUI2.YRES(90f) / 2f + GUI2.YRES(80f), (float)Screen.height - GUI2.YRES(125f), GUI2.YRES(90f), GUI2.YRES(20f));
    }