Esempio n. 1
0
        private static GUISkin CreateDefaultSkin()
        {
            GUISkin skin = new GUISkin();

            //FIXME Maybe there is a better way to init default skin?

            // init default rule lists
            skin.InitButtonStyles();
            skin.InitSelectableStyles();
            skin.InitListBoxStyles();
            skin.InitTextBoxStyles();

            return(skin);
        }
Esempio n. 2
0
        private static GUISkin CreateDefaultSkin()
        {
            GUISkin skin = new GUISkin();

            // init default rule lists
            StyleRuleSet button = new StyleRuleSet();

            skin.InitButtonStyles(button);
            skin.styles[GUIControlName.Button] = button;

            StyleRuleSet label = new StyleRuleSet();

            skin.InitLabelStyles(label);
            skin.styles[GUIControlName.Label] = label;

            StyleRuleSet box = new StyleRuleSet();

            skin.InitBoxStyles(box);
            skin.styles[GUIControlName.Box] = box;

            skin.InitCollapsingHeaderStyles(button, out var collapsingHeader);
            skin.styles[GUIControlName.CollapsingHeader] = collapsingHeader;

            StyleRuleSet textBox = new StyleRuleSet();

            skin.InitTextBoxStyles(textBox);
            skin.styles[GUIControlName.TextBox] = textBox;

            StyleRuleSet image = new StyleRuleSet();

            skin.InitImageStyles(image);
            skin.styles[GUIControlName.Image] = image;

            StyleRuleSet toggle = new StyleRuleSet();

            skin.InitToggleStyles(toggle);
            skin.styles[GUIControlName.Toggle] = toggle;

            StyleRuleSet selectable = new StyleRuleSet();

            skin.InitSelectableStyles(selectable);
            skin.styles[GUIControlName.Selectable] = selectable;

            StyleRuleSet separator = new StyleRuleSet();

            skin.InitSeparatorStyle(separator);
            skin.styles[GUIControlName.Separator] = separator;

            StyleRuleSet progressBar = new StyleRuleSet();

            skin.InitProgressBarStyles(progressBar);
            skin.styles[GUIControlName.ProgressBar] = progressBar;

            StyleRuleSet slider = new StyleRuleSet();

            skin.InitSliderStyles(slider);
            skin.styles[GUIControlName.Slider] = slider;

            StyleRuleSet listbox = new StyleRuleSet();

            skin.InitListBoxStyles(listbox);
            skin.styles[GUIControlName.ListBox] = listbox;

            skin.InitTreeNodeStyles(button, out var treeNode);
            skin.styles[GUIControlName.TreeNode] = treeNode;

            StyleRuleSet colorField = new StyleRuleSet();

            skin.InitColorFieldStyles(colorField);
            skin.styles[GUIControlName.ColorField] = colorField;

            return(skin);
        }