mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-13 07:13:35 +00:00
testime: toggle text input with a mouse click
This commit is contained in:
@@ -1044,6 +1044,14 @@ int main(int argc, char *argv[])
|
||||
ToggleSettings(ctx);
|
||||
} else if (ctx->settings_visible) {
|
||||
ClickSettings(ctx, point.x, point.y);
|
||||
} else {
|
||||
if (SDL_TextInputActive(ctx->window)) {
|
||||
SDL_Log("Disabling text input\n");
|
||||
SDL_StopTextInput(ctx->window);
|
||||
} else {
|
||||
SDL_Log("Enabling text input\n");
|
||||
SDL_StartTextInput(ctx->window);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user