aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenEditSub.pas
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-03-18 16:26:55 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-03-18 16:26:55 +0000
commitfaf53d1dadd8e943d3cf3e4c4b1138b539ee55d4 (patch)
tree463b56bb6ba13b1a2a68cd09b2b19f47427aaaf8 /Game/Code/Screens/UScreenEditSub.pas
parent06f4ffa99c00200197958406a2b016a8a6b050ba (diff)
downloadusdx-faf53d1dadd8e943d3cf3e4c4b1138b539ee55d4.tar.gz
usdx-faf53d1dadd8e943d3cf3e4c4b1138b539ee55d4.tar.xz
usdx-faf53d1dadd8e943d3cf3e4c4b1138b539ee55d4.zip
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
Diffstat (limited to 'Game/Code/Screens/UScreenEditSub.pas')
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas61
1 files changed, 46 insertions, 15 deletions
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;