mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-23 13:09:11 +00:00
Renamed SDLK_a-z to SDLK_A-Z
Made the symbols uppercase for consistency with the other SDLK_* constants, but the values are still lowercase.
This commit is contained in:
parent
d9dc4b320a
commit
e8dbbf8380
16 changed files with 275 additions and 93 deletions
|
@ -91,14 +91,14 @@ int main(int argc, char *argv[])
|
|||
w1 = NULL;
|
||||
}
|
||||
} else if (e.type == SDL_EVENT_KEY_DOWN) {
|
||||
if ((e.key.key == SDLK_m || e.key.key == SDLK_n) && !w2) {
|
||||
if ((e.key.key == SDLK_M || e.key.key == SDLK_N) && !w2) {
|
||||
if (SDL_CreateWindowAndRenderer("Non-Modal Window", 320, 200, SDL_WINDOW_HIDDEN, &w2, &r2) < 0) {
|
||||
SDL_Log("Failed to create modal window and/or renderer: %s\n", SDL_GetError());
|
||||
exit_code = 1;
|
||||
goto sdl_quit;
|
||||
}
|
||||
|
||||
if (e.key.key == SDLK_m) {
|
||||
if (e.key.key == SDLK_M) {
|
||||
if (!SDL_SetWindowModalFor(w2, w1)) {
|
||||
SDL_SetWindowTitle(w2, "Modal Window");
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ int main(int argc, char *argv[])
|
|||
SDL_DestroyWindow(w2);
|
||||
r2 = NULL;
|
||||
w2 = NULL;
|
||||
} else if (e.key.key == SDLK_h) {
|
||||
} else if (e.key.key == SDLK_H) {
|
||||
if (e.key.mod & SDL_KMOD_CTRL) {
|
||||
/* Hide the parent, which should hide the modal too. */
|
||||
show_deadline = SDL_GetTicksNS() + SDL_SECONDS_TO_NS(3);
|
||||
|
@ -121,7 +121,7 @@ int main(int argc, char *argv[])
|
|||
SDL_HideWindow(w2);
|
||||
}
|
||||
}
|
||||
} else if (e.key.key == SDLK_p && w2) {
|
||||
} else if (e.key.key == SDLK_P && w2) {
|
||||
if (SDL_GetWindowFlags(w2) & SDL_WINDOW_MODAL) {
|
||||
/* Unparent the window */
|
||||
if (!SDL_SetWindowModalFor(w2, NULL)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue