diff --git a/LemonUI/Menus/NativeCheckboxItem.cs b/LemonUI/Menus/NativeCheckboxItem.cs
index 00d0f51..549a3c7 100644
--- a/LemonUI/Menus/NativeCheckboxItem.cs
+++ b/LemonUI/Menus/NativeCheckboxItem.cs
@@ -22,6 +22,31 @@ public class NativeCheckboxItem : NativeItem
#endregion
+ #region Defaults
+
+ ///
+ /// The default checkbox textures when the checkbox is checked.
+ ///
+ public static readonly BadgeSet DefaultCheckedSet = new BadgeSet
+ {
+ NormalDictionary = "commonmenu",
+ NormalTexture = "shop_box_blank",
+ HoveredDictionary = "commonmenu",
+ HoveredTexture = "shop_box_blankb"
+ };
+ ///
+ /// The default checkbox textures when the checkbox is not checked.
+ ///
+ public static readonly BadgeSet DefaultUncheckedSet = new BadgeSet
+ {
+ NormalDictionary = "commonmenu",
+ NormalTexture = "shop_box_tick",
+ HoveredDictionary = "commonmenu",
+ HoveredTexture = "shop_box_tickb"
+ };
+
+ #endregion
+
#region Properties
///
@@ -41,6 +66,14 @@ public bool Checked
CheckboxChanged?.Invoke(this, EventArgs.Empty);
}
}
+ ///
+ /// The textures used when the checkbox is checked.
+ ///
+ public BadgeSet CheckedSet { get; set; } = DefaultCheckedSet;
+ ///
+ /// The textures used when the checkbox is unchecked.
+ ///
+ public BadgeSet UncheckedSet { get; set; } = DefaultUncheckedSet;
#endregion
@@ -110,15 +143,17 @@ public NativeCheckboxItem(string title, string description, bool check) : base(t
///
protected internal void UpdateTexture(bool selected)
{
+ bool showLight = !selected || !Enabled;
+
// If the item is not selected or is not enabled, use the white pictures
- if (!selected || !Enabled)
+ if (Checked)
{
- check.Texture = Checked ? "shop_box_tick" : "shop_box_blank";
+ check.Texture = showLight ? CheckedSet.NormalTexture : CheckedSet.HoveredTexture;
}
// Otherwise, use the black ones
else
{
- check.Texture = Checked ? "shop_box_tickb" : "shop_box_blankb";
+ check.Texture = showLight ? UncheckedSet.NormalTexture : UncheckedSet.HoveredTexture;
}
}