Alternate servers.

Now, using the new alternate servers.
This commit is contained in:
JacobTech 2023-08-25 12:13:06 -04:00
parent c178ec62cf
commit a6fc28e2ab
4 changed files with 17 additions and 17 deletions

View File

@ -273,7 +273,7 @@ public class MainScreen : Window
Location = new(ser.Size.X, 0),
Size = new(Size.X - ser.Size.X, Size.Y),
Anchor = ObjectAnchor.All,
BackgroundColor = Color4.DarkRed
BackgroundColor = new(20,20,20,255)
};
Controls.Add(SerBox);
SerBox.LoadToParent(this, this);
@ -283,9 +283,12 @@ public class MainScreen : Window
#endregion
#region Channel Selector Init
SocketChannel currentchannel = await Server.User.GetSelectedChannel(CancellationToken.None);
SocketChannel current_channel = await Server.User.GetSelectedChannel(CancellationToken.None);
Channel.SelectedTextures[0] = Globals.ms.TextureManager.AddTexture(Tools.GetResourceStream(Assembly.GetExecutingAssembly(), "Luski.Resources.Textures.al.png"));
Channel.SelectedTextures[1] = Globals.ms.TextureManager.AddTexture(Tools.GetResourceStream(Assembly.GetExecutingAssembly(), "Luski.Resources.Textures.ac.png"));
Channel.SelectedTextures[2] = Globals.ms.TextureManager.AddTexture(Tools.GetResourceStream(Assembly.GetExecutingAssembly(), "Luski.Resources.Textures.ar.png"));
List<SocketCategory> parents = new();
SocketCategory? cur = await currentchannel.GetParent();
SocketCategory? cur = await current_channel.GetParent();
while (cur is not null)
{
parents.Add(cur);
@ -296,16 +299,13 @@ public class MainScreen : Window
ChannelSelector cs = new(parents[0])
{
BackgroundColor = new(34, 34, 34, 255),
Size = new((int)(307 * Globals.Settings.Scale), SerBox.Size.Y - 150),
Size = new((int)(307 * Globals.Settings.Scale), SerBox.Size.Y - 106),
Anchor = ObjectAnchor.Top | ObjectAnchor.Left | ObjectAnchor.Bottom
};
parents.RemoveAt(0);
SerBox.Controls.Add(cs);
cs.LoadToParent(SerBox, this);
cs.ForceDistanceUpdate();
Channel.SelectedTextures[0] = Globals.ms.TextureManager.AddTexture(Tools.GetResourceStream(Assembly.GetExecutingAssembly(), "Luski.Resources.Textures.al.png"));
Channel.SelectedTextures[1] = Globals.ms.TextureManager.AddTexture(Tools.GetResourceStream(Assembly.GetExecutingAssembly(), "Luski.Resources.Textures.ac.png"));
Channel.SelectedTextures[2] = Globals.ms.TextureManager.AddTexture(Tools.GetResourceStream(Assembly.GetExecutingAssembly(), "Luski.Resources.Textures.ar.png"));
cs.ForceDistanceUpdate(SerBox);
#endregion
#region Chat Init
@ -322,7 +322,7 @@ public class MainScreen : Window
#endregion
#region Channel Selector Loader
_ = cs.Load(currentchannel, parents);
_ = cs.Load(current_channel, parents);
#endregion
#region User Icon
@ -396,9 +396,7 @@ public class MainScreen : Window
Texture uut =
TextureManager.AddTexture(Globals.Luski.MainServer.User.GetAvatar(CancellationToken.None).Result);
uut.Unit = TextureUnit.Texture1;
// u.Shader = Rectangle.DefaultAlphaTextureShader[Context];
//u.Textures.Add(uut);
//Controls.Add(u);
Label ul = new Label(Globals.DefaultFont)
{
Anchor = ObjectAnchor.Bottom | ObjectAnchor.Left,

View File

@ -8,9 +8,9 @@ using GraphicsManager.Objects.Core;
using Luski.net.Interfaces;
using Luski.net.Structures.Main;
using Luski.net.Structures.Public;
using OpenTK.Graphics.OpenGL4;
using OpenTK.Mathematics;
using OpenTK.Windowing.Common.Input;
using Label = GraphicsManager.Objects.Label;
namespace Luski.GUI.MainScreen.UI.PublicServers;
@ -178,9 +178,11 @@ public class ChatMessage : UserControl
if (OperatingSystem.IsWindows())
Process.Start(m.Text);
else if (OperatingSystem.IsLinux())
{
if (m.Tag is string s) Process.Start("xdg-open", s);
else Process.Start("xdg-open", m.Text);
}
}
catch (Exception e)
{
Console.WriteLine(e);

View File

@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="GraphicsManager" Version="1.0.6-alpha89" />
<PackageReference Include="Luski.net" Version="2.0.0-alpha12" />
<PackageReference Include="Luski.net" Version="2.0.0-alpha23" />
</ItemGroup>
<ItemGroup>

View File

@ -50,7 +50,7 @@ try
Globals.ms = new MainScreen();
Globals.ms.CustomF11 = false;
Globals.ms.DrawFrame();
Globals.ms.Cursor = new MouseCursor(0, 0, Logo.Width, Logo.Height, pixels);
//Globals.ms.Cursor = new MouseCursor(0, 0, Logo.Width, Logo.Height, pixels);
pixels = Array.Empty<byte>();
Globals.ms.StartRender();
Globals.ms.Dispose();