コード例 #1
0
        public TimeWarpDecorator()
        {
            mFlightButtonGreen  = GUITextureButtonFactory.CreateFromFilename("texFlightGreen.png", "texFlightGreenOver.png", "texFlightGreenDown.png", "texFlightGreenOver.png");
            mFlightButtonYellow = GUITextureButtonFactory.CreateFromFilename("texFlightYellow.png", "texFlightYellowOver.png", "texFlightYellowDown.png", "texFlightYellowOver.png");
            mFlightButtonRed    = GUITextureButtonFactory.CreateFromFilename("texFlightRed.png", "texFlightRed.png", "texFlightRed.png", "texFlightRed.png");

            mFlightButtonGreen.fixedHeight    = mFlightButtonGreen.fixedWidth = 0;
            mFlightButtonYellow.fixedHeight   = mFlightButtonYellow.fixedWidth = 0;
            mFlightButtonRed.fixedHeight      = mFlightButtonRed.fixedWidth = 0;
            mFlightButtonGreen.stretchHeight  = mFlightButtonGreen.stretchWidth = true;
            mFlightButtonYellow.stretchHeight = mFlightButtonYellow.stretchWidth = true;
            mFlightButtonRed.stretchHeight    = mFlightButtonRed.stretchWidth = true;

            // Crap timewarp object
            mTimewarpObject = TimeWarp.fetch;

            // objects on this scene?
            if (mTimewarpObject == null || mTimewarpObject.timeQuadrantTab == null)
            {
                // to skip the draw calls
                mTimewarpObject = null;
                return;
            }

            var text = mTimewarpObject.timeQuadrantTab.transform.FindChild("MET timer").GetComponent <ScreenSafeGUIText>();

            mTextStyle          = new GUIStyle(text.textStyle);
            mTextStyle.fontSize = (int)(text.textSize * ScreenSafeUI.PixelRatio);

            // Put the draw function to the DrawQueue
            RenderingManager.AddToPostDrawQueue(0, Draw);

            // create the Background
            RTUtil.LoadImage(out mTexBackground, "TimeQuadrantFcStatus.png");
        }
コード例 #2
0
 static Style()
 {
     Button       = GUITextureButtonFactory.CreateFromFilename("texButton.png");
     ButtonGray   = GUITextureButtonFactory.CreateFromFilename("texButtonGray.png");
     ButtonGreen  = GUITextureButtonFactory.CreateFromFilename("texButtonGreen.png");
     ButtonRed    = GUITextureButtonFactory.CreateFromFilename("texButtonRed.png");
     ButtonYellow = GUITextureButtonFactory.CreateFromFilename("texButtonYellow.png");
 }
コード例 #3
0
 static TimeQuadrantPatcher()
 {
     mFlightButton = GUITextureButtonFactory.CreateFromFilename("texFlightNormal.png",
                                                                "texFlightNormal.png",
                                                                "texFlightActive.png",
                                                                "texFlightNormal.png");
     RTUtil.Log("TimeQuadrantPatcher has loaded textures.");
 }
コード例 #4
0
        static TimeQuadrantPatcher()
        {
            mFlightButtonGreen = GUITextureButtonFactory.CreateFromFilename("texFlightGreen.png",
                                                                            "texFlightGreenOver.png",
                                                                            "texFlightGreenDown.png",
                                                                            "texFlightGreenOver.png");
            mFlightButtonYellow = GUITextureButtonFactory.CreateFromFilename("texFlightYellow.png",
                                                                             "texFlightYellowOver.png",
                                                                             "texFlightYellowDown.png",
                                                                             "texFlightYellowOver.png");
            mFlightButtonRed = GUITextureButtonFactory.CreateFromFilename("texFlightRed.png",
                                                                          "texFlightRedOver.png",
                                                                          "texFlightRedDown.png",
                                                                          "texFlightRedOver.png");

            RTUtil.Log("TimeQuadrantPatcher has loaded textures.");
        }
コード例 #5
0
        static MapViewConfigFragment()
        {
            mTextures = new Texture2D[7];
            RTUtil.LoadImage(out mTextures[0], "texBackground.png");
            RTUtil.LoadImage(out mTextures[1], "texPath.png");
            RTUtil.LoadImage(out mTextures[2], "texAll.png");
            RTUtil.LoadImage(out mTextures[3], "texDish.png");
            RTUtil.LoadImage(out mTextures[4], "texOmni.png");
            RTUtil.LoadImage(out mTextures[5], "texOmniDish.png");
            RTUtil.LoadImage(out mTextures[6], "texEmpty.png");

            mStyleButton       = GUITextureButtonFactory.CreateFromFilename("texButton.png");
            mStyleButtonGray   = GUITextureButtonFactory.CreateFromFilename("texButtonGray.png");
            mStyleButtonGreen  = GUITextureButtonFactory.CreateFromFilename("texButtonGreen.png");
            mStyleButtonRed    = GUITextureButtonFactory.CreateFromFilename("texButtonRed.png");
            mStyleButtonYellow = GUITextureButtonFactory.CreateFromFilename("texButtonYellow.png");

            RTUtil.Log("MapViewConfigFragment has loaded textures.");
        }
コード例 #6
0
 static TimeQuadrantPatcher()
 {
     mFlightButtonGreen = GUITextureButtonFactory.CreateFromFilename("texFlightGreen.png",
                                                                     "texFlightGreenOver.png",
                                                                     "texFlightGreenDown.png",
                                                                     "texFlightGreenOver.png");
     mFlightButtonYellow = GUITextureButtonFactory.CreateFromFilename("texFlightYellow.png",
                                                                      "texFlightYellowOver.png",
                                                                      "texFlightYellowDown.png",
                                                                      "texFlightYellowOver.png");
     mFlightButtonRed = GUITextureButtonFactory.CreateFromFilename("texFlightRed.png",
                                                                   "texFlightRed.png",
                                                                   "texFlightRed.png",
                                                                   "texFlightRed.png");
     mFlightButtonGreen.fixedHeight    = mFlightButtonGreen.fixedWidth = 0;
     mFlightButtonYellow.fixedHeight   = mFlightButtonYellow.fixedWidth = 0;
     mFlightButtonRed.fixedHeight      = mFlightButtonRed.fixedWidth = 0;
     mFlightButtonGreen.stretchHeight  = mFlightButtonGreen.stretchWidth = true;
     mFlightButtonYellow.stretchHeight = mFlightButtonYellow.stretchWidth = true;
     mFlightButtonRed.stretchHeight    = mFlightButtonRed.stretchWidth = true;
 }
コード例 #7
0
ファイル: FocusOverlay.cs プロジェクト: kevin-ye/RemoteTech
 static Style()
 {
     Button = GUITextureButtonFactory.CreateFromFilename("texKnowledgeNormal.png", "texKnowledgeHover.png", "texKnowledgeActive.png", "texKnowledgeHover.png");
 }