mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-09-09 20:32:09 +00:00

* replace ImageSharp with SkiaSharp for inline keyboard applet rendering * fix avalonia inline keyboard input * remove image sharp from gtk3 project * add skiasharp linux assets * fix whitespace * fix format * fix ico image offset when saving shortcut to windows
43 lines
972 B
C#
43 lines
972 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Input;
|
|
using Avalonia.Interactivity;
|
|
using System;
|
|
|
|
namespace Ryujinx.Ava.UI.Helpers
|
|
{
|
|
public class OffscreenTextBox : TextBox
|
|
{
|
|
protected override Type StyleKeyOverride => typeof(TextBox);
|
|
|
|
public static RoutedEvent<KeyEventArgs> GetKeyDownRoutedEvent()
|
|
{
|
|
return KeyDownEvent;
|
|
}
|
|
|
|
public static RoutedEvent<KeyEventArgs> GetKeyUpRoutedEvent()
|
|
{
|
|
return KeyUpEvent;
|
|
}
|
|
|
|
public void SendKeyDownEvent(KeyEventArgs keyEvent)
|
|
{
|
|
OnKeyDown(keyEvent);
|
|
}
|
|
|
|
public void SendKeyUpEvent(KeyEventArgs keyEvent)
|
|
{
|
|
OnKeyUp(keyEvent);
|
|
}
|
|
|
|
public void SendText(string text)
|
|
{
|
|
OnTextInput(new TextInputEventArgs
|
|
{
|
|
Text = text,
|
|
Source = this,
|
|
RoutedEvent = TextInputEvent,
|
|
});
|
|
}
|
|
}
|
|
}
|