コード例 #1
0
        public override void Setup(String textureThemeFileName, String textureThemePath)
        {
            String path = Theme.AdaptRelativePathToPlatform(textureThemePath);
            tex2d = TextureManager.Singleton.CreateTexture2D(textureThemeFileName, path);
            uint dtt = (uint)tex2d.SizeTexture;

            menuLeft = new SubImage(1.0f / dtt, 1.0f / dtt, 7.0f / dtt, 21.0f / dtt, (uint)tex2d.TextureId);
            menuRight = new SubImage(53.0f / dtt, 1.0f / dtt, 59.0f / dtt, 21.0f / dtt, (uint)tex2d.TextureId);

            menuListUpLeft = new SubImage(3.0f / dtt, 34.0f / dtt, 27.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            menuListUp = new SubImage(22.0f / dtt, 34.0f / dtt, 31.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            menuListUpRight = new SubImage(33.0f / dtt, 34.0f / dtt, 57.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            menuListLeft = new SubImage(3.0f / dtt, 38.0f / dtt, 27.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            menuListRight = new SubImage(33.0f / dtt, 38.0f / dtt, 57.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            menuListBottomLeft = new SubImage(3.0f / dtt, 44.0f / dtt, 27.0f / dtt, 60.0f / dtt, (uint)tex2d.TextureId);
            menuListBottom = new SubImage(22.0f / dtt, 44.0f / dtt, 31.0f / dtt, 60.0f / dtt, (uint)tex2d.TextureId);
            menuListBottomRight = new SubImage(33.0f / dtt, 44.0f / dtt, 57.0f / dtt, 60.0f / dtt, (uint)tex2d.TextureId);
            menuItemSubMenuArrow = new SubImage(62.0f / dtt, 1.0f / dtt, 67.0f / dtt, 10.0f / dtt, (uint)tex2d.TextureId);

            dialogUpLeftActive = new SubImage(3.0f / dtt, 27.0f / dtt, 27.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            dialogUpActive = new SubImage(22.0f / dtt, 27.0f / dtt, 31.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            dialogUpRightActive = new SubImage(33.0f / dtt, 27.0f / dtt, 57.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            dialogLeft = new SubImage(3.0f / dtt, 38.0f / dtt, 27.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            dialogRight = new SubImage(33.0f / dtt, 38.0f / dtt, 57.0f / dtt, 43.0f / dtt, (uint)tex2d.TextureId);
            dialogBottomLeft = new SubImage(3.0f / dtt, 44.0f / dtt, 27.0f / dtt, 60.0f / dtt, (uint)tex2d.TextureId);
            dialogBottom = new SubImage(22.0f / dtt, 44.0f / dtt, 31.0f / dtt, 60.0f / dtt, (uint)tex2d.TextureId);
            dialogBottomRight = new SubImage(33.0f / dtt, 44.0f / dtt, 57.0f / dtt, 60.0f / dtt, (uint)tex2d.TextureId);

            dialogUpLeftDeactive = new SubImage(89.0f / dtt, 61.0f / dtt, 113.0f / dtt, 77.0f / dtt, (uint)tex2d.TextureId);
            dialogUpDeactive = new SubImage(111.0f / dtt, 61.0f / dtt, 116.0f / dtt, 77.0f / dtt, (uint)tex2d.TextureId);
            dialogUpRightDeactive = new SubImage(119.0f / dtt, 61.0f / dtt, 143.0f / dtt, 77.0f / dtt, (uint)tex2d.TextureId);

            buttonNormalLeft = new SubImage(1.0f / dtt, 61.0f / dtt, 5.0f / dtt, 80.0f / dtt, (uint)tex2d.TextureId);
            buttonNormalRight = new SubImage(83.0f / dtt, 61.0f / dtt, 87.0f / dtt, 80.0f / dtt, (uint)tex2d.TextureId);
            buttonHoverLeft = new SubImage(1.0f / dtt, 81.0f / dtt, 5.0f / dtt, 100.0f / dtt, (uint)tex2d.TextureId);
            buttonHoverRight = new SubImage(83.0f / dtt, 81.0f / dtt, 87.0f / dtt, 100.0f / dtt, (uint)tex2d.TextureId);

            checkButtonOn = new SubImage(81.0f / dtt, 129.0f / dtt, 92.0f / dtt, 140.0f / dtt, (uint)tex2d.TextureId);
            checkButtonOff = new SubImage(94.0f / dtt, 129.0f / dtt, 105.0f / dtt, 140.0f / dtt, (uint)tex2d.TextureId);
            radioButtonOn = new SubImage(81.0f / dtt, 117.0f / dtt, 92.0f / dtt, 128.0f / dtt, (uint)tex2d.TextureId);
            radioButtonOff = new SubImage(94.0f / dtt, 117.0f / dtt, 105.0f / dtt, 128.0f / dtt, (uint)tex2d.TextureId);

            progressBarLeft = new SubImage(1.0f / dtt, 101.0f / dtt, 5.0f / dtt, 121.0f / dtt, (uint)tex2d.TextureId);
            progressBarRight = new SubImage(47.0f / dtt, 101.0f / dtt, 51.0f / dtt, 121.0f / dtt, (uint)tex2d.TextureId);
            progressBarTop = new SubImage(106.0f / dtt, 117.0f / dtt, 126.0f / dtt, 121.0f / dtt, (uint)tex2d.TextureId);
            progressBarBottom = new SubImage(106.0f / dtt, 145.0f / dtt, 126.0f / dtt, 149.0f / dtt, (uint)tex2d.TextureId);

            scrollBarVerticalBottomHover = new SubImage(113.0f / dtt, 101.0f / dtt, 128.0f / dtt, 116.0f / dtt, (uint)tex2d.TextureId);
            scrollBarVerticalBottomNormal = new SubImage(33.0f / dtt, 122.0f / dtt, 48.0f / dtt, 137.0f / dtt, (uint)tex2d.TextureId);
        }
コード例 #2
0
ファイル: textures.cs プロジェクト: RobertCL/MissionPlanner
 public Texture2D CreateTexture2D(string name, Stream str)
 {
     Texture2D tex = new Texture2D(name);
     tex.LoadFromStream(str);
     textures.Add(tex);
     return tex;
 }
コード例 #3
0
ファイル: textures.cs プロジェクト: RobertCL/MissionPlanner
 public Texture2D CreateTexture2D(TextFontTexture textFontTex)
 {
     Texture2D tex = new Texture2D("TextFontTexture", textFontTex);
     return tex;
 }
コード例 #4
0
ファイル: textures.cs プロジェクト: RobertCL/MissionPlanner
 public Texture2D CreateTexture2D(string name, string path)
 {
     Texture2D tex = new Texture2D(name);
     tex.LoadFromFile(path);
     textures.Add(tex);
     return tex;
 }