diff --git a/Luski/GUI/MainScreen/UI/LuskiControls/TextBox.cs b/Luski/GUI/MainScreen/UI/LuskiControls/TextBox.cs index 091fec8..fb6c2c4 100644 --- a/Luski/GUI/MainScreen/UI/LuskiControls/TextBox.cs +++ b/Luski/GUI/MainScreen/UI/LuskiControls/TextBox.cs @@ -264,6 +264,10 @@ public class TextBox : UserControl set { _watermark.Text = value; + if (string.IsNullOrEmpty(Text)) + { + Pointer.Location = _label.Location; + } } } diff --git a/Luski/GUI/MainScreen/UI/PublicServers/PublicChat.cs b/Luski/GUI/MainScreen/UI/PublicServers/PublicChat.cs index 856e1d6..be59d91 100644 --- a/Luski/GUI/MainScreen/UI/PublicServers/PublicChat.cs +++ b/Luski/GUI/MainScreen/UI/PublicServers/PublicChat.cs @@ -402,7 +402,11 @@ public class PublicChat : UserControl FileUpload FU = new(Channel!.Server, FilePath); FilesToUpload.Add(FU); FileFlow.Controls.Add(FU); - FU.BackgroundColor = Color4.Red; + FU.Clicked += o => + { + RemoveFile(FU); + return Task.CompletedTask; + }; if (ReloadUI) TryDraw(); } @@ -410,7 +414,6 @@ public class PublicChat : UserControl private Task CFOnSizeChanged(IRenderObject arg) { - FileFlow.BackgroundColor = Color4.Green; arg.Location = new(arg.Location.X, arg.Location.Y + OldSize - arg.Size.Y); MessageFlow.Size = new(MessageFlow.Size.X, FileFlow.Location.Y - MessageFlow.Location.Y); OldSize = arg.Size.Y; @@ -426,6 +429,8 @@ public class PublicChat : UserControl public void RemoveFile(FileUpload FU) { + FileFlow.Controls.Remove(FU); + FilesToUpload.Remove(FU); MessageFlow.Size = new(MessageFlow.Size.X, FileFlow.Location.Y - MessageFlow.Location.Y); } diff --git a/Luski/GUI/MainScreenWindow.cs b/Luski/GUI/MainScreenWindow.cs index f1dba4d..03f5d41 100644 --- a/Luski/GUI/MainScreenWindow.cs +++ b/Luski/GUI/MainScreenWindow.cs @@ -209,13 +209,21 @@ public class MainScreenWindow : Window .Result.Content.ReadAsStringAsync().Result != FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion) { - var update = new UpdateWindow(); - var result = update.ShowDialogue(this); - if (result == UpdateWindow.DialogueResult.Yes) + if (Globals.UpdaterSettings.AutoUpdate) { Globals.Download = true; Close(); } + else + { + var update = new UpdateWindow(); + var result = update.ShowDialogue(this); + if (result == UpdateWindow.DialogueResult.Yes) + { + Globals.Download = true; + Close(); + } + } } await LoginOnChangeToApp(); } @@ -752,11 +760,11 @@ public class MainScreenWindow : Window private Task AddButtonClicked(IRenderObject arg) { - CenterFullScreenBase aso = new(new AddServerOverlayForm()) + /* CenterFullScreenBase aso = new(new AddServerOverlayForm()) { AllowHoverFromBehind = false - }; - //AddServerOverlayld aso = new(); + };*/ + AddServerOverlayld aso = new(); aso.Clicked += AsoOnClicked; Controls.Add(aso);