Skip to content

Commit

Permalink
Corrected redraw area size for mission description area.
Browse files Browse the repository at this point in the history
  • Loading branch information
klei1984 committed Jun 7, 2024
1 parent 9afadf0 commit c9ae436
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/gamesetupmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,19 @@ void GameSetupMenu::DrawDescriptionPanel() {
int32_t width;
uint8_t* buffer_position;
int32_t row_index_max;
Rect bounds;

GameSetupMenu_DrawBigInfoPanel(window);

menu_item = &game_setup_menu_titles[1];
width = menu_item->bounds.lrx - menu_item->bounds.ulx;
buffer_position = &window->buffer[WindowManager_ScaleOffset(window, menu_item->bounds.ulx, menu_item->bounds.uly)];

bounds.ulx = WindowManager_ScaleUlx(window, menu_item->bounds.ulx);
bounds.uly = WindowManager_ScaleUly(window, menu_item->bounds.uly);
bounds.lrx = WindowManager_ScaleLrx(window, menu_item->bounds.ulx, menu_item->bounds.lrx);
bounds.lry = WindowManager_ScaleLrx(window, menu_item->bounds.uly, menu_item->bounds.lry);

width = bounds.lrx - bounds.ulx;
buffer_position = &window->buffer[window->width * bounds.uly + bounds.ulx];

row_index_max = string_row_index + rows_per_page;

Expand All @@ -444,7 +451,7 @@ void GameSetupMenu::DrawDescriptionPanel() {
}
}

win_draw_rect(window->id, &menu_item->bounds);
win_draw_rect(window->id, &bounds);
}

int32_t GameSetupMenu::FindNextValidFile(int32_t game_slot) {
Expand Down

0 comments on commit c9ae436

Please sign in to comment.