public static void LoadDefaultSkin() { // *** Box *** Box_TopLeft = ContentRegister.BitmapToTexture(Resources.Box_TopLeft, "Resource_Box_TopLeft"); Box_Top = ContentRegister.BitmapToTexture(Resources.Box_Top, "Resource_Box_Top"); Box_TopRight = ContentRegister.BitmapToTexture(Resources.Box_TopRight, "Resource_Box_TopRight"); Box_Left = ContentRegister.BitmapToTexture(Resources.Box_Left, "Resource_Box_Left"); Box_Mid = ContentRegister.BitmapToTexture(Resources.Box_Mid, "Resource_Box_Mid"); Box_Right = ContentRegister.BitmapToTexture(Resources.Box_Right, "Resource_Box_Right"); Box_BottomLeft = ContentRegister.BitmapToTexture(Resources.Box_BottomLeft, "Resource_Box_BottomLeft"); Box_Bottom = ContentRegister.BitmapToTexture(Resources.Box_Bottom, "Resource_Box_Bottom"); Box_BottomRight = ContentRegister.BitmapToTexture(Resources.Box_BottomRight, "Resource_Box_BottomRight"); // *** Button *** Button_TopLeft = ContentRegister.BitmapToTexture(Resources.Button_TopLeft, "Resource_Button_TopLeft"); Button_Top = ContentRegister.BitmapToTexture(Resources.Button_Top, "Resource_Button_Top"); Button_TopRight = ContentRegister.BitmapToTexture(Resources.Button_TopRight, "Resource_Button_TopRight"); Button_Left = ContentRegister.BitmapToTexture(Resources.Button_Left, "Resource_Button_Left"); Button_Mid = Mrag.SpriteBatch.Pixel; //ContentRegister.BitmapToTexture(Resource.Button_Mid, "Resource_Button_Mid"); Button_Right = ContentRegister.BitmapToTexture(Resources.Button_Right, "Resource_Button_Right"); Button_BottomLeft = ContentRegister.BitmapToTexture(Resources.Button_BottomLeft, "Resource_Button_BottomLeft"); Button_Bottom = ContentRegister.BitmapToTexture(Resources.Button_Bottom, "Resource_Button_Bottom"); Button_BottomRight = ContentRegister.BitmapToTexture(Resources.Button_BottomRight, "Resource_Button_BottomRight"); Button_ColorMiddleBlend = new Color(26, 29, 34); }
/// <summary> /// Load a BMFont from a stream, and a single page. This page will be used as the first page. More pages can be added manually. /// </summary> /// <param name="streamXml">The stream for the XML.</param> /// <param name="texturePage">The singular (or just the first) texture page.</param> public BMFont(Stream streamXml, System.Drawing.Bitmap texturePage) { XmlSerializer deserializer = new XmlSerializer(typeof(BMFontModels.FontFile)); TextReader textReader = new StreamReader(streamXml); m_font = (BMFontModels.FontFile)deserializer.Deserialize(textReader); textReader.Close(); AddPage(ContentRegister.BitmapToTexture(texturePage, "_BMFont_ctor2_" + m_font.Pages[0].File)); }