mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 05:58:35 +01:00
32 lines
1.8 KiB
C#
32 lines
1.8 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using MLEM.Graphics;
|
|
|
|
namespace MLEM.Ui.Style {
|
|
/// <summary>
|
|
/// The default, untextured <see cref="UiStyle"/>.
|
|
/// Note that, as MLEM does not provide any texture or font assets, this default style is made up of single-color textures that were generated using <see cref="SpriteBatchExtensions.GenerateNinePatch"/>.
|
|
/// </summary>
|
|
public class UntexturedStyle : UiStyle {
|
|
|
|
/// <summary>
|
|
/// Creates a new untextured style with textures generated by the given sprite batch
|
|
/// </summary>
|
|
/// <param name="batch">The sprite batch to generate the textures with</param>
|
|
public UntexturedStyle(SpriteBatch batch) {
|
|
this.SelectionIndicator = batch.GenerateNinePatch(Color.Transparent, Color.Red);
|
|
this.ButtonTexture = batch.GenerateNinePatch(Color.CadetBlue, Color.Black);
|
|
this.PanelTexture = batch.GenerateNinePatch(Color.Gray, Color.Black);
|
|
this.TextFieldTexture = batch.GenerateNinePatch(Color.MediumBlue, Color.Black);
|
|
this.ScrollBarBackground = batch.GenerateNinePatch(Color.LightBlue, Color.Black);
|
|
this.ScrollBarScrollerTexture = batch.GenerateNinePatch(Color.Blue, Color.Black);
|
|
this.CheckboxTexture = batch.GenerateNinePatch(Color.LightBlue, Color.Black);
|
|
this.CheckboxCheckmark = batch.GenerateNinePatch(Color.Blue, Color.Black).Region;
|
|
this.RadioTexture = batch.GenerateNinePatch(Color.AliceBlue, Color.Black);
|
|
this.RadioCheckmark = batch.GenerateNinePatch(Color.CornflowerBlue, Color.Black).Region;
|
|
this.TooltipBackground = batch.GenerateNinePatch(Color.Black * 0.65F, Color.Black * 0.65F);
|
|
this.ProgressBarTexture = batch.GenerateNinePatch(Color.RoyalBlue, Color.Black);
|
|
}
|
|
|
|
}
|
|
}
|