Merge dev into main #18
@ -1,4 +1,5 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using GraphicsManager.Enums;
|
using GraphicsManager.Enums;
|
||||||
using GraphicsManager.Interfaces;
|
using GraphicsManager.Interfaces;
|
||||||
using GraphicsManager.Objects;
|
using GraphicsManager.Objects;
|
||||||
@ -7,6 +8,7 @@ using Luski.net.Structures.Main;
|
|||||||
using Luski.net.Structures.Public;
|
using Luski.net.Structures.Public;
|
||||||
using OpenTK.Mathematics;
|
using OpenTK.Mathematics;
|
||||||
using OpenTK.Windowing.Common.Input;
|
using OpenTK.Windowing.Common.Input;
|
||||||
|
using OpenTK.Windowing.GraphicsLibraryFramework;
|
||||||
using Label = GraphicsManager.Objects.Label;
|
using Label = GraphicsManager.Objects.Label;
|
||||||
|
|
||||||
namespace Luski.GUI.MainScreen.UI.PublicServers;
|
namespace Luski.GUI.MainScreen.UI.PublicServers;
|
||||||
@ -97,6 +99,17 @@ public class ChatMessage : UserControl
|
|||||||
Label l;
|
Label l;
|
||||||
Controls.Add(l = new Label(Globals.MessageFont) { Location = new(LastObject.Location.X, (int)(UserIcon.Location.Y + UserIcon.Size.Y - Globals.MessageFont.PixelHeight), 0), Text = message.Context});
|
Controls.Add(l = new Label(Globals.MessageFont) { Location = new(LastObject.Location.X, (int)(UserIcon.Location.Y + UserIcon.Size.Y - Globals.MessageFont.PixelHeight), 0), Text = message.Context});
|
||||||
LastObject = l;
|
LastObject = l;
|
||||||
|
LuskiContextMenu lcm = new();
|
||||||
|
Label llllll = lcm.AddLabel("Copy Text");
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
llllll.Clicked += (o) =>
|
||||||
|
{
|
||||||
|
GLFW.SetClipboardString(Globals.ms.WindowPtr, message.Context);
|
||||||
|
return Task.CompletedTask;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
l.ContextMenu = lcm;
|
||||||
MessageObjs.Add(l);
|
MessageObjs.Add(l);
|
||||||
}
|
}
|
||||||
Globals.Settings.DayTimeChanged += () =>
|
Globals.Settings.DayTimeChanged += () =>
|
||||||
@ -196,6 +209,17 @@ public class ChatMessage : UserControl
|
|||||||
Controls.Add(newLabel);
|
Controls.Add(newLabel);
|
||||||
MessageObjs.Add(newLabel);
|
MessageObjs.Add(newLabel);
|
||||||
LastObject = newLabel;
|
LastObject = newLabel;
|
||||||
|
LuskiContextMenu lcm = new();
|
||||||
|
Label llllll = lcm.AddLabel("Copy Text");
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
llllll.Clicked += (o) =>
|
||||||
|
{
|
||||||
|
GLFW.SetClipboardString(Globals.ms.WindowPtr, msg.Context);
|
||||||
|
return Task.CompletedTask;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
newLabel.ContextMenu = lcm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user