From faf53d1dadd8e943d3cf3e4c4b1138b539ee55d4 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Thu, 18 Mar 2010 16:26:55 +0000 Subject: bugfix LoadFaultySongs; some editor changes; update of ffmpeg git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2204 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenEditSub.pas | 61 +++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 15 deletions(-) (limited to 'Game/Code/Screens') diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index 43720c8d..a0c89637 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -265,7 +265,11 @@ begin if SDL_ModState = 0 then begin // Insert start of sentece if AktNuta > 0 then + begin DivideSentence; + FixTimings; + Lyric.Selected := AktNuta; + end; end; if SDL_ModState = KMOD_LSHIFT then begin @@ -509,7 +513,11 @@ begin begin // Capitalize letter at the beginning of line if SDL_ModState = 0 then + begin LyricsCapitalize; + Text[TextDebug].Text := Language.Translate('EDITOR_CAPITALIZE_LETTER'); + Lyric.Selected := AktNuta; + end; // Correct spaces if SDL_ModState = KMOD_LSHIFT then @@ -586,6 +594,8 @@ begin begin // Fixes timings between sentences FixTimings; + Text[TextDebug].Text := Language.Translate('EDITOR_FIX_TIMINGS'); + Lyric.Selected := AktNuta; end; SDLK_F4: @@ -1482,7 +1492,6 @@ begin AktNuta := 0; Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 2; Lyric.AddCzesc(Czesci[0].Akt); - end; procedure TScreenEditSub.JoinSentence; @@ -1550,7 +1559,7 @@ begin Czesci[0].Czesc[C].Nuta[AktNuta].Dlugosc; if (Czesci[0].Czesc[C].Nuta[AktNuta+1].Dlugosc>0) then - Czesci[0].Czesc[C].Nuta[AktNuta+1].Tekst := '~ ' + Czesci[0].Czesc[C].Nuta[AktNuta+1].Tekst := '~' else Czesci[0].Czesc[C].Nuta[AktNuta+1].Tekst := ' '; @@ -2446,13 +2455,37 @@ begin end; } end; + if(PlaySentence or PlaySentenceMidi) then begin + glColor4f(1, 0, 0, 1); + pos := AktBeat/ww*w; + br := 1; + + glbegin(gl_quads); + glVertex2f(x+pos, y); + glVertex2f(x+pos, y+h); + glVertex2f(x+pos+br, y+h); + glVertex2f(x+pos+br, y); + glEnd; + + start := Czesci[0].Czesc[Czesci[0].Akt].Nuta[0].Start; + end_ := Czesci[0].Czesc[Czesci[0].Akt].Nuta[Czesci[0].Czesc[Czesci[0].Akt].HighNut].Start+ + Czesci[0].Czesc[Czesci[0].Akt].Nuta[Czesci[0].Czesc[Czesci[0].Akt].HighNut].Dlugosc; + + pos := start/ww*w; + br := (end_-start)/ww*w; + glColor4f(0, 0, 0, 0.5); - pos := 0; - br := AktBeat/ww*w; - if (br>w) then - br := w; + + glEnable(GL_BLEND); + glbegin(gl_quads); + glVertex2f(x+pos, y); + glVertex2f(x+pos, y+h); + glVertex2f(x+pos+br, y+h); + glVertex2f(x+pos+br, y); + glEnd; + glDisable(GL_BLEND); end else begin glColor4f(1, 0, 0, 1); @@ -2460,16 +2493,14 @@ begin br := Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc/ww*w; if (br<1) then br := 1; - end; - glEnable(GL_BLEND); - glbegin(gl_quads); - glVertex2f(x+pos, y); - glVertex2f(x+pos, y+h); - glVertex2f(x+pos+br, y+h); - glVertex2f(x+pos+br, y); - glEnd; - glDisable(GL_BLEND); + glbegin(gl_quads); + glVertex2f(x+pos, y); + glVertex2f(x+pos, y+h); + glVertex2f(x+pos+br, y+h); + glVertex2f(x+pos+br, y); + glEnd; + end; end; procedure TScreenEditSub.onHide; -- cgit v1.2.3