From 83633ef9c0cb3fcecadc1a6b7be66190f31b8a3b Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Sat, 12 Jun 2010 11:34:49 +0000 Subject: divide sentence in duet mode if the first note is selected but the other part begins earlier git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2499 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenEditSub.pas | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Game') diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index 11e00b31..ae1a026e 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -288,8 +288,16 @@ begin if SDL_ModState = 0 then begin // Insert start of sentece - if AktNuta[CP] > 0 then - DivideSentence; + if (AktNuta[CP] > 0) then + DivideSentence + else if AktSong.isDuet and + (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0) then + begin + if (Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start > + Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta[0].Start+ + Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta[0].Dlugosc) then + DivideSentence; + end; end; if SDL_ModState = KMOD_LSHIFT then -- cgit v1.2.3