Skip to content

Commit

Permalink
Work around #473: Hide tooltips in multiplayer
Browse files Browse the repository at this point in the history
When you have both tooltips and the big score board, the tooltips erase
the score board in strange ways. Until we solve the root cause of those
drawing/undrawing races, let's hide the tooltips altogether during
multiplayer and when watching replays of multiplayer games.
  • Loading branch information
SimonN committed Nov 21, 2023
1 parent 37adf1a commit 351683c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/game/core/game.d
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ private:
// make the effect manager depend on what the GUI chooses.
_effect = new EffectManager(determineLocalStyle(rp));
nurse = new InteractiveNurse(level, rp, _effect);
// After the nurse has been created here, this.view() works.

initializePanel();
initializeMapAndRepEdit();
Expand Down Expand Up @@ -367,8 +368,13 @@ private:
screenXlg - Tweaker.suggestedTweakerXlg, 20, From.BOTTOM_RIGHT));
_mapClickExplainer = new TooltipLine(new Geom(0, 0,
screenXlg - Tweaker.suggestedTweakerXlg, 20, From.TOP_RIGHT));
_panelExplainer.shown = opt.ingameTooltips.value;
_mapClickExplainer.shown = opt.ingameTooltips.value;

// Workaround for github #473: Tooltips and the big score board
// don't get along. For now, hide tooltips in modes with the board.
immutable bool github473
= opt.ingameTooltips.value && ! view.showScoreGraph;
_panelExplainer.shown = github473;
_mapClickExplainer.shown = github473;
gui.addElder(_panelExplainer);
gui.addElder(_mapClickExplainer);

Expand Down

0 comments on commit 351683c

Please sign in to comment.