Ejemplo n.º 1
0
 private void AddMenuStats(ref CuiElementContainer MenuElement, string panel, Challenges type, float left, float bottom, float right, float top)
 {
     if (configData.ChallengeSettings[type].Enabled)
     {
         PCUI.CreatePanel(ref MenuElement, UIPanel, UIColors["light"], $"{left} {bottom}", $"{right} {top}");
         PCUI.CreateLabel(ref MenuElement, UIPanel, "", GetLeaders(type), 16, $"{left + 0.005f} {bottom + 0.01f}", $"{right - 0.005f} {top - 0.01f}", TextAnchor.UpperLeft);
     }
 }
Ejemplo n.º 2
0
        private void CreateMenu(BasePlayer player)
        {
            CloseMap(player);
            CuiHelper.DestroyUi(player, UIPanel);
            var MenuElement = PCUI.CreateElementContainer(UIMain, UIColors["dark"], "0 0", "1 1", true);

            PCUI.CreatePanel(ref MenuElement, UIMain, UIColors["light"], "0.005 0.93", "0.995 0.99");
            PCUI.CreateLabel(ref MenuElement, UIMain, "", $"<color={configData.Colors.MSG_ColorMain}>{MSG("UITitle").Replace("{Version}", Version.ToString())}</color>", 22, "0.05 0.93", "0.6 0.99", TextAnchor.MiddleLeft);

            CuiHelper.AddUi(player, MenuElement);
            CreateMenuContents(player, 0);
        }
Ejemplo n.º 3
0
        private void AddMenuStats(ref CuiElementContainer MenuElement, string panel, string type, string posMinA, string posMaxA, string posMinB, string posMaxB)
        {
            var entry = GetTypeFromString(type);

            if (entry != null)
            {
                var ctype = (CTypes)entry;
                if (configData.ActiveChallengeTypes[type])
                {
                    PCUI.CreatePanel(ref MenuElement, UIPanel, UIColors["light"], posMinA, posMaxA);
                    PCUI.CreateLabel(ref MenuElement, UIPanel, "", GetLeaders(ctype), 16, posMinB, posMaxB, TextAnchor.UpperLeft);
                }
            }
        }