Class ActionHistory

java.lang.Object
group24.escaperoom.screens.editor.ActionHistory

public class ActionHistory extends Object
Utility class to manage the undo/redo history in the LevelEditorScreen
  • Constructor Details

    • ActionHistory

      public ActionHistory()
  • Method Details

    • getUndoButton

      public com.badlogic.gdx.scenes.scene2d.ui.ImageButton getUndoButton()
      Returns:
      the button which, when pressed, undoes an ActionHistory.EditorAction
    • getRedoButton

      public com.badlogic.gdx.scenes.scene2d.ui.ImageButton getRedoButton()
      Returns:
      the button which, when pressed, redoes an ActionHistory.EditorAction
    • record

      public void record(ActionHistory.EditorAction action)
      Parameters:
      action - the action to record
    • undo

      public boolean undo()
      Returns:
      whether or not there is an action to undo
    • redo

      public boolean redo()
      Returns:
      whether or not there is an action to redo