mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-11-15 09:42:51 -05: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.
33 lines
979 B
C#
33 lines
979 B
C#
using Avalonia.Markup.Xaml;
|
|
using FluentAvalonia.UI.Controls;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Ryujinx.Ava.UI.Helpers
|
|
{
|
|
public class GlyphValueConverter : MarkupExtension
|
|
{
|
|
private readonly string _key;
|
|
|
|
private static readonly Dictionary<Glyph, string> _glyphs = new()
|
|
{
|
|
{ Glyph.List, char.ConvertFromUtf32((int)Symbol.List) },
|
|
{ Glyph.Grid, char.ConvertFromUtf32((int)Symbol.ViewAll) },
|
|
{ Glyph.Chip, char.ConvertFromUtf32(59748) },
|
|
{ Glyph.Important, char.ConvertFromUtf32((int)Symbol.Important) },
|
|
};
|
|
|
|
public GlyphValueConverter(string key)
|
|
{
|
|
_key = key;
|
|
}
|
|
|
|
public string this[string key] =>
|
|
_glyphs.TryGetValue(Enum.Parse<Glyph>(key), out var val)
|
|
? val
|
|
: string.Empty;
|
|
|
|
public override object ProvideValue(IServiceProvider serviceProvider) => this[_key];
|
|
}
|
|
}
|