1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 22:48:34 +01:00

Compare commits

...

3 commits

Author SHA1 Message Date
Ell
f8aae9f5c2 bump upcoming version 2023-06-28 13:57:05 +02:00
Ell
40a697a96c release 6.2.0 2023-06-28 13:37:05 +02:00
Ell
d85d6e8968 Added a copy constructor to UiStyle 2023-06-28 13:35:32 +02:00
3 changed files with 74 additions and 4 deletions

View file

@ -2,7 +2,8 @@
MLEM tries to adhere to [semantic versioning](https://semver.org/). Potentially breaking changes are written in **bold**.
Jump to version:
- [6.2.0](#620-in-development)
- [6.3.0](#630-in-development)
- [6.2.0](#620)
- [6.1.0](#610)
- [6.0.0](#600)
- [5.3.0](#530)
@ -10,7 +11,9 @@ Jump to version:
- [5.1.0](#510)
- [5.0.0](#500)
## 6.2.0 (In Development)
## 6.3.0 (In Development)
## 6.2.0
### MLEM
Additions
@ -43,6 +46,7 @@ Additions
- Added AddCustomStyle and ApplyCustomStyle to UiStyle to allow for easy custom styling of elements
- Added UiControls.PressElement
- Added TextField.EnterReceiver
- Added a copy constructor to UiStyle
Improvements
- Increased Element area calculation recursion limit to 64

View file

@ -236,6 +236,72 @@ namespace MLEM.Ui.Style {
private readonly Dictionary<Type, Action<Element>> elementStyles = new Dictionary<Type, Action<Element>>();
/// <summary>
/// Creates a new set of style settings with the default values.
/// </summary>
public UiStyle() {}
/// <summary>
/// Creates a new set of style settings with values inherited from the given <paramref name="original"/> style settings.
/// </summary>
/// <param name="original">The original style settings, to copy into the new instance.</param>
public UiStyle(UiStyle original) {
this.SelectionIndicator = original.SelectionIndicator;
this.MouseEnterAnimation = original.MouseEnterAnimation;
this.MouseExitAnimation = original.MouseExitAnimation;
this.ButtonTexture = original.ButtonTexture;
this.ButtonHoveredTexture = original.ButtonHoveredTexture;
this.ButtonHoveredColor = original.ButtonHoveredColor;
this.ButtonDisabledTexture = original.ButtonDisabledTexture;
this.ButtonDisabledColor = original.ButtonDisabledColor;
this.PanelTexture = original.PanelTexture;
this.PanelColor = original.PanelColor;
this.PanelChildPadding = original.PanelChildPadding;
this.PanelStepPerScroll = original.PanelStepPerScroll;
this.PanelScrollerSize = original.PanelScrollerSize;
this.PanelScrollBarOffset = original.PanelScrollBarOffset;
this.TextFieldTexture = original.TextFieldTexture;
this.TextFieldHoveredTexture = original.TextFieldHoveredTexture;
this.TextFieldHoveredColor = original.TextFieldHoveredColor;
this.TextFieldTextOffsetX = original.TextFieldTextOffsetX;
this.TextFieldCaretWidth = original.TextFieldCaretWidth;
this.ScrollBarBackground = original.ScrollBarBackground;
this.ScrollBarScrollerTexture = original.ScrollBarScrollerTexture;
this.ScrollBarSmoothScrolling = original.ScrollBarSmoothScrolling;
this.ScrollBarSmoothScrollFactor = original.ScrollBarSmoothScrollFactor;
this.CheckboxTexture = original.CheckboxTexture;
this.CheckboxHoveredTexture = original.CheckboxHoveredTexture;
this.CheckboxHoveredColor = original.CheckboxHoveredColor;
this.CheckboxDisabledTexture = original.CheckboxDisabledTexture;
this.CheckboxDisabledColor = original.CheckboxDisabledColor;
this.CheckboxCheckmark = original.CheckboxCheckmark;
this.CheckboxTextOffsetX = original.CheckboxTextOffsetX;
this.RadioTexture = original.RadioTexture;
this.RadioHoveredTexture = original.RadioHoveredTexture;
this.RadioHoveredColor = original.RadioHoveredColor;
this.RadioCheckmark = original.RadioCheckmark;
this.TooltipBackground = original.TooltipBackground;
this.TooltipOffset = original.TooltipOffset;
this.TooltipAutoNavOffset = original.TooltipAutoNavOffset;
this.TooltipTextColor = original.TooltipTextColor;
this.TooltipDelay = original.TooltipDelay;
this.TooltipTextWidth = original.TooltipTextWidth;
this.TooltipChildPadding = original.TooltipChildPadding;
this.ProgressBarTexture = original.ProgressBarTexture;
this.ProgressBarColor = original.ProgressBarColor;
this.ProgressBarProgressPadding = original.ProgressBarProgressPadding;
this.ProgressBarProgressTexture = original.ProgressBarProgressTexture;
this.ProgressBarProgressColor = original.ProgressBarProgressColor;
this.Font = original.Font;
this.TextScale = original.TextScale;
this.TextColor = original.TextColor;
this.TextAlignment = original.TextAlignment;
this.ActionSound = original.ActionSound;
this.LinkColor = original.LinkColor;
this.AdditionalFonts = new Dictionary<string, GenericFont>(original.AdditionalFonts);
this.elementStyles = new Dictionary<Type, Action<Element>>(original.elementStyles);
}
/// <summary>
/// Adds an action to the given <see cref="Element"/> type <typeparamref name="T"/> that allows applying any kind of custom styling or behavior to it.
/// Custom styles added in this manner can be applied to an element using <see cref="ApplyCustomStyle"/>.

View file

@ -1,8 +1,8 @@
#addin nuget:?package=Cake.DocFx&version=1.0.0
#tool dotnet:?package=docfx&version=2.67.3
#tool dotnet:?package=docfx&version=2.67.5
// this is the upcoming version, for prereleases
var version = Argument("version", "6.2.0");
var version = Argument("version", "6.3.0");
var target = Argument("target", "Default");
var branch = Argument("branch", "main");
var config = Argument("configuration", "Release");