Skip to content

Commit

Permalink
font style was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
lostjared committed Sep 20, 2024
1 parent 361ad72 commit 4972d3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions system/src/mx_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ namespace mx {
col = {0,0,0,255};
TTF_SetFontStyle(app.font, TTF_STYLE_BOLD);
}

SDL_Surface* itemSurface = TTF_RenderText_Blended(app.font, item.text.c_str(), col);
SDL_Texture* itemTexture = SDL_CreateTextureFromSurface(app.ren, itemSurface);
SDL_QueryTexture(itemTexture, NULL, NULL, &item.item_rect.w, &item.item_rect.h);
Expand All @@ -113,6 +114,7 @@ namespace mx {
SDL_RenderFillRect(app.ren, &rcx);
SDL_SetRenderDrawBlendMode(app.ren, SDL_BLENDMODE_NONE);
SDL_RenderCopy(app.ren, itemTexture, NULL, &item.item_rect);
TTF_SetFontStyle(app.font, TTF_STYLE_BOLD);
SDL_FreeSurface(itemSurface);
SDL_DestroyTexture(itemTexture);
if(item.icon != -1) {
Expand Down

0 comments on commit 4972d3c

Please sign in to comment.