mirror of https://github.com/encounter/SDL.git
Fixed compile warnings about unused variables in IME test program.
This commit is contained in:
parent
be34036ed7
commit
21d3297597
|
@ -29,8 +29,10 @@
|
|||
static SDLTest_CommonState *state;
|
||||
static SDL_Rect textRect, markedRect;
|
||||
static SDL_Color lineColor = {0,0,0,0};
|
||||
static SDL_Color backColor = {255,255,255,0};
|
||||
static SDL_Color backColor = {255,255,255,255};
|
||||
#ifdef HAVE_SDL_TTF
|
||||
static SDL_Color textColor = {0,0,0,0};
|
||||
#endif
|
||||
static char text[MAX_TEXT_LENGTH], markedText[SDL_TEXTEDITINGEVENT_TEXT_SIZE];
|
||||
static int cursor = 0;
|
||||
#ifdef HAVE_SDL_TTF
|
||||
|
@ -113,7 +115,7 @@ void _Redraw(SDL_Renderer * renderer) {
|
|||
int w = 0, h = textRect.h;
|
||||
SDL_Rect cursorRect, underlineRect;
|
||||
|
||||
SDL_SetRenderDrawColor(renderer, 255,255,255,255);
|
||||
SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a);
|
||||
SDL_RenderFillRect(renderer,&textRect);
|
||||
|
||||
#ifdef HAVE_SDL_TTF
|
||||
|
@ -148,7 +150,7 @@ void _Redraw(SDL_Renderer * renderer) {
|
|||
cursorRect.w = 2;
|
||||
cursorRect.h = h;
|
||||
|
||||
SDL_SetRenderDrawColor(renderer, 255,255,255,255);
|
||||
SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a);
|
||||
SDL_RenderFillRect(renderer,&markedRect);
|
||||
|
||||
if (markedText[0])
|
||||
|
@ -182,11 +184,11 @@ void _Redraw(SDL_Renderer * renderer) {
|
|||
underlineRect.h = 2;
|
||||
underlineRect.w = w;
|
||||
|
||||
SDL_SetRenderDrawColor(renderer, 0,0,0,0);
|
||||
SDL_SetRenderDrawColor(renderer, lineColor.r, lineColor.g, lineColor.b, lineColor.a);
|
||||
SDL_RenderFillRect(renderer,&markedRect);
|
||||
}
|
||||
|
||||
SDL_SetRenderDrawColor(renderer, 0,0,0,0);
|
||||
SDL_SetRenderDrawColor(renderer, lineColor.r, lineColor.g, lineColor.b, lineColor.a);
|
||||
SDL_RenderFillRect(renderer,&cursorRect);
|
||||
|
||||
SDL_SetTextInputRect(&markedRect);
|
||||
|
|
Loading…
Reference in New Issue