testime: toggle text input with a mouse click

This commit is contained in:
Sam Lantinga
2025-10-09 20:58:56 -07:00
parent e1305ec2e2
commit 5441d33c0e

View File

@@ -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;
}