File tree Expand file tree Collapse file tree
fluXis/Screens/Edit/Tabs/Charting/Blueprints Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515using osu . Framework . Graphics . Containers ;
1616using osu . Framework . Input . Events ;
1717using osuTK ;
18+ using osuTK . Input ;
1819
1920namespace fluXis . Screens . Edit . Tabs . Charting . Blueprints ;
2021
@@ -134,6 +135,18 @@ private void removePlacement()
134135 currentPlacement = null ;
135136 }
136137
138+ protected override bool OnMouseMove ( MouseMoveEvent e )
139+ {
140+ if ( currentPlacement is null
141+ || ! currentPlacement . AllowPainting
142+ || ! InputManager . CurrentState . Keyboard . ShiftPressed
143+ || ! InputManager . CurrentState . Mouse . Buttons . Contains ( MouseButton . Left ) )
144+ return base . OnMouseMove ( e ) ;
145+
146+ currentPlacement . FinishPlacement ( true ) ;
147+ return true ;
148+ }
149+
137150 protected override SelectionBlueprint < ITimedObject > CreateBlueprint ( ITimedObject obj )
138151 {
139152 SelectionBlueprint < ITimedObject > blueprint = null ! ;
Original file line number Diff line number Diff line change 55using fluXis . Utils ;
66using osu . Framework . Allocation ;
77using osu . Framework . Input ;
8- using osu . Framework . Logging ;
98
109namespace fluXis . Screens . Edit . Tabs . Charting . Blueprints . Placement ;
1110
@@ -60,9 +59,6 @@ protected override void OnPlacementFinished(bool commit)
6059 else
6160 clone . Lane += Map . RealmMap . KeyCount ;
6261
63- Logger . Log ( Hit . Serialize ( ) ) ;
64- Logger . Log ( clone . Serialize ( ) ) ;
65-
6662 Actions . Add ( new NoteMultiPlaceAction ( new [ ] { Hit , clone } ) ) ;
6763 return ;
6864 }
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ public partial class PlacementBlueprint : Container
2323
2424 protected virtual ITimePositionProvider PositionProvider => ChartingContainer . Playfields [ 0 ] ;
2525
26+ public virtual bool AllowPainting => false ;
27+
2628 public PlacementState State { get ; set ; }
2729 public ITimedObject Object { get ; }
2830
Original file line number Diff line number Diff line change 1+ using System ;
12using System . Linq ;
23using fluXis . Screens . Edit . Tabs . Charting . Playfield ;
34using osu . Framework . Graphics ;
@@ -8,6 +9,8 @@ namespace fluXis.Screens.Edit.Tabs.Charting.Blueprints.Placement;
89
910public partial class SingleNotePlacementBlueprint : NotePlacementBlueprint
1011{
12+ public override bool AllowPainting => true ;
13+
1114 private readonly BlueprintNotePiece piece ;
1215
1316 public SingleNotePlacementBlueprint ( )
@@ -40,7 +43,7 @@ protected override bool OnMouseDown(MouseDownEvent e)
4043
4144 protected override void OnPlacementFinished ( bool commit )
4245 {
43- if ( Map . MapInfo . HitObjects . Any ( h => ( int ) h . Time == ( int ) Hit . Time && h . Lane == Hit . Lane ) )
46+ if ( Map . MapInfo . HitObjects . Where ( x => x . Lane == Hit . Lane ) . Any ( x => Math . Abs ( x . Time - Hit . Time ) < 10 ) )
4447 return ;
4548
4649 base . OnPlacementFinished ( commit ) ;
Original file line number Diff line number Diff line change 1+ using System ;
12using System . Linq ;
23using fluXis . Screens . Edit . Tabs . Charting . Playfield ;
34using osu . Framework . Graphics ;
@@ -8,6 +9,7 @@ namespace fluXis.Screens.Edit.Tabs.Charting.Blueprints.Placement;
89
910public partial class TickNotePlacementBlueprint : NotePlacementBlueprint
1011{
12+ public override bool AllowPainting => true ;
1113 private readonly BlueprintNotePiece piece ;
1214
1315 public TickNotePlacementBlueprint ( )
@@ -42,10 +44,9 @@ protected override bool OnMouseDown(MouseDownEvent e)
4244
4345 protected override void OnPlacementFinished ( bool commit )
4446 {
45- if ( Map . MapInfo . HitObjects . Any ( h => ( int ) h . Time == ( int ) Hit . Time && h . Lane == Hit . Lane ) )
47+ if ( Map . MapInfo . HitObjects . Where ( x => x . Lane == Hit . Lane ) . Any ( x => Math . Abs ( x . Time - Hit . Time ) < 10 ) )
4648 return ;
4749
4850 base . OnPlacementFinished ( commit ) ;
4951 }
5052}
51-
You can’t perform that action at this time.
0 commit comments