From a01520ed9295ab2c6afedd56443c847e10ebe71e Mon Sep 17 00:00:00 2001 From: braker <7152322+araszka@users.noreply.github.com> Date: Sun, 9 Jun 2024 12:52:03 +0200 Subject: [PATCH] Bugfix/fallthrough attributes causing problems (#243) --- src/EvoSC.Manialinks/EvoSC.Manialinks.csproj | 2 +- src/EvoSC.Manialinks/Templates/Containers/Window.mt | 1 - src/EvoSC.Manialinks/Templates/Controls/Button.mt | 12 ++++-------- src/EvoSC.Manialinks/Templates/Controls/Switch.mt | 2 +- src/EvoSC.Manialinks/Templates/Drawing/Circle.mt | 2 +- .../Templates/Drawing/QuarterCircle.mt | 10 +++++----- src/EvoSC.Manialinks/Templates/Drawing/Rectangle.mt | 8 ++++---- src/EvoSC.Manialinks/Templates/Scripts/Button.ms | 12 ++++++------ src/EvoSC.Manialinks/Templates/Scripts/Switch.ms | 4 ++-- src/Modules/Scoreboard/Templates/Scoreboard.mt | 2 +- 10 files changed, 25 insertions(+), 30 deletions(-) diff --git a/src/EvoSC.Manialinks/EvoSC.Manialinks.csproj b/src/EvoSC.Manialinks/EvoSC.Manialinks.csproj index 2ac3f423a..0347d70df 100644 --- a/src/EvoSC.Manialinks/EvoSC.Manialinks.csproj +++ b/src/EvoSC.Manialinks/EvoSC.Manialinks.csproj @@ -13,6 +13,6 @@ - + diff --git a/src/EvoSC.Manialinks/Templates/Containers/Window.mt b/src/EvoSC.Manialinks/Templates/Containers/Window.mt index 3585d6f1c..0bc290415 100644 --- a/src/EvoSC.Manialinks/Templates/Containers/Window.mt +++ b/src/EvoSC.Manialinks/Templates/Containers/Window.mt @@ -102,7 +102,6 @@ The window is designed to only be used once per Manialink. diff --git a/src/EvoSC.Manialinks/Templates/Controls/Switch.mt b/src/EvoSC.Manialinks/Templates/Controls/Switch.mt index 94ecb7257..a66ab945c 100644 --- a/src/EvoSC.Manialinks/Templates/Controls/Switch.mt +++ b/src/EvoSC.Manialinks/Templates/Controls/Switch.mt @@ -39,7 +39,7 @@ width="10" height="5" scriptEvents="true" - dataid="{{ id }}" + dataId="{{ id }}" cornerRadius="0.5" /> - + diff --git a/src/EvoSC.Manialinks/Templates/Drawing/QuarterCircle.mt b/src/EvoSC.Manialinks/Templates/Drawing/QuarterCircle.mt index 8a236e902..8cdfb6b9c 100644 --- a/src/EvoSC.Manialinks/Templates/Drawing/QuarterCircle.mt +++ b/src/EvoSC.Manialinks/Templates/Drawing/QuarterCircle.mt @@ -15,7 +15,7 @@ Draws a quarter of a circle from different quadrants. - + @@ -36,7 +36,7 @@ Draws a quarter of a circle from different quadrants. if='quadrant == "TopLeft"' opacity="{{ Util.ColorOpacity(color) }}" class="{{ className }}" - scriptevents="{{ scriptEvents ? 1 : 0 }}" + scriptevents="{{ scriptevents ? 1 : 0 }}" /> diff --git a/src/EvoSC.Manialinks/Templates/Drawing/Rectangle.mt b/src/EvoSC.Manialinks/Templates/Drawing/Rectangle.mt index e918455a0..5941340b4 100644 --- a/src/EvoSC.Manialinks/Templates/Drawing/Rectangle.mt +++ b/src/EvoSC.Manialinks/Templates/Drawing/Rectangle.mt @@ -62,10 +62,10 @@ Draws a rectangle. > - - - - + + + + diff --git a/src/EvoSC.Manialinks/Templates/Scripts/Button.ms b/src/EvoSC.Manialinks/Templates/Scripts/Button.ms index c0181b6e6..d9e6b0de1 100644 --- a/src/EvoSC.Manialinks/Templates/Scripts/Button.ms +++ b/src/EvoSC.Manialinks/Templates/Scripts/Button.ms @@ -6,15 +6,15 @@ Void HighlightButton(Text _Id, Boolean _Highlight, Text _ButtonType) { foreach (buttonPart in Page.GetClassChildren_Result) { declare part <=> buttonPart as CMlQuad; - declare ColorFocus = {{ Color.ToMlColor(Theme.UI_Button_Default_BgFocus) }}; - declare ColorNormal = {{ Color.ToMlColor(Theme.UI_Button_Default_Bg) }}; + declare ColorFocus = {! Color.ToMlColor(Theme.UI_Button_Default_BgFocus) !}; + declare ColorNormal = {! Color.ToMlColor(Theme.UI_Button_Default_Bg) !}; if (_ButtonType == "secondary") { - ColorFocus = {{ Color.ToMlColor(Theme.UI_Button_Secondary_BgFocus) }}; - ColorNormal = {{ Color.ToMlColor(Theme.UI_Button_Secondary_Bg) }}; + ColorFocus = {! Color.ToMlColor(Theme.UI_Button_Secondary_BgFocus) !}; + ColorNormal = {! Color.ToMlColor(Theme.UI_Button_Secondary_Bg) !}; } else if (_ButtonType == "accent") { - ColorFocus = {{ Color.ToMlColor(Theme.UI_Button_Accent_BgFocus) }}; - ColorNormal = {{ Color.ToMlColor(Theme.UI_Button_Accent_Bg) }}; + ColorFocus = {! Color.ToMlColor(Theme.UI_Button_Accent_BgFocus) !}; + ColorNormal = {! Color.ToMlColor(Theme.UI_Button_Accent_Bg) !}; } if (_Highlight) { diff --git a/src/EvoSC.Manialinks/Templates/Scripts/Switch.ms b/src/EvoSC.Manialinks/Templates/Scripts/Switch.ms index 6b9692aa3..ccedb0ac8 100644 --- a/src/EvoSC.Manialinks/Templates/Scripts/Switch.ms +++ b/src/EvoSC.Manialinks/Templates/Scripts/Switch.ms @@ -14,13 +14,13 @@ Void SetSwitchState(Text idName, Boolean value) { icon.SetText("{{ Icons.Check }}"); AnimMgr.Add(head, """""", 250, CAnimManager::EAnimManagerEasing::ExpOut); AnimMgr.Add(icon, """