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:
parent
10af642342
commit
3afe98612c
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user