2019-08-10 21:37:10 +02:00
using Microsoft.Xna.Framework ;
using Microsoft.Xna.Framework.Graphics ;
2024-07-19 20:02:28 +02:00
using MLEM.Graphics ;
2019-08-10 21:37:10 +02:00
namespace MLEM.Ui.Style {
2020-05-22 17:02:24 +02:00
/// <summary>
/// The default, untextured <see cref="UiStyle"/>.
2024-11-16 13:53:04 +01:00
/// 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"/>.
2020-05-22 17:02:24 +02:00
/// </summary>
2019-08-10 21:37:10 +02:00
public class UntexturedStyle : UiStyle {
2020-05-22 17:02:24 +02:00
/// <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>
2019-08-10 21:37:10 +02:00
public UntexturedStyle ( SpriteBatch batch ) {
2024-11-16 13:53:04 +01:00
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 ) ;
2019-08-10 21:37:10 +02:00
}
}
2022-06-17 18:23:47 +02:00
}