mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-05-02 11:57:43 +02:00

These changes allow players to matchmake for local wireless using a LDN server. The network implementation originates from Berry's public TCP RyuLDN fork. Logo and unrelated changes have been removed. Additionally displays LDN game status in the game selection window when RyuLDN is enabled. Functionality is only enabled while network mode is set to "RyuLDN" in the settings.
62 lines
1.9 KiB
C#
62 lines
1.9 KiB
C#
using Avalonia.Controls;
|
|
using Avalonia.Controls.Primitives;
|
|
using Avalonia.Media;
|
|
using Avalonia.Platform;
|
|
using FluentAvalonia.UI.Windowing;
|
|
using Ryujinx.Ava.Common.Locale;
|
|
using Ryujinx.Ava.UI.ViewModels;
|
|
|
|
namespace Ryujinx.Ava.UI.Windows
|
|
{
|
|
public abstract class StyleableAppWindow : AppWindow
|
|
{
|
|
protected StyleableAppWindow()
|
|
{
|
|
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
|
TransparencyLevelHint = [WindowTransparencyLevel.None];
|
|
|
|
LocaleManager.Instance.LocaleChanged += LocaleChanged;
|
|
LocaleChanged();
|
|
|
|
Icon = MainWindowViewModel.IconBitmap;
|
|
}
|
|
|
|
private void LocaleChanged()
|
|
{
|
|
FlowDirection = LocaleManager.Instance.IsRTL() ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
|
|
}
|
|
|
|
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
|
{
|
|
base.OnApplyTemplate(e);
|
|
|
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.SystemChrome | ExtendClientAreaChromeHints.OSXThickTitleBar;
|
|
}
|
|
}
|
|
|
|
public abstract class StyleableWindow : Window
|
|
{
|
|
protected StyleableWindow()
|
|
{
|
|
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
|
TransparencyLevelHint = [WindowTransparencyLevel.None];
|
|
|
|
LocaleManager.Instance.LocaleChanged += LocaleChanged;
|
|
LocaleChanged();
|
|
|
|
Icon = new WindowIcon(MainWindowViewModel.IconBitmap);
|
|
}
|
|
|
|
private void LocaleChanged()
|
|
{
|
|
FlowDirection = LocaleManager.Instance.IsRTL() ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
|
|
}
|
|
|
|
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
|
{
|
|
base.OnApplyTemplate(e);
|
|
|
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.SystemChrome | ExtendClientAreaChromeHints.OSXThickTitleBar;
|
|
}
|
|
}
|
|
}
|