mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-30 21:37:43 +08: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);
|
ToggleSettings(ctx);
|
||||||
} else if (ctx->settings_visible) {
|
} else if (ctx->settings_visible) {
|
||||||
ClickSettings(ctx, point.x, point.y);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user