mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 22:47:26 +08:00
Ensure placement uses currently selected bank
This commit is contained in:
parent
50e24ddd87
commit
372a655be1
@ -77,9 +77,10 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
// we own SelectionHandler so don't need to worry about making bindable copies (for simplicity)
|
||||
foreach (var kvp in SelectionHandler.SelectionSampleStates)
|
||||
{
|
||||
kvp.Value.BindValueChanged(_ => updatePlacementSamples());
|
||||
}
|
||||
|
||||
foreach (var kvp in SelectionHandler.SelectionBankStates)
|
||||
kvp.Value.BindValueChanged(_ => updatePlacementSamples());
|
||||
}
|
||||
|
||||
protected override void TransferBlueprintFor(HitObject hitObject, DrawableHitObject drawableObject)
|
||||
@ -146,6 +147,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
foreach (var kvp in SelectionHandler.SelectionSampleStates)
|
||||
sampleChanged(kvp.Key, kvp.Value.Value);
|
||||
|
||||
foreach (var kvp in SelectionHandler.SelectionBankStates)
|
||||
bankChanged(kvp.Key, kvp.Value.Value);
|
||||
}
|
||||
|
||||
private void sampleChanged(string sampleName, TernaryState state)
|
||||
@ -170,6 +174,18 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
}
|
||||
}
|
||||
|
||||
private void bankChanged(string bankName, TernaryState state)
|
||||
{
|
||||
if (currentPlacement == null) return;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case TernaryState.True:
|
||||
currentPlacement.HitObject.SampleControlPoint.SampleBank = bankName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public readonly Bindable<TernaryState> NewCombo = new Bindable<TernaryState> { Description = "New Combo" };
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user