mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Show non-skinnable screen placeholder at higher level
This commit is contained in:
parent
49e298e304
commit
d233f3a3ab
@ -304,7 +304,8 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
changeHandler?.Dispose();
|
changeHandler?.Dispose();
|
||||||
|
|
||||||
// Immediately clear the previous blueprint container to ensure it doesn't try to interact with the old target.
|
// Immediately clear the previous blueprint container to ensure it doesn't try to interact with the old target.
|
||||||
content?.Clear();
|
if (content?.Child is SkinBlueprintContainer)
|
||||||
|
content.Clear();
|
||||||
|
|
||||||
Scheduler.AddOnce(loadBlueprintContainer);
|
Scheduler.AddOnce(loadBlueprintContainer);
|
||||||
Scheduler.AddOnce(populateSettings);
|
Scheduler.AddOnce(populateSettings);
|
||||||
@ -325,15 +326,15 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
|
|
||||||
SelectedComponents.Clear();
|
SelectedComponents.Clear();
|
||||||
|
|
||||||
if (target.NewValue == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Debug.Assert(content != null);
|
Debug.Assert(content != null);
|
||||||
|
|
||||||
var skinComponentsContainer = getTarget(target.NewValue);
|
var skinComponentsContainer = getTarget(target.NewValue);
|
||||||
|
|
||||||
if (skinComponentsContainer == null)
|
if (target.NewValue == null || skinComponentsContainer == null)
|
||||||
|
{
|
||||||
|
content.Child = new NonSkinnableScreenPlaceholder();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
changeHandler = new SkinEditorChangeHandler(skinComponentsContainer);
|
changeHandler = new SkinEditorChangeHandler(skinComponentsContainer);
|
||||||
changeHandler.CanUndo.BindValueChanged(v => undoMenuItem.Action.Disabled = !v.NewValue, true);
|
changeHandler.CanUndo.BindValueChanged(v => undoMenuItem.Action.Disabled = !v.NewValue, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user