Skip to content

Commit

Permalink
Make Decimal use SDL number input type
Browse files Browse the repository at this point in the history
Was using "TEXT" for iOS's sake, but that is now fixed in libsdl-org/SDL#12025.
  • Loading branch information
frenzibyte committed Jan 21, 2025
1 parent c59d7dc commit 6d04d54
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions osu.Framework/Platform/SDL3/SDL3Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,9 +1016,6 @@ public static SDL_TextInputType ToSDLTextInputType(this TextInputType type)
switch (type)
{
default:
// todo: SDL does not have a corresponding type for "number with decimal point", fall back to text for now.
// On iOS, using SDL_TEXTINPUT_TYPE_NUMBER does not offer a key for inserting a decimal.
case TextInputType.Decimal:
case TextInputType.Text:
return SDL_TextInputType.SDL_TEXTINPUT_TYPE_TEXT;

Expand All @@ -1032,6 +1029,7 @@ public static SDL_TextInputType ToSDLTextInputType(this TextInputType type)
return SDL_TextInputType.SDL_TEXTINPUT_TYPE_TEXT_USERNAME;

case TextInputType.Number:
case TextInputType.Decimal:
return SDL_TextInputType.SDL_TEXTINPUT_TYPE_NUMBER;

case TextInputType.Password:
Expand Down

0 comments on commit 6d04d54

Please sign in to comment.