mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Extract storable attributes to bindables
This commit is contained in:
@ -111,7 +111,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
public override bool HandleRotation(float angle)
|
||||
{
|
||||
foreach (var c in SelectedBlueprints)
|
||||
c.Item.Rotation += angle;
|
||||
c.Item.SkinRotation.Value += angle;
|
||||
|
||||
return base.HandleRotation(angle);
|
||||
}
|
||||
@ -121,11 +121,18 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
adjustScaleFromAnchor(ref scale, anchor);
|
||||
|
||||
foreach (var c in SelectedBlueprints)
|
||||
c.Item.Scale += scale * 0.01f;
|
||||
c.Item.SkinScale.Value += scale.X * 0.01f;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HandleMovement(MoveSelectionEvent<SkinnableHUDComponent> moveEvent)
|
||||
{
|
||||
foreach (var c in SelectedBlueprints)
|
||||
c.Item.SkinPosition.Value += moveEvent.InstantDelta.X;
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void adjustScaleFromAnchor(ref Vector2 scale, Anchor reference)
|
||||
{
|
||||
// cancel out scale in axes we don't care about (based on which drag handle was used).
|
||||
@ -136,13 +143,6 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
if ((reference & Anchor.x0) > 0) scale.X = -scale.X;
|
||||
if ((reference & Anchor.y0) > 0) scale.Y = -scale.Y;
|
||||
}
|
||||
|
||||
public override bool HandleMovement(MoveSelectionEvent<SkinnableHUDComponent> moveEvent)
|
||||
{
|
||||
foreach (var c in SelectedBlueprints)
|
||||
c.Item.Position += moveEvent.InstantDelta;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override SelectionBlueprint<SkinnableHUDComponent> CreateBlueprintFor(SkinnableHUDComponent component)
|
||||
|
Reference in New Issue
Block a user