From c85993c6128b23cd9d975af46f558ffb4ba32dc8 Mon Sep 17 00:00:00 2001 From: Salvador Cipolla Date: Sun, 26 Jan 2025 23:33:43 -0300 Subject: [PATCH 1/2] Add mouse over configuration options for custom home view and add more button ids --- Knossos.NET/Models/CustomLauncher.cs | 9 ++++++++- Knossos.NET/Views/CustomHomeView.axaml | 20 ++++++++++---------- Knossos.NET/Views/CustomHomeView.axaml.cs | 22 +++++++++++++++++++++- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Knossos.NET/Models/CustomLauncher.cs b/Knossos.NET/Models/CustomLauncher.cs index e0f7ad9e..37140193 100644 --- a/Knossos.NET/Models/CustomLauncher.cs +++ b/Knossos.NET/Models/CustomLauncher.cs @@ -20,13 +20,20 @@ public HomeCustomButtonConfig() { } - public string? ButtonID { get; set; } = null; //ButtonLaunch, ButtonModify, ButtonUpdate, ButtonInstall, ButtonInfo, ButtonDetails, ButtonSettings + /// + /// ButtonLaunch, ButtonModify, ButtonUpdate, ButtonInstall, ButtonInfo, ButtonDetails, ButtonSettings, ButtonLaunchAdvanced + /// ButtonPlayVR, ButtonFred2, ButtonQtFred, ButtonDebug, ButtonFred2Debug, ButtonQtFredDebug, ButtonLogFile + /// + public string? ButtonID { get; set; } = null; public string? DisplayText { get; set; } = null; public string? ToolTip { get; set; } = null; public int? FontSize { get; set; } = null; public string? BackgroundHexColor { get; set; } = null; //#CD3632 hex color value public string? ForegroundHexColor { get; set; } = null; //#CD3632 hex color value public string? BorderHexColer { get; set; } = null; //#CD3632 hex color value + public string? MouseOverBackgroundHexColor { get; set; } = null; //#CD3632 hex color value + public string? MouseOverForegroundHexColor { get; set; } = null; //#CD3632 hex color value + public string? MouseOverBorderHexColer { get; set; } = null; //#CD3632 hex color value } public struct CustomMenuButton diff --git a/Knossos.NET/Views/CustomHomeView.axaml b/Knossos.NET/Views/CustomHomeView.axaml index 14e0c38b..59a0a548 100644 --- a/Knossos.NET/Views/CustomHomeView.axaml +++ b/Knossos.NET/Views/CustomHomeView.axaml @@ -68,19 +68,19 @@ - - - - - - - + + + + + + + diff --git a/Knossos.NET/Views/CustomHomeView.axaml.cs b/Knossos.NET/Views/CustomHomeView.axaml.cs index 87011d71..7913432e 100644 --- a/Knossos.NET/Views/CustomHomeView.axaml.cs +++ b/Knossos.NET/Views/CustomHomeView.axaml.cs @@ -1,6 +1,8 @@ using Avalonia.Controls; +using Avalonia.Controls.Presenters; using Avalonia.Media; using Avalonia.Media.Imaging; +using Avalonia.Styling; using Knossos.NET.Converters; using Knossos.NET.Models; using System; @@ -85,7 +87,7 @@ public CustomHomeView() var button = this.FindControl