Exemplo n.º 1
0
        protected override void OnGUIOnceOnly()
        {
            windowTex             = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/WindowTex", false);
            dropDownTex           = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/DropDownTex", false);
            toolbarIcon           = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/CapComAppIcon", false);
            buttonHover           = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/ButtonHover", false);
            fundsGreen            = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/FundsGreenIcon", false);
            repRed                = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/RepRedIcon", false);
            science               = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/ScienceIcon", false);
            orderAsc              = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/OrderAsc", false);
            orderDesc             = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/OrderDesc", false);
            goldStar              = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/GoldStar", false);
            goldStarTwo           = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/GoldStarTwo", false);
            goldStarThree         = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/GoldStarThree", false);
            goldStarVertical      = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/GoldStarVertical", false);
            goldStarTwoVertical   = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/GoldStarTwoVertical", false);
            goldStarThreeVertical = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/GoldStarThreeVertical", false);
            settingsIcon          = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/ToolbarSettingsIcon", false);
            resizeHandle          = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/ResizeIcon", false);
            checkBox              = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/CheckBoxIcon", false);
            failBox               = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/FailBoxIcon", false);
            emptyBox              = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/EmptyBoxIcon", false);
            notesPlusIcon         = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/OpenNotesIcon", false);
            notesMinusIcon        = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/CloseNotesIcon", false);
            sortStars             = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/SortDifficultyIcon", false);
            sortPlanet            = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/SortPlanetsIcon", false);
            sortTime              = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/SortTimeIcon", false);
            progressIconOn        = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/ProgressIconOn", false);
            progressIconOff       = GameDatabase.Instance.GetTexture("DMagicUtilities/CapCom/Textures/ProgressIconOff", false);

            toggleButtons();
            atlasStyles();
            initializeUnitySkins();
            CC_SkinsLibrary.SetCurrent("CCUnitySkin");
        }
Exemplo n.º 2
0
        internal static void initializeKSPSkins()
        {
            ccKSPSkin = CC_SkinsLibrary.CopySkin(CC_SkinsLibrary.DefSkinType.KSP);
            CC_SkinsLibrary.AddSkin("CCKSPSkin", ccKSPSkin);

            newWindowStyle           = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.window);
            newWindowStyle.fontSize  = 14;
            newWindowStyle.fontStyle = FontStyle.Bold;
            newWindowStyle.padding   = new RectOffset(0, 1, 20, 12);

            dropDown = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.box);

            //Button Styles
            titleButton                   = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.button);
            titleButton.fontSize          = 12 + fontSize;
            titleButton.wordWrap          = true;
            titleButton.fontStyle         = FontStyle.Bold;
            titleButton.normal.textColor  = XKCDColors.ButterYellow;
            titleButton.padding           = new RectOffset(2, 14, 2, 2);
            titleButton.normal.background = titleButtonOff;
            titleButton.hover.background  = titleButtonOn;

            titleButtonActive = new GUIStyle(titleButton);
            titleButtonActive.normal.background = titleButtonOn;

            tabButton                   = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.button);
            tabButton.fontSize          = 13 + fontSize;
            tabButton.fontStyle         = FontStyle.Bold;
            tabButton.border            = new RectOffset(17, 26, 0, 19);
            tabButton.normal.background = tabButtonOn;
            tabButton.hover.background  = tabButtonHover;

            tabButtonInactive = new GUIStyle(tabButton);
            tabButtonInactive.normal.background = tabButtonOff;

            textureButton           = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.button);
            textureButton.fontSize  = 14;
            textureButton.fontStyle = FontStyle.Bold;
            textureButton.alignment = TextAnchor.MiddleCenter;
            textureButton.padding   = new RectOffset(1, 1, 2, 2);

            menuButton                  = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.label);
            menuButton.fontSize         = 12 + fontSize;
            menuButton.fontStyle        = FontStyle.Bold;
            menuButton.padding          = new RectOffset(26, 2, 2, 2);
            menuButton.normal.textColor = XKCDColors.White;
            menuButton.hover.textColor  = XKCDColors.AlmostBlack;
            Texture2D sortBackground = new Texture2D(1, 1);

            sortBackground.SetPixel(1, 1, XKCDColors.OffWhite);
            sortBackground.Apply();
            menuButton.hover.background = sortBackground;
            menuButton.alignment        = TextAnchor.MiddleLeft;

            warningButton           = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.button);
            warningButton.fontSize  = 13 + fontSize;
            warningButton.fontStyle = FontStyle.Bold;
            warningButton.alignment = TextAnchor.MiddleCenter;

            iconButton = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.label);

            keycodeButton = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.button);

            //Toggle Buttons
            toggleOnButton                   = new GUIStyle(CC_SkinsLibrary.DefUnitySkin.button);
            toggleOnButton.padding           = new RectOffset(0, 0, 0, 0);
            toggleOnButton.border            = new RectOffset(27, 0, 0, 27);
            toggleOnButton.normal.background = toggleOn;
            toggleOnButton.active.background = toggleHoverOn;
            toggleOnButton.hover.background  = toggleHoverOn;

            toggleOffButton = new GUIStyle(toggleOnButton);
            toggleOffButton.normal.background = toggleOff;
            toggleOffButton.active.background = toggleHoverOff;
            toggleOffButton.hover.background  = toggleHoverOff;

            //Label Styles
            headerText                  = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.label);
            headerText.fontSize         = 13 + fontSize;
            headerText.fontStyle        = FontStyle.Bold;
            headerText.alignment        = TextAnchor.MiddleLeft;
            headerText.normal.textColor = XKCDColors.FadedOrange;

            warningText                  = new GUIStyle(headerText);
            warningText.alignment        = TextAnchor.MiddleCenter;
            warningText.normal.textColor = XKCDColors.VomitYellow;

            reassignText = new GUIStyle(warningText);
            reassignText.normal.textColor = Color.white;

            reassignCurrentText           = new GUIStyle(reassignText);
            reassignCurrentText.fontStyle = FontStyle.Bold;

            titleText = new GUIStyle(headerText);
            titleText.normal.textColor = XKCDColors.White;

            briefingText                  = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.label);
            briefingText.fontSize         = 11 + fontSize;
            briefingText.alignment        = TextAnchor.MiddleLeft;
            briefingText.normal.textColor = XKCDColors.KSPNeutralUIGrey;

            synopsisText           = new GUIStyle(briefingText);
            synopsisText.fontSize  = 12 + fontSize;
            synopsisText.fontStyle = FontStyle.Bold;

            parameterText = new GUIStyle(synopsisText);
            parameterText.normal.textColor = XKCDColors.Beige;

            subParameterText = new GUIStyle(parameterText);
            subParameterText.normal.textColor = XKCDColors.DarkBeige;

            timerText = new GUIStyle(synopsisText);
            timerText.normal.textColor = XKCDColors.OffWhite;

            noteText                  = new GUIStyle(synopsisText);
            noteText.fontStyle        = FontStyle.Normal;
            noteText.normal.textColor = XKCDColors.TiffanyBlue;

            agencyContractText = new GUIStyle(synopsisText);
            agencyContractText.normal.textColor = XKCDColors.ButterYellow;

            smallText           = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.label);
            smallText.fontSize  = 11 + fontSize;
            smallText.alignment = TextAnchor.MiddleLeft;

            //Reward and Penalty Styles
            advance                  = new GUIStyle(CC_SkinsLibrary.DefKSPSkin.label);
            advance.fontSize         = 12 + fontSize;
            advance.fontStyle        = FontStyle.Bold;
            advance.alignment        = TextAnchor.MiddleLeft;
            advance.wordWrap         = false;
            advance.normal.textColor = XKCDColors.DullYellow;

            completion = new GUIStyle(advance);
            completion.normal.textColor = XKCDColors.DustyGreen;

            failure = new GUIStyle(advance);
            failure.normal.textColor = XKCDColors.DustyRed;

            funds = new GUIStyle(advance);
            funds.normal.textColor = XKCDColors.PaleOliveGreen;

            rep = new GUIStyle(funds);
            rep.normal.textColor = XKCDColors.BrownishYellow;

            sci = new GUIStyle(funds);
            sci.normal.textColor = XKCDColors.AquaBlue;

            //Add Default Styles
            CC_SkinsLibrary.List["CCKSPSkin"].window = new GUIStyle(newWindowStyle);
            CC_SkinsLibrary.List["CCKSPSkin"].box    = new GUIStyle(dropDown);
            CC_SkinsLibrary.List["CCKSPSkin"].button = new GUIStyle(titleButton);

            CC_SkinsLibrary.AddStyle("CCKSPSkin", newWindowStyle);
            CC_SkinsLibrary.AddStyle("CCKSPSkin", dropDown);
            CC_SkinsLibrary.AddStyle("CCKSPSkin", titleButton);
        }