Skip to content

Commit 3f0b040

Browse files
committed
Add ImeTextInput event to TextInputEXT.cs; Bump version
1 parent a2fcdb0 commit 3f0b040

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

FNA.NET.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@
459459
<PackageTags>fna;xna;net8</PackageTags>
460460
<PackageId>FNA.NET</PackageId>
461461
<Copyright>Copyright 2026 FNA-NET</Copyright>
462-
<VersionPrefix>2.2.4.2602</VersionPrefix>
462+
<VersionPrefix>2.2.5.2602</VersionPrefix>
463463
<VersionSuffix></VersionSuffix>
464464
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
465465

src/FNAPlatform/SDL3_FNAPlatform.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,8 @@ ref bool textInputSuppress
11581158
{
11591159
TextInputEXT.OnTextInput(charsBuffer[i]);
11601160
}
1161+
1162+
TextInputEXT.OnImeTextInput(new string(charsBuffer, 0, chars));
11611163
}
11621164
}
11631165

src/Input/TextInputEXT.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public static class TextInputEXT
2626
/// </summary>
2727
public static event Action<char> TextInput;
2828

29+
public static event Action<string> ImeTextInput;
30+
2931
/// <summary>
3032
/// This event notifies you of in-progress text composition happening in an IME or other tool
3133
/// and allows you to display the draft text appropriately before it has become input.
@@ -104,6 +106,14 @@ internal static void OnTextInput(char c)
104106
}
105107
}
106108

109+
internal static void OnImeTextInput(string text)
110+
{
111+
if (ImeTextInput != null)
112+
{
113+
ImeTextInput(text);
114+
}
115+
}
116+
107117
internal static void OnTextEditing(string text, int start, int length)
108118
{
109119
if (TextEditing != null)

0 commit comments

Comments
 (0)