From 29d425b5554c030274ab81f0de9406f4d124ad08 Mon Sep 17 00:00:00 2001 From: JacobTech Date: Mon, 18 Nov 2024 10:54:30 -0500 Subject: [PATCH] Fixed Role Anchor --- .../SettingsMenuBase/Core/PageUserControl.cs | 38 +++++++++++++++++++ .../Pages/Server/Roles/Roles.cs | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Luski/GUI/MainScreen/UI/LuskiControls/SettingsMenuBase/Core/PageUserControl.cs diff --git a/Luski/GUI/MainScreen/UI/LuskiControls/SettingsMenuBase/Core/PageUserControl.cs b/Luski/GUI/MainScreen/UI/LuskiControls/SettingsMenuBase/Core/PageUserControl.cs new file mode 100644 index 0000000..7e08746 --- /dev/null +++ b/Luski/GUI/MainScreen/UI/LuskiControls/SettingsMenuBase/Core/PageUserControl.cs @@ -0,0 +1,38 @@ +using GraphicsManager.Enums; +using GraphicsManager.Objects; +using GraphicsManager.Objects.Core; + +namespace Luski.GUI.MainScreen.UI.LuskiControls.SettingsMenuBase.Core; + +public class PageUserControl : UserControl, ISettingsPage +{ + public string PageName + { + get + { + return pn; + } + set + { + pn = value; + TitleLable.Text = $" \n{value}\n "; + } + } + public FontInteraction TitleFont { get; set; } + + public Label TitleLable; + private string pn = "Blank Page"; + + public PageUserControl() + { + TitleFont = Globals.DefaultFont.Clone(); + TitleFont.FontSize = FontSize.Bold; + TitleFont.PixelHeight = (uint)(TitleFont.PixelHeight * 1.4f); + Controls.Add(TitleLable = new Label(TitleFont) + { + Text = $" \nBlank Page\n " + }); + base.Visible = false; + base.Size = new(945.ScaleInt(), 896.ScaleInt()); + } +} \ No newline at end of file diff --git a/Luski/GUI/MainScreen/UI/PublicServers/ServerSettings/Pages/Server/Roles/Roles.cs b/Luski/GUI/MainScreen/UI/PublicServers/ServerSettings/Pages/Server/Roles/Roles.cs index c7bf512..5feae9c 100644 --- a/Luski/GUI/MainScreen/UI/PublicServers/ServerSettings/Pages/Server/Roles/Roles.cs +++ b/Luski/GUI/MainScreen/UI/PublicServers/ServerSettings/Pages/Server/Roles/Roles.cs @@ -5,7 +5,7 @@ using OpenTK.Mathematics; namespace Luski.GUI.MainScreen.UI.PublicServers.ServerSettings.Pages.Server.Roles; -public class Roles : PageFlow +public class Roles : PageUserControl { private ServerRoleInteraction Page;