This commit is contained in:
parent
42345d72db
commit
cc14085fc0
|
|
@ -82,7 +82,6 @@ static const RbException excToRbExc[] =
|
||||||
void raiseRbExc(const Exception &exc){
|
void raiseRbExc(const Exception &exc){
|
||||||
RbData *data = getRbData();
|
RbData *data = getRbData();
|
||||||
VALUE excClass = data->exc[excToRbExc[exc.type]];
|
VALUE excClass = data->exc[excToRbExc[exc.type]];
|
||||||
|
|
||||||
rb_raise(excClass, "%s", exc.msg.c_str());
|
rb_raise(excClass, "%s", exc.msg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -477,19 +477,17 @@ struct SettingsMenuPrivate
|
||||||
TTF_SetFontStyle(font, TTF_STYLE_NORMAL);
|
TTF_SetFontStyle(font, TTF_STYLE_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Surface *createTextSurface(const char *str, bool bold)
|
SDL_Surface *createTextSurface(const char *str, bool bold){
|
||||||
{
|
//SDL_Color c = { cText, cText, cText, 255 };
|
||||||
SDL_Color c = { cText, cText, cText, 255 };
|
|
||||||
applyFontStyle(bold);
|
applyFontStyle(bold);
|
||||||
|
|
||||||
return TTF_RenderText_Blended(font, str, c);
|
return TTF_RenderText_Blended(font, str, strlen(str), c);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Surface *createTextSurface(const char *str, SDL_Color c,
|
SDL_Surface *createTextSurface(const char *str, SDL_Color c, bool bold)
|
||||||
bool bold)
|
|
||||||
{
|
{
|
||||||
applyFontStyle(bold);
|
applyFontStyle(bold);
|
||||||
return TTF_RenderText_Blended(font, str, c);
|
return TTF_RenderText_Blended(font, str, strlen(str), c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Horizontally centered */
|
/* Horizontally centered */
|
||||||
|
|
@ -1222,11 +1220,10 @@ bool SettingsMenu::onEvent(const SDL_Event &event,
|
||||||
case SDL_EVENT_KEY_DOWN:
|
case SDL_EVENT_KEY_DOWN:
|
||||||
if (p->state != AwaitingInput)
|
if (p->state != AwaitingInput)
|
||||||
{
|
{
|
||||||
if (event.key.sym == SDLK_RETURN)
|
if (event.key.key == SDLK_RETURN)
|
||||||
p->onAccept();
|
p->onAccept();
|
||||||
else if (event.key.sym == SDLK_ESCAPE)
|
else if (event.key.key == SDLK_ESCAPE)
|
||||||
p->onCancel();
|
p->onCancel();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue