Иконка ресурса

FREE WelcomeController : 2.0.8 2.0.8

Нет прав для скачивания
C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
using Oxide.Game.Rust.Cui;
using System;
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
using Oxide.Core;
using Newtonsoft.Json;
using Oxide.Core.Plugins;
using System.Globalization;
using Oxide.Core.Libraries;
using System.Text.RegularExpressions;
namespace Oxide.Plugins {
    [Info("WelcomeController", "Amino", "2.0.8")]
    [Description("An advanced info panel system")]
    public class WelcomeController : RustPlugin {
        [PluginReference]
        Plugin ImageLibrary, ServerRewards, Economics;
#region [ CONFIG ]
        public class Configuration {
            [JsonProperty(PropertyName = "Display UI on server join")]
            public bool DisplayOnJoin {
                get;
                set;
            }
            = true;
            [JsonProperty(PropertyName = "Use social link display ( Requires Welcome UI Additions )")]
            public bool UseLinks = false;
            public string AddonInfo {
                get;
                set;
            }
            = "Accepted plugins (KitController, LoadoutController, ServersController, SkinController, ShopController, StatsController, WUIAttachments)";
            public List<InfoPanelSettings> UIPanels {
                get;
                set;
            }
            = new List<InfoPanelSettings>();
            public KeyValuePair<string, ThemeSettings> CurrentTheme {
                get;
                set;
            }
            = new KeyValuePair<string, ThemeSettings>();
            public Dictionary<string, List<DefaultColors>> ThemeColors {
                get;
                set;
            }
            = new Dictionary<string, List<DefaultColors>>();
            public List<string> CustomColors {
                get;
                set;
            }
            = new List<string>();
            public Dictionary<string, ThemeSettings> CustomThemes {
                get;
                set;
            }
            = new Dictionary<string, ThemeSettings>();
            public static Configuration DefaultConfig() {
                return new Configuration() {
                    UIPanels = new List<InfoPanelSettings>() {
                        new InfoPanelSettings() {
                            Commands = {
                                "info", "welcome"
                            }
                            , ButtonName = "INFO", Enabled = true, PagePosition = 0, PanelName = "INFO", PanelSettings = new PanelSettings() {
                                PanelPages = new List<List<string>> {
                                    new List<string> {
                                        "[color=#5cffa8][size=35]RUST ADMIN ACADEMY[/size][/color]", "[size=30]WIPE SCHEDULE: [color=#5cffa8]Monday's and Friday's[/color] @ [color=#5cffa8]4PM[/color] (ET)[/size]", "", "[color=#5cffa8][size=25]SERVER INFO:[/size][/color]", "[size=20]- 10x Gather Rates", "- NoBPs", "- Mazes", "- Custom UI", "- Instant Barrels[/size]", "", "[color=#5cffa8][size=25]LINKS:[/size][/color]", "[size=20]DISCORD: [color=#5cffa8]discord.srtbull.com[/color]", "STORE: [color=#5cffa8]store.yourstore.com[/color]", "LINKING: [color=#5cffa8]link.yoursite.com[/color][/size]"
                                    }
                                }
                            }
                        }
                        , new InfoPanelSettings() {
                            Commands = {
                                "rules"
                            }
                            , ButtonName = "RULES", Enabled = true, PagePosition = 1, PanelName = "RULES", PanelSettings = new PanelSettings() {
                                PanelPages = new List<List<string>> {
                                    new List<string> {
                                        "[color=#5cffa8][size=35>]RULES[/size][/color]", "- Rule 1", "- Rule 2"
                                    }
                                }
                            }
                        }
                        , new InfoPanelSettings() {
                            Commands = {
                                "kits"
                            }
                            , ButtonName = "KITS", Enabled = true, PagePosition = 2, PanelName = "KITS", AddonSettings = new AddonSettings() {
                                AddonName = "KitController"
                            }
                        }
                        , new InfoPanelSettings() {
                            Commands = {
                                "shop"
                            }
                            , ButtonName = "SHOP", Enabled = true, PagePosition = 2, PanelName = "SHOP", AddonSettings = new AddonSettings() {
                                AddonName = "ShopController"
                            }
                        }
                    }
                }
                ;
            }
        }
        public class PanelSettings {
            [JsonProperty(Order = 0, PropertyName = "Panel Image")]
            public string PanelImage {
                get;
                set;
            }
            = String.Empty;
            [JsonProperty(Order = 0, PropertyName = "Text Panel Image (Covers entire text panel)")]
            public string TextPanelImage {
                get;
                set;
            }
            = String.Empty;
            [JsonProperty(Order = 0, PropertyName = "Panel Pages")]
            public List<List<string>> PanelPages = new List<List<string>>();
            public PanelSettings Clone() {
                return new PanelSettings {
                    TextPanelImage = this.TextPanelImage, PanelImage = this.PanelImage, PanelPages = this.PanelPages.Select(page => new List<string>(page)).ToList()
                }
                ;
            }
        }
        public class InfoPanelSettings {
            public bool Enabled {
                get;
                set;
            }
            = true;
            [JsonProperty(Order = 0, PropertyName = "Panel Name")]
            public string PanelName {
                get;
                set;
            }
            [JsonProperty(Order = 0, PropertyName = "Button Name")]
            public string ButtonName {
                get;
                set;
            }
            [JsonProperty(Order = 0, PropertyName = "Panel Commands")]
            public List<string> Commands = new List<string>();
            [JsonProperty(Order = 0, PropertyName = "Panel Permission")]
            public string PanelPermission {
                get;
                set;
            }
            = String.Empty;
            [JsonProperty(Order = 0, PropertyName = "Show No Permission Panel")]
            public bool ShowPanelPermission {
                get;
                set;
            }
            = true;
            [JsonProperty(Order = 0, PropertyName = "Panel No Permission Text")]
            public string PanelNoPermissionText {
                get;
                set;
            }
            = "You do not have permission to use this page!";
            [JsonProperty(Order = 0, PropertyName = "Button Image (Leave blank for no image)")]
            public string ButtonImage {
                get;
                set;
            }
            = String.Empty;
            [JsonProperty(Order = 0, PropertyName = "Display button name (Button stays there, but the text gets removed)")]
            public bool DisplayButtonName {
                get;
                set;
            }
            = true;
            [JsonProperty(Order = 0, PropertyName = "Page Position")]
            public int PagePosition {
                get;
                set;
            }
            [JsonProperty(Order = 0, PropertyName = "Info Panel Options (Won't be used if you're using an addon)")]
            public PanelSettings PanelSettings {
                get;
                set;
            }
            = new PanelSettings();
            public AddonSettings AddonSettings {
                get;
                set;
            }
            = new AddonSettings();
            public InfoPanelSettings Clone() {
                return new InfoPanelSettings {
                    Enabled = this.Enabled, PanelName = this.PanelName, ButtonName = this.ButtonName, Commands = new List<string>(this.Commands), PanelPermission = this.PanelPermission, ShowPanelPermission = this.ShowPanelPermission, PanelNoPermissionText = this.PanelNoPermissionText, ButtonImage = this.ButtonImage, DisplayButtonName = this.DisplayButtonName, PagePosition = this.PagePosition, PanelSettings = this.PanelSettings?.Clone(), AddonSettings = this.AddonSettings?.Clone()
                }
                ;
            }
        }
        public class AddonSettings {
            [JsonProperty(Order = 0, PropertyName = "Addon Name (Empty = Not an addon)")]
            public string AddonName {
                get;
                set;
            }
            = string.Empty;
            public AddonSettings Clone() {
                return new AddonSettings {
                    AddonName = this.AddonName
                }
                ;
            }
        }
        public class DefaultColors {
            public string Name {
                get;
                set;
            }
            = string.Empty;
            public string Color {
                get;
                set;
            }
            = string.Empty;
        }
        private static Configuration _config;
        protected override void LoadConfig() {
            base.LoadConfig();
            try {
                _config = Config.ReadObject<Configuration>();
                if (_config == null) LoadDefaultConfig();
                foreach (var panel in _config.UIPanels) if (string.IsNullOrEmpty(panel.ButtonName)) panel.ButtonName = panel.PanelName;
                if (_config.CurrentTheme.Key == null || _config.CurrentTheme.Value == null || _config.CurrentTheme.Value.UIParts == null || _config.CurrentTheme.Value.UIParts.Count == 0) {
                    GetUIFromAPI("original", () => {
                        SaveConfig();
                    }
                    );
                }
                else {
                    foreach (var themeColor in compareThemeColors) {
                        if (!_config.CurrentTheme.Value.UIColors.Any(x => x.Name == themeColor.Name)) {
                            _config.CurrentTheme.Value.UIColors.Add(themeColor);
                        }
                    }
                    SaveConfig();
                }
            }
            catch (Exception e) {
                Debug.LogException(e);
                PrintWarning("Creating new config file.");
                LoadDefaultConfig();
            }
        }
        protected override void LoadDefaultConfig() => _config = Configuration.DefaultConfig();
        protected override void SaveConfig() => Config.WriteObject(_config);
#endregion
#region [ UI DATA STRUCTURE ]
        List<string> _fonts = new List<string>() {
            "droidsansmono.ttf", "permanentmarker.ttf", "robotocondensed-bold.ttf", "robotocondensed-regular.ttf"
        }
        ;
        public Dictionary<ulong, DateTime> _cooldowns = new Dictionary<ulong, DateTime>();
        public class StoredUIList {
            public string UIName {
                get;
                set;
            }
            = string.Empty;
            public string UIPath {
                get;
                set;
            }
            = string.Empty;
            public string UICommandPath {
                get;
                set;
            }
            = string.Empty;
            public int SpaceNumber {
                get;
                set;
            }
            = 0;
            public bool HasChildren {
                get;
                set;
            }
            = false;
            public bool IsOpen {
                get;
                set;
            }
            = false;
        }
        public class UIParts {
            public string UIName {
                get;
                set;
            }
            = null;
            public string UIParent {
                get;
                set;
            }
            = string.Empty;
            public bool FullyEdit {
                get;
                set;
            }
            = false;
            public UIAnchorPositions UIAnchors = new UIAnchorPositions();
            public UIOffsetPositions UIOffsets = new UIOffsetPositions();
            public UIProperties UIProperties = new UIProperties();
            public UIText UIText = new UIText();
            public LoopSettings UILoopSettings = new LoopSettings();
            public List<UIParts> UIChildren = new List<UIParts>();
            public bool RemoveChildByName(string childName) {
                int foundChildIndex = UIChildren.FindIndex(x => x.UIName == childName);
                if (foundChildIndex != -1) {
                    UIChildren.RemoveAt(foundChildIndex);
                    return true;
                }
                foreach (var child in UIChildren) {
                    if (child.RemoveChildByName(childName)) {
                        return true;
                    }
                }
                return false;
            }
            public void AddChild(UIParts child) {
                if (!IsDescendant(child)) UIChildren.Add(child);
                else throw new InvalidOperationException("Cannot add child; would create circular reference.");
            }
            private bool IsDescendant(UIParts part) {
                if (this == part) return true;
                foreach (var child in UIChildren) if (child.IsDescendant(part)) return true;
                return false;
            }
            public UIParts FindParentByName(string childUIName, List<UIParts> allParts) {
                foreach (var part in allParts) {
                    foreach (var child in part.UIChildren) {
                        if (child.UIName == childUIName) {
                            return part;
                        }
                    }
                    UIParts potentialParent = part.FindParentByNameRecursive(childUIName);
                    if (potentialParent != null) {
                        return potentialParent;
                    }
                }
                return null;
            }
            private UIParts FindParentByNameRecursive(string childUIName) {
                foreach (var grandChild in this.UIChildren) {
                    if (grandChild.UIName == childUIName) {
                        return this;
                    }
                    else {
                        UIParts potentialParent = grandChild.FindParentByNameRecursive(childUIName);
                        if (potentialParent != null) {
                            return potentialParent;
                        }
                    }
                }
                return null;
            }
            public UIParts FindParent(List<UIParts> allParts) {
                foreach (var part in allParts) {
                    if (part.UIChildren.Contains(this)) {
                        return part;
                    }
                    else {
                        UIParts potentialParent = part.FindParentRecursive(this);
                        if (potentialParent != null) {
                            return potentialParent;
                        }
                    }
                }
                return null;
            }
            private UIParts FindParentRecursive(UIParts child) {
                foreach (var grandChild in this.UIChildren) {
                    if (grandChild == child) {
                        return this;
                    }
                    else {
                        UIParts potentialParent = grandChild.FindParentRecursive(child);
                        if (potentialParent != null) {
                            return potentialParent;
                        }
                    }
                }
                return null;
            }
            public UIParts FindPanelByName(string uiName, List<UIParts> allParts) {
                foreach (var part in allParts) {
                    if (part.UIName == uiName) {
                        return part;
                    }
                    UIParts foundPanel = part.FindPanelByNameRecursive(uiName);
                    if (foundPanel != null) {
                        return foundPanel;
                    }
                }
                return null;
            }
            private UIParts FindPanelByNameRecursive(string uiName) {
                foreach (var child in this.UIChildren) {
                    if (child.UIName == uiName) {
                        return child;
                    }
                    else {
                        UIParts foundPanel = child.FindPanelByNameRecursive(uiName);
                        if (foundPanel != null) {
                            return foundPanel;
                        }
                    }
                }
                return null;
            }
            public UIParts Clone() {
                UIParts clone = new UIParts {
                    UIName = this.UIName, UIParent = this.UIParent, FullyEdit = this.FullyEdit, UIAnchors = this.UIAnchors.Clone(), UIOffsets = this.UIOffsets.Clone(), UIProperties = this.UIProperties.Clone(), UIText = this.UIText.Clone(), UILoopSettings = this.UILoopSettings.Clone()
                }
                ;
                foreach (var child in this.UIChildren) {
                    clone.UIChildren.Add(child.Clone());
                }
                return clone;
            }
        }
        public class UIAnchorPositions {
            public double XMin {
                get;
                set;
            }
            public double XMax {
                get;
                set;
            }
            public double YMin {
                get;
                set;
            }
            public double YMax {
                get;
                set;
            }
            public UIAnchorPositions Clone() {
                return new UIAnchorPositions {
                    XMin = this.XMin, XMax = this.XMax, YMin = this.YMin, YMax = this.YMax
                }
                ;
            }
        }
        public class UIOffsetPositions {
            public bool Enabled {
                get;
                set;
            }
            = false;
            public double XMin {
                get;
                set;
            }
            public double XMax {
                get;
                set;
            }
            public double YMin {
                get;
                set;
            }
            public double YMax {
                get;
                set;
            }
            public UIOffsetPositions Clone() {
                return new UIOffsetPositions {
                    Enabled = this.Enabled, XMin = this.XMin, XMax = this.XMax, YMin = this.YMin, YMax = this.YMax
                }
                ;
            }
        }
        public class UIProperties {
            public string Color {
                get;
                set;
            }
            = "0 0 0 0";
            public bool Blur {
                get;
                set;
            }
            = false;
            public string Material {
                get;
                set;
            }
            = string.Empty;
            public float FadeIn {
                get;
                set;
            }
            = 0f;
            public string Image {
                get;
                set;
            }
            = string.Empty;
            public bool EnableCursor {
                get;
                set;
            }
            = false;
            public string Command {
                get;
                set;
            }
            = string.Empty;
            public UIProperties Clone() {
                return new UIProperties {
                    Color = this.Color, Blur = this.Blur, FadeIn = this.FadeIn, Image = this.Image, EnableCursor = this.EnableCursor, Command = this.Command
                }
                ;
            }
        }
        public class UIText {
            public string Text {
                get;
                set;
            }
            = string.Empty;
            public int Size {
                get;
                set;
            }
            = 15;
            public string Font {
                get;
                set;
            }
            = "robotocondensed-bold.ttf";
            public string Color {
                get;
                set;
            }
            = "1 1 1 1";
            public TextAnchor Alignment {
                get;
                set;
            }
            = TextAnchor.MiddleCenter;
            public UIText Clone() {
                return new UIText {
                    Text = this.Text, Size = this.Size, Font = this.Font, Color = this.Color, Alignment = this.Alignment
                }
                ;
            }
        }
        public class LoopSettings {
            public bool Loop {
                get;
                set;
            }
            = false;
            public double Spacing {
                get;
                set;
            }
            =.15;
            public bool Vertical {
                get;
                set;
            }
            = true;
            public LoopSettings Clone() {
                return new LoopSettings {
                    Loop = this.Loop, Spacing = this.Spacing
                }
                ;
            }
        }
        public List<UIParts> CloneUIList(List<UIParts> originalList) {
            List<UIParts> clonedList = new List<UIParts>();
            foreach (var uiPart in originalList) {
                clonedList.Add(uiPart.Clone());
            }
            return clonedList;
        }
        public class ThemeSettings {
            public List<UIParts> UIParts = new List<UIParts>();
            public List<DefaultColors> UIColors = new List<DefaultColors>();
        }
        public class RootObject {
            public List<UIParts> UIParts {
                get;
                set;
            }
        }
        private void GetUIFromAPI(string themeName = "original", Action onComplete = null) {
            string apiUrl = $"https://solarrust.com/api/{themeName}.json";
            GetUIPartsFromApi(apiUrl, uiParts => {
                if (uiParts != null) {
                    List<DefaultColors> newColors = new List<DefaultColors>();
                    foreach (var color in _defaultThemes.First().Value.UIColors) newColors.Add(new DefaultColors {
                        Color = color.Color, Name = color.Name
                    }
                    );
                    _config.CurrentTheme = new KeyValuePair<string, ThemeSettings>("Classic", new ThemeSettings() {
                        UIColors = newColors, UIParts = uiParts
                    }
                    );
                }
                else {
                    Console.WriteLine("Failed to fetch UI Parts.");
                }
                onComplete?.Invoke();
            }
            );
        }
        public void GetUIPartsFromApi(string apiUrl, Action<List<UIParts>> callback) {
            webrequest.Enqueue(apiUrl, null, (code, response) => {
                if (code != 200 || string.IsNullOrEmpty(response)) {
                    Console.WriteLine($"Error fetching UI Parts from API: Status Code {code}");
                    callback(null);
                    return;
                }
                try {
                    RootObject rootObject = JsonConvert.DeserializeObject<RootObject>(response);
                    List<UIParts> uiParts = rootObject?.UIParts ?? new List<UIParts>();
                    callback(uiParts);
                }
                catch (Exception ex) {
                    Console.WriteLine($"Exception during deserialization: {ex.Message}");
                    callback(null);
                }
            }
            , this, RequestMethod.GET);
        }
        Dictionary<string, ThemeSettings> _defaultThemes = new Dictionary<string, ThemeSettings>() {
            {
                "Rust", new ThemeSettings() {
                    UIParts = new List<UIParts>() {
                        new UIParts {
                            UIName = "BackgrounPanel", UIParent = "Overlay", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                XMin = 0, XMax = 1, YMin = 0, YMax = 1
                            }
                            , UIProperties = new UIProperties() {
                                Color = "0 0 0 0.8", Material = "assets/content/ui/uibackgroundblur-ingamemenu.mat", EnableCursor = true, FadeIn = 1f
                            }
                            , UIChildren = new List<UIParts>() {
                                new UIParts() {
                                    UIName = "BackgrounColorOverlay", FullyEdit = true, UIAnchors = new UIAnchorPositions() {
                                        XMin = 0, XMax = 1, YMin = 0, YMax = 1
                                    }
                                    , UIProperties = new UIProperties() {
                                        Color = "0.2 0.2 0.2.5",
                                    }
                                    , UIChildren = new List<UIParts>() {
                                        new UIParts() {
                                            UIName = "InfoSeperationOverlay", FullyEdit = true, UIAnchors = new UIAnchorPositions() {
                                                XMin =.24, XMax = 1, YMin = 0, YMax = 1
                                            }
                                            , UIProperties = new UIProperties() {
                                                Color = "0 0 0.5",
                                            }
                                            ,
                                        }
                                        , new UIParts() {
                                            UIName = "MainImage", UIAnchors = new UIAnchorPositions() {
                                                XMin =.03, YMin =.77, XMax =.23, YMax =.91
                                            }
                                            , UIProperties = new UIProperties() {
                                                Image = "https://i.ibb.co/JQkq1wd/WELCOMe.png"
                                            }
                                        }
                                        , new UIParts {
                                            UIName = "ButtonPanel", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                XMin =.03, YMin =.08, XMax =.22, YMax =.71
                                            }
                                            , UIProperties = new UIProperties() {
                                                Color = "0 0 0 0",
                                            }
                                            , UIChildren = new List<UIParts>() {
                                                new UIParts {
                                                    UIName = "ButtonSettings", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                        XMin =.01, YMin =.92, XMax =.99, YMax =.99
                                                    }
                                                    , UIProperties = new UIProperties() {
                                                        Color = "0 0 0 0"
                                                    }
                                                    , UIText = new UIText() {
                                                        Size = 25, Color = "1 1 1.9", Alignment = TextAnchor.MiddleCenter
                                                    }
                                                    , UILoopSettings = new LoopSettings() {
                                                        Spacing =.01, Loop = true
                                                    }
                                                }
                                                , new UIParts {
                                                    UIName = "SelectedButtonOverlay", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                        XMin = -.01, YMin = -.02, XMax = 1.01, YMax = 1.02
                                                    }
                                                    , UIProperties = new UIProperties() {
                                                        Color = ".36.60 1 0.6"
                                                    }
                                                }
                                            }
                                        }
                                        , new UIParts {
                                            UIName = "TitlePanel", FullyEdit = true, UIAnchors = new UIAnchorPositions() {
                                                XMin =.25, YMin =.92, XMax =.99, YMax =.98
                                            }
                                            , UIProperties = new UIProperties() {
                                                Color = "0 0 0.4",
                                            }
                                            , UIText = new UIText() {
                                                Text = "YOUR SERVER NAME", Size = 25
                                            }
                                            ,
                                        }
                                        , new UIParts {
                                            UIName = "PlayersPanel", FullyEdit = true, UIAnchors = new UIAnchorPositions() {
                                                XMin =.03, YMin =.92, XMax =.23, YMax =.98
                                            }
                                            , UIProperties = new UIProperties() {
                                                Color = "0 0 0.4",
                                            }
                                            , UIText = new UIText() {
                                                Size = 25, Text = "1 / 1"
                                            }
                                        }
                                        , new UIParts {
                                            UIName = "WCSourcePanel", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                XMin =.25, YMin =.07, XMax =.99, YMax =.91
                                            }
                                            , UIProperties = new UIProperties() {
                                                Color = "0 0 0 0",
                                            }
                                            , UIChildren = new List<UIParts>() {
                                                new UIParts {
                                                    UIName = "TextPanel_V1", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                        XMin = 0, YMin = 0, XMax = 1, YMax = 1
                                                    }
                                                    , UIProperties = new UIProperties() {
                                                        Color = "0 0 0 0",
                                                    }
                                                    , UIChildren = new List<UIParts>() {
                                                        new UIParts() {
                                                            UIName = "PanelTitle", FullyEdit = false, UIAnchors = {
                                                                XMin = 0, YMin =.91, XMax = 1, YMax = 1
                                                            }
                                                            , UIProperties= new UIProperties() {
                                                                Color = "0 0 0.4"
                                                            }
                                                            , UIText = new UIText() {
                                                                Size = 20, Text = "INFO"
                                                            }
                                                        }
                                                        , new UIParts {
                                                            UIName = "TextPanel", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                XMin = 0, YMin = 0, XMax = 1, YMax =.9
                                                            }
                                                            , UIProperties = new UIProperties() {
                                                                Color = "0 0 0.4",
                                                            }
                                                            , UIChildren = new List<UIParts>() {
                                                                new UIParts {
                                                                    UIName = "TextPanelInlay", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                        XMin =.01, YMin =.02, XMax =.99, YMax =.98
                                                                    }
                                                                    , UIText = new UIText() {
                                                                        Alignment = TextAnchor.UpperLeft
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                                , new UIParts {
                                                    UIName = "TextPanel_V2", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                        XMin = 0, YMin = 0, XMax = 1, YMax = 1
                                                    }
                                                    , UIProperties = new UIProperties() {
                                                        Color = "0 0 0 0",
                                                    }
                                                    , UIChildren = new List<UIParts>() {
                                                        new UIParts() {
                                                            UIName = "PanelTitle", FullyEdit = false, UIAnchors = {
                                                                XMin = 0, YMin =.91, XMax = 1, YMax = 1
                                                            }
                                                            , UIProperties= new UIProperties() {
                                                                Color = "0 0 0.4"
                                                            }
                                                            , UIText = new UIText() {
                                                                Size = 20, Text = "INFO"
                                                            }
                                                        }
                                                        , new UIParts {
                                                            UIName = "TextPanel", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                XMin = 0, YMin =.13, XMax = 1, YMax =.9
                                                            }
                                                            , UIProperties = new UIProperties() {
                                                                Color = "0 0 0.4",
                                                            }
                                                            , UIChildren = new List<UIParts>() {
                                                                new UIParts {
                                                                    UIName = "TextPanelInlay", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                        XMin =.01, YMin =.02, XMax =.99, YMax =.98
                                                                    }
                                                                    , UIText = new UIText() {
                                                                        Alignment = TextAnchor.UpperLeft
                                                                    }
                                                                }
                                                            }
                                                        }
                                                        , new UIParts {
                                                            UIName = "BottomImage", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                XMin = 0, YMin =.012, XMax =.99, YMax = 1
                                                            }
                                                            , UIText = new UIText() {
                                                                Alignment = TextAnchor.UpperLeft
                                                            }
                                                        }
                                                    }
                                                }
                                                , new UIParts {
                                                    UIName = "TextPanel_V3", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                        XMin = 0, YMin = 0, XMax = 1, YMax = 1
                                                    }
                                                    , UIProperties = new UIProperties() {
                                                        Color = "0 0 0 0",
                                                    }
                                                    , UIChildren = new List<UIParts>() {
                                                        new UIParts() {
                                                            UIName = "PanelTitle", FullyEdit = false, UIAnchors = {
                                                                XMin = 0, YMin =.91, XMax = 1, YMax = 1
                                                            }
                                                            , UIProperties= new UIProperties() {
                                                                Color = "0 0 0.4"
                                                            }
                                                            , UIText = new UIText() {
                                                                Size = 20, Text = "INFO"
                                                            }
                                                        }
                                                        , new UIParts {
                                                            UIName = "TextPanel", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                XMin = 0, YMin =.09, XMax = 1, YMax =.9
                                                            }
                                                            , UIProperties = new UIProperties() {
                                                                Color = "0 0 0.4",
                                                            }
                                                            , UIChildren = new List<UIParts>() {
                                                                new UIParts {
                                                                    UIName = "TextPanelInlay", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                        XMin =.01, YMin =.02, XMax =.99, YMax =.98
                                                                    }
                                                                    , UIText = new UIText() {
                                                                        Alignment = TextAnchor.UpperLeft
                                                                    }
                                                                }
                                                            }
                                                        }
                                                        , new UIParts {
                                                            UIName = "LeftButton", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                XMin = 0, YMin = 0, XMax =.495, YMax =.08
                                                            }
                                                            , UIText = new UIText() {
                                                                Alignment = TextAnchor.MiddleCenter, Text = "<", Color = "1 1 1 1", Size = 20
                                                            }
                                                            , UIProperties = new UIProperties() {
                                                                Command = "wc_main page last", Color = "0 0 0.4"
                                                            }
                                                        }
                                                        , new UIParts {
                                                            UIName = "RightButton", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                XMin =.505, YMin = 0, XMax = 1, YMax =.08
                                                            }
                                                            , UIText = new UIText() {
                                                                Alignment = TextAnchor.MiddleCenter, Text = ">", Color = "1 1 1 1", Size = 20
                                                            }
                                                            , UIProperties = new UIProperties() {
                                                                Command = "wc_main page next", Color = "0 0 0.4"
                                                            }
                                                        }
                                                    }
                                                }
                                                , new UIParts {
                                                    UIName = "TextPanel_V4", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                        XMin = 0, YMin = 0, XMax = 1, YMax = 1
                                                    }
                                                    , UIProperties = new UIProperties() {
                                                        Color = "0 0 0 0",
                                                    }
                                                    , UIChildren = new List<UIParts>() {
                                                        new UIParts() {
                                                            UIName = "PanelTitle", FullyEdit = false, UIAnchors = {
                                                                XMin = 0, YMin =.91, XMax = 1, YMax = 1
                                                            }
                                                            , UIProperties= new UIProperties() {
                                                                Color = "0 0 0.4"
                                                            }
                                                            , UIText = new UIText() {
                                                                Size = 20, Text = "INFO"
                                                            }
                                                        }
                                                        , new UIParts {
                                                            UIName = "TextPanel", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                XMin = 0, YMin =.22, XMax = 1, YMax =.9
                                                            }
                                                            , UIProperties = new UIProperties() {
                                                                Color = "0 0 0.4",
                                                            }
                                                            , UIChildren = new List<UIParts>() {
                                                                new UIParts {
                                                                    UIName = "TextPanelInlay", FullyEdit = false, UIAnchors = new UIAnchorPositions() {
                                                                        XMin =.01, YMin =.02, XMax =.99, YMax =.98
                                                                    }
                                                                    , UIText = new UIText() {
                                                                        Alignment = TextAnchor.UpperLeft
                                                                    }
                                                                }
                                                            }
                                                        }
                                 
// ... [Code preview truncated due to length. Full source in attached file] ...

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху