+
- Warning
+ Warning
-
-
+
- Warning Content
+ Warning Content
-
-
-
+
- Error
+ Error
-
-
+
- Error Content
+ Error Content
+
+
+
+
+
+ Radius
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Effects
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sizes
+
+
+
+
Fields
+
+
+
+ 3
+ 3.5
+ 4
+ 4.5
+ 5
+
+
+
+
+
Selector
+
+
+
+ 3
+ 3.5
+ 4
+ 4.5
+ 5
+
+
+
+
+
Border Width
+
+
+
+ 0.5
+ 1
+ 1.5
+ 2
+
+
+
+
@code
{
[Parameter] public ApplicationTheme Theme { get; set; }
+
+ private float[] RadiusValues =
+ [
+ 0,
+ 0.25f,
+ 0.5f,
+ 1f,
+ 2f
+ ];
+
+ private bool InputDepth
+ {
+ get => Theme.Depth != 0;
+ set => Theme.Depth = value ? 1 : 0;
+ }
+
+ private bool InputNoise
+ {
+ get => Theme.Noise != 0;
+ set => Theme.Noise = value ? 1 : 0;
+ }
+
+ private async Task UpdateRadiusBox(float value)
+ {
+ Theme.RadiusBox = value;
+ await InvokeAsync(StateHasChanged);
+ }
+
+ private async Task UpdateRadiusField(float value)
+ {
+ Theme.RadiusField = value;
+ await InvokeAsync(StateHasChanged);
+ }
+
+ private async Task UpdateRadiusSelector(float value)
+ {
+ Theme.RadiusSelector = value;
+ await InvokeAsync(StateHasChanged);
+ }
}
diff --git a/Moonlight.Client/UI/Views/Admin/Sys/Customisation/Themes/Create.razor b/Moonlight.Client/UI/Views/Admin/Sys/Customisation/Themes/Create.razor
index f3e15c43..904a6cec 100644
--- a/Moonlight.Client/UI/Views/Admin/Sys/Customisation/Themes/Create.razor
+++ b/Moonlight.Client/UI/Views/Admin/Sys/Customisation/Themes/Create.razor
@@ -109,8 +109,8 @@
SizeField = 0.25f,
Border = 1f,
- Depth = 0f,
- Noise = 0f
+ Depth = 0,
+ Noise = 0
};
}
}
diff --git a/Moonlight.Shared/Misc/ApplicationTheme.cs b/Moonlight.Shared/Misc/ApplicationTheme.cs
index ee8ac295..b391ce59 100644
--- a/Moonlight.Shared/Misc/ApplicationTheme.cs
+++ b/Moonlight.Shared/Misc/ApplicationTheme.cs
@@ -44,6 +44,6 @@ public class ApplicationTheme
public float SizeField { get; set; }
public float Border { get; set; }
- public float Depth { get; set; }
- public float Noise { get; set; }
+ public int Depth { get; set; }
+ public int Noise { get; set; }
}
\ No newline at end of file