Skip to content

Commit

Permalink
Force disable of GoldButtons when running in DOSMode
Browse files Browse the repository at this point in the history
When running with retaild DOS files the button texture file is not
present and therefore we can't have this.

Therefore we force this to be disabled in this case.

Signed-off-by: Giuliano Belinassi <[email protected]>
  • Loading branch information
giulianobelinassi committed May 28, 2024
1 parent 5071cd6 commit 4b455e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tiberiandawn/dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ void Draw_Box(int x, int y, int w, int h, BoxStyleEnum up, bool filled)
useGoldStyle = Settings.Video.ButtonStyle == 1;
}

/* If DOSMode is enabled then force disable of goldstyle buttons once the
textures may not be available. */
if (Get_Resolution_Factor() == 0) {
useGoldStyle = false;
}

w--;
h--;
BoxStyleType const& style = useGoldStyle ? ButtonColorsGold[up] : ButtonColorsClassic[up];
Expand Down

0 comments on commit 4b455e5

Please sign in to comment.