Skip to content

Commit

Permalink
interruptSubtreeInput when resetAllButton is pressed, #156
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Apr 16, 2024
1 parent 6fcd325 commit b0beb36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/common/view/LineFormsScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default class LineFormsScreenView extends ScreenView {
// Reset All button, at bottom-right
const resetAllButton = new ResetAllButton( {
listener: () => {
this.interruptSubtreeInput();
model.reset();
viewProperties.reset();
},
Expand Down
5 changes: 4 additions & 1 deletion js/linegame/view/SettingsNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export default class SettingsNode extends Node {

// Reset All button, at rightBottom
const resetAllButton = new ResetAllButton( {
listener: () => model.reset(),
listener: () => {
this.interruptSubtreeInput();
model.reset();
},
scale: GLConstants.RESET_ALL_BUTTON_SCALE,
right: layoutBounds.width - GLConstants.SCREEN_X_MARGIN,
bottom: layoutBounds.height - GLConstants.SCREEN_Y_MARGIN
Expand Down

0 comments on commit b0beb36

Please sign in to comment.