Exemple #1
0
        public void RenderButton(GraphicsDevice device, float X, float Y, float Width, float Height, bool Hot = false)
        {
            SetTexture(WindowSkin);
            Slice9 slice = new Slice9(80, Hot ? 24 : 0, 24, 24, 4);

            VertexPositionTexture[] frame = GFXUtility.SlicedQuad(device, X, Y, Width, Height, slice, WindowSkin);
            device.DrawUserPrimitives <VertexPositionTexture>(PrimitiveType.TriangleList, frame, 0, 18);
        }
Exemple #2
0
 public void RenderFrame(GraphicsDevice device, float X, float Y, float Width, float Height, Slice9?slice = null)
 {
     SetTexture(WindowSkin);
     SetColour(Color.LightGray);
     if (!slice.HasValue)
     {
         slice = new Slice9(0, 0, 48, 48, 5, 5, 17, 5);
     }
     VertexPositionTexture[] frame = GFXUtility.SlicedQuad(device, X, Y, Width, Height, slice.GetValueOrDefault(), WindowSkin);// GFXUtility.Frame(device, X, Y, Width, Height);
     device.DrawUserPrimitives <VertexPositionTexture>(PrimitiveType.TriangleList, frame, 0, 18);
     SetColour(Color.Gray);
 }