1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Add RestoreState() to IEditorChangeHandler

This commit is contained in:
Bartłomiej Dach 2024-06-11 11:31:30 +02:00
parent 10af642342
commit 3afe98612c
No known key found for this signature in database
3 changed files with 8 additions and 4 deletions

View File

@ -540,6 +540,8 @@ namespace osu.Game.Overlays.SkinEditor
protected void Redo() => changeHandler?.RestoreState(1); protected void Redo() => changeHandler?.RestoreState(1);
void IEditorChangeHandler.RestoreState(int direction) => changeHandler?.RestoreState(direction);
public void Save(bool userTriggered = true) => save(currentSkin.Value, userTriggered); public void Save(bool userTriggered = true) => save(currentSkin.Value, userTriggered);
private void save(Skin skin, bool userTriggered = true) private void save(Skin skin, bool userTriggered = true)

View File

@ -83,10 +83,6 @@ namespace osu.Game.Screens.Edit
} }
} }
/// <summary>
/// Restores an older or newer state.
/// </summary>
/// <param name="direction">The direction to restore in. If less than 0, an older state will be used. If greater than 0, a newer state will be used.</param>
public void RestoreState(int direction) public void RestoreState(int direction)
{ {
if (TransactionActive) if (TransactionActive)

View File

@ -43,5 +43,11 @@ namespace osu.Game.Screens.Edit
/// Note that this will be a no-op if there is a change in progress via <see cref="BeginChange"/>. /// Note that this will be a no-op if there is a change in progress via <see cref="BeginChange"/>.
/// </summary> /// </summary>
void SaveState(); void SaveState();
/// <summary>
/// Restores an older or newer state.
/// </summary>
/// <param name="direction">The direction to restore in. If less than 0, an older state will be used. If greater than 0, a newer state will be used.</param>
void RestoreState(int direction);
} }
} }