diff options
author | davidus01 <davidus01@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-07-12 23:14:40 +0000 |
---|---|---|
committer | davidus01 <davidus01@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-07-12 23:14:40 +0000 |
commit | 39e4d01364cf397d32ab5a7fa51c854b078dc9f9 (patch) | |
tree | 3c9ed75c48283c9fbae55f17cf6f1178d3ff319d /us_maker_edition | |
parent | c60c7ad489ed1e5722e29fbd43e9dac4c7fba153 (diff) | |
download | usdx-39e4d01364cf397d32ab5a7fa51c854b078dc9f9.tar.gz usdx-39e4d01364cf397d32ab5a7fa51c854b078dc9f9.tar.xz usdx-39e4d01364cf397d32ab5a7fa51c854b078dc9f9.zip |
editor: move note up & down over mouse
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2579 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | us_maker_edition/src/screens/UScreenEditSub.pas | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/us_maker_edition/src/screens/UScreenEditSub.pas b/us_maker_edition/src/screens/UScreenEditSub.pas index abefe2c6..31d9ea76 100644 --- a/us_maker_edition/src/screens/UScreenEditSub.pas +++ b/us_maker_edition/src/screens/UScreenEditSub.pas @@ -841,6 +841,8 @@ begin ShowInteractiveBackground; currentnote := 0; Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 2; + Lyric.AddLine(Lines[0].Current); + Lyric.Selected := CurrentNote; end; end; @@ -1298,10 +1300,11 @@ begin LastX := CurrentX; LastY := CurrentY; end; - // move notes by mouse move + // move notes by mouse move (left-right) tempR := 720 / (Lines[0].Line[Lines[0].Current].End_ - Lines[0].Line[Lines[0].Current].Note[0].Start); if (MouseButton = 0) and (LastPressedMouseType = SDL_BUTTON_RIGHT) then begin + // left & right if (Floor((CurrentX-40)/tempr) > Floor((LastX-40)/tempr)) or (Floor((CurrentX-40)/tempr) < Floor((LastX-40)/tempr)) then begin CopyToUndo; @@ -1310,6 +1313,16 @@ begin GoldenRec.KillAll; ShowInteractiveBackground; end; + // up & down + if (CurrentY - LastY < -6) or (CurrentY - LastY > 6) then + begin + CopyToUndo; + TransposeNote(-1* floor((CurrentY-LastY) div (6))); + LastY := CurrentY; + GoldenRec.KillAll; + ShowInteractiveBackground; + end; + end; //move one note by mouse move if (MouseButton = 0) and (LastPressedMouseType = SDL_BUTTON_LEFT) then @@ -1317,7 +1330,7 @@ begin if (Floor((CurrentX-40)/tempr) > Floor((LastX-40)/tempr)) or (Floor((CurrentX-40)/tempr) < Floor((LastX-40)/tempr)) then begin CopyToUndo; - // move + // move left & right if Floor((CurrentX-40)/tempr) > Floor((LastX-40)/tempr) then begin Inc(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start); @@ -1340,7 +1353,15 @@ begin GoldenRec.KillAll; ShowInteractiveBackground; end; - + // up & down + if (CurrentY - LastY < -6) or (CurrentY - LastY > 6) then + begin + CopyToUndo; + TransposeNote(-1* floor((CurrentY-LastY) div (6))); + LastY := CurrentY; + GoldenRec.KillAll; + ShowInteractiveBackground; + end; end; end; @@ -3036,10 +3057,12 @@ begin //inherited Draw; DrawFG; // draw notes + // horizontal lines SingDrawNoteLines(20, 305, 780, 15); //Error Drawing when no Song is loaded if not Error then begin + // vertical lines SingDrawBeatDelimeters(40, 305, 760, 0); EditDrawLine(40, 410, 760, 0, 15); DrawText(40, 410, 760, 0, 15); |