aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2011-04-17 15:55:51 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2011-04-17 15:55:51 +0000
commita5a50b95ad673170c0087ca58a4d2b70e874f599 (patch)
treec31780a544978d720ab38587d9b01f0b8543061d /Game/Code
parentb827aa00841254b941665aa767aa19ca7620c2c7 (diff)
downloadusdx-a5a50b95ad673170c0087ca58a4d2b70e874f599.tar.gz
usdx-a5a50b95ad673170c0087ca58a4d2b70e874f599.tar.xz
usdx-a5a50b95ad673170c0087ca58a4d2b70e874f599.zip
add: paste notes only (with ctrl+alt+v)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2822 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas36
1 files changed, 36 insertions, 0 deletions
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index 8443b233..fc2f9364 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -121,6 +121,7 @@ type
procedure MarkSrc;
procedure PasteText;
procedure CopySentence(Src, Dst: integer);
+ procedure CopySentenceNotes(Src, Dst: integer);
procedure CopySentences(Src, Dst, Num: integer);
function GetMedleyLength: real; //returns if availible the length of the medley in seconds, else 0
procedure DrawInfoBar(P, x, y, w, h: integer);
@@ -775,6 +776,12 @@ begin
Text[TextDebug].Text := 'Line pasted';
end;
+ if (SDL_ModState = KMOD_LCTRL + KMOD_LALT) then
+ begin
+ CopySentenceNotes(CopySrcLine, Czesci[CP].Akt);
+ Text[TextDebug].Text := 'Notes pasted';
+ end;
+
if SDL_ModState = 0 then
StartVideo;
@@ -2478,6 +2485,35 @@ begin
EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
end;
+procedure TScreenEditSub.CopySentenceNotes(Src, Dst: integer);
+var
+ N: integer;
+ Time1: integer;
+ Time2: integer;
+ TD: integer;
+begin
+ Time1 := Czesci[CopySrcCP].Czesc[Src].Nuta[0].Start;
+ Time2 := Czesci[CP].Czesc[Dst].Nuta[0].Start;
+ TD := Time2-Time1;
+
+ SetLength(Czesci[CP].Czesc[Dst].Nuta, Czesci[CopySrcCP].Czesc[Src].IlNut);
+ Czesci[CP].Czesc[Dst].IlNut := Czesci[CopySrcCP].Czesc[Src].IlNut;
+ Czesci[CP].Czesc[Dst].HighNut := Czesci[CopySrcCP].Czesc[Src].HighNut;
+ for N := 0 to Czesci[CopySrcCP].Czesc[Src].HighNut do
+ begin
+ Czesci[CP].Czesc[Dst].Nuta[N].Dlugosc := Czesci[CopySrcCP].Czesc[Src].Nuta[N].Dlugosc;
+ Czesci[CP].Czesc[Dst].Nuta[N].Ton := Czesci[CopySrcCP].Czesc[Src].Nuta[N].Ton;
+ Czesci[CP].Czesc[Dst].Nuta[N].Wartosc := Czesci[CopySrcCP].Czesc[Src].Nuta[N].Wartosc;
+ Czesci[CP].Czesc[Dst].Nuta[N].Start := Czesci[CopySrcCP].Czesc[Src].Nuta[N].Start + TD;
+ end;
+ N := Czesci[CopySrcCP].Czesc[Src].HighNut;
+ Czesci[CP].Czesc[Dst].Koniec := Czesci[CP].Czesc[Dst].Nuta[N].Start + Czesci[CP].Czesc[Dst].Nuta[N].Dlugosc;
+
+ Refresh;
+ Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2;
+ EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
+end;
+
procedure TScreenEditSub.CopySentences(Src, Dst, Num: integer);
var
C: integer;