Skip to content

Commit

Permalink
Update gui_window_help.h
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Dec 13, 2022
1 parent fd03f1d commit 61f91b9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui_window_help.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ GuiWindowHelpState InitGuiWindowHelp(void)
// Calculate window height if not specifically defined
if (state.windowBounds.height == 0) state.windowBounds.height = (float)(state.contentHeight + 24 + 4);
state.windowBounds.y = GetScreenHeight()/2 - state.windowBounds.height/2;

// Review size if it does not fit on the screen
if (state.windowBounds.height > (GetScreenHeight() - 80))
{
state.windowBounds.height = GetScreenHeight() - 80;
state.windowBounds.y = GetScreenHeight()/2 - state.windowBounds.height/2;
}

// Init scroll offset
state.scrollPanelOffset = (Vector2){ 0, 0 };
Expand Down

0 comments on commit 61f91b9

Please sign in to comment.