Merge dev into main #18

Merged
JacobTech merged 5 commits from dev into main 2024-04-11 20:36:04 -04:00
Showing only changes of commit 78c94e17ca - Show all commits

View File

@ -13,17 +13,21 @@ public class ServerIcon<TServer> : UserControl where TServer : Server
private Rectangle SelectedRect;
private static ServerIcon<MainServer>? ser1;
private static ServerIcon<PublicServer>? ser2;
private bool Selected = false;
public async Task LoadServer()
{
Selected = true;
if (ser1 is not null)
{
ser1.SelectedRect.BackgroundColor = new(26, 26, 26, 255);
ser1.Selected = false;
ser1 = null;
}
if (ser2 is not null)
{
ser2.SelectedRect.BackgroundColor = new(26, 26, 26, 255);
ser2.Selected = false;
ser2 = null;
}
@ -80,6 +84,7 @@ public class ServerIcon<TServer> : UserControl where TServer : Server
private async Task OnClicked(IRenderObject arg)
{
if (Selected) return;
await LoadServer();
}