Skip to content

Commit

Permalink
change condition for wdg_undo
Browse files Browse the repository at this point in the history
  • Loading branch information
griffi-gh committed Oct 16, 2024
1 parent bff01ea commit d2d6d50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/src/game-gui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2394,8 +2394,12 @@ game::refresh_widgets()
case 0b011: G->wdg_layervis->s[0] = gui_spritesheet::get_sprite(S_LAYERVIS_2); break;
default: case 0b111: G->wdg_layervis->s[0] = gui_spritesheet::get_sprite(S_LAYERVIS_3); break;
}
}

this->wdg_undo->add(); // XXX griffi-gh: Is this the right place?
// XXX griffi-gh: Is this the right condition?
// Shouldn't we always show the undo button in sandbox mode? (even without advanced mode)
if (G->state.sandbox && W->is_paused() && G->state.advanced_mode) {
this->wdg_undo->add();
this->wdg_undo->faded = undo.amount() == 0;
}

Expand Down

0 comments on commit d2d6d50

Please sign in to comment.