Move solution and projects to src
This commit is contained in:
40
src/Ryujinx.Ava/UI/Helpers/OffscreenTextBox.cs
Normal file
40
src/Ryujinx.Ava/UI/Helpers/OffscreenTextBox.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Helpers
|
||||
{
|
||||
public class OffscreenTextBox : TextBox
|
||||
{
|
||||
public RoutedEvent<KeyEventArgs> GetKeyDownRoutedEvent()
|
||||
{
|
||||
return KeyDownEvent;
|
||||
}
|
||||
|
||||
public 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,
|
||||
Device = KeyboardDevice.Instance,
|
||||
Source = this,
|
||||
RoutedEvent = TextInputEvent
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user