mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
a
This commit is contained in:
parent
42345d72db
commit
cc14085fc0
2 changed files with 7 additions and 11 deletions
|
|
@ -82,7 +82,6 @@ static const RbException excToRbExc[] =
|
|||
void raiseRbExc(const Exception &exc){
|
||||
RbData *data = getRbData();
|
||||
VALUE excClass = data->exc[excToRbExc[exc.type]];
|
||||
|
||||
rb_raise(excClass, "%s", exc.msg.c_str());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -477,19 +477,17 @@ struct SettingsMenuPrivate
|
|||
TTF_SetFontStyle(font, TTF_STYLE_NORMAL);
|
||||
}
|
||||
|
||||
SDL_Surface *createTextSurface(const char *str, bool bold)
|
||||
{
|
||||
SDL_Color c = { cText, cText, cText, 255 };
|
||||
SDL_Surface *createTextSurface(const char *str, bool bold){
|
||||
//SDL_Color c = { cText, cText, cText, 255 };
|
||||
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,
|
||||
bool bold)
|
||||
SDL_Surface *createTextSurface(const char *str, SDL_Color c, bool bold)
|
||||
{
|
||||
applyFontStyle(bold);
|
||||
return TTF_RenderText_Blended(font, str, c);
|
||||
return TTF_RenderText_Blended(font, str, strlen(str), c);
|
||||
}
|
||||
|
||||
/* Horizontally centered */
|
||||
|
|
@ -1222,11 +1220,10 @@ bool SettingsMenu::onEvent(const SDL_Event &event,
|
|||
case SDL_EVENT_KEY_DOWN:
|
||||
if (p->state != AwaitingInput)
|
||||
{
|
||||
if (event.key.sym == SDLK_RETURN)
|
||||
if (event.key.key == SDLK_RETURN)
|
||||
p->onAccept();
|
||||
else if (event.key.sym == SDLK_ESCAPE)
|
||||
else if (event.key.key == SDLK_ESCAPE)
|
||||
p->onCancel();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue