aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-24 20:04:01 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-24 20:04:01 +0000
commit735a5b67345e2888de89d89b4f31b4d48c06f9ec (patch)
treed20a63bc11fcd76bee8d58ed7229bce5f3b62c27
parent12f978afaf1a2435ce2f94c19a73bcade3983d24 (diff)
downloadusdx-735a5b67345e2888de89d89b4f31b4d48c06f9ec.tar.gz
usdx-735a5b67345e2888de89d89b4f31b4d48c06f9ec.tar.xz
usdx-735a5b67345e2888de89d89b4f31b4d48c06f9ec.zip
use second players color to indicate selected note in editor
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1960 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--src/base/UGraphic.pas15
-rw-r--r--src/base/USong.pas2
-rw-r--r--src/screens/UScreenEditSub.pas34
3 files changed, 22 insertions, 29 deletions
diff --git a/src/base/UGraphic.pas b/src/base/UGraphic.pas
index 7738e010..b0e5a7d8 100644
--- a/src/base/UGraphic.pas
+++ b/src/base/UGraphic.pas
@@ -153,9 +153,9 @@ var
ScreenPopupInfo: TScreenPopupInfo;
//Notes
- Tex_Left: array[0..6] of TTexture; //rename to tex_note_left
- Tex_Mid: array[0..6] of TTexture; //rename to tex_note_mid
- Tex_Right: array[0..6] of TTexture; //rename to tex_note_right
+ Tex_Left: array[1..6] of TTexture; //rename to tex_note_left
+ Tex_Mid: array[1..6] of TTexture; //rename to tex_note_mid
+ Tex_Right: array[1..6] of TTexture; //rename to tex_note_right
Tex_plain_Left: array[1..6] of TTexture; //rename to tex_notebg_left
Tex_plain_Mid: array[1..6] of TTexture; //rename to tex_notebg_mid
@@ -299,15 +299,6 @@ var
begin
Log.LogStatus('Loading Textures', 'LoadTextures');
- // FIXME: do we need this? (REMOVE otherwise)
- Tex_Left[0] := Texture.LoadTexture(Skin.GetTextureFileName('GrayLeft'), TEXTURE_TYPE_TRANSPARENT, 0);
- // FIXME: do we need this? (REMOVE otherwise)
- Tex_Mid[0] := Texture.LoadTexture(Skin.GetTextureFileName('GrayMid'), TEXTURE_TYPE_PLAIN, 0);
- // FIXME: do we need this? (REMOVE otherwise)
- Tex_Right[0] := Texture.LoadTexture(Skin.GetTextureFileName('GrayRight'), TEXTURE_TYPE_TRANSPARENT, 0);
-
- Log.LogStatus('Loading Textures - A', 'LoadTextures');
-
// P1-6
// TODO... do it once for each player... this is a bit crappy !!
// can we make it any better !?
diff --git a/src/base/USong.pas b/src/base/USong.pas
index 33e8d8df..f8d465c7 100644
--- a/src/base/USong.pas
+++ b/src/base/USong.pas
@@ -1206,6 +1206,8 @@ begin
if Note[HighNote].Tone < BaseNote then
BaseNote := Note[HighNote].Tone;
+ Note[HighNote].Color := 1; // default color to 1 for editor
+
DecodeStringUTF8(LyricS, Note[HighNote].Text, Encoding);
Lyric := Lyric + Note[HighNote].Text;
diff --git a/src/screens/UScreenEditSub.pas b/src/screens/UScreenEditSub.pas
index 04407005..609a689b 100644
--- a/src/screens/UScreenEditSub.pas
+++ b/src/screens/UScreenEditSub.pas
@@ -503,11 +503,11 @@ begin
// right
if SDL_ModState = 0 then
begin
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Inc(CurrentNote);
if CurrentNote > Lines[0].Line[Lines[0].Current].HighNote then
CurrentNote := 0;
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 2;
Lyric.Selected := CurrentNote;
end;
@@ -558,11 +558,11 @@ begin
// left
if SDL_ModState = 0 then
begin
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Dec(CurrentNote);
if CurrentNote = -1 then
CurrentNote := Lines[0].Line[Lines[0].Current].HighNote;
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 2;
Lyric.Selected := CurrentNote;
end;
@@ -623,12 +623,12 @@ begin
PlaySentenceMidi := false;
{$ENDIF}
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Inc(Lines[0].Current);
CurrentNote := 0;
if Lines[0].Current > Lines[0].High then
Lines[0].Current := 0;
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 2;
Lyric.AddLine(Lines[0].Current);
Lyric.Selected := 0;
@@ -655,12 +655,12 @@ begin
PlaySentenceMidi := false;
{$endif}
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Dec(Lines[0].Current);
CurrentNote := 0;
if Lines[0].Current = -1 then
Lines[0].Current := Lines[0].High;
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 2;
Lyric.AddLine(Lines[0].Current);
Lyric.Selected := 0;
@@ -722,11 +722,11 @@ begin
// right
if SDL_ModState = 0 then
begin
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Inc(CurrentNote);
if CurrentNote > Lines[0].Line[Lines[0].Current].HighNote then
CurrentNote := 0;
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 2;
Lyric.Selected := CurrentNote;
end;
end;
@@ -735,11 +735,11 @@ begin
// left
if SDL_ModState = 0 then
begin
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Dec(CurrentNote);
if CurrentNote = -1 then
CurrentNote := Lines[0].Line[Lines[0].Current].HighNote;
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 2;
Lyric.Selected := CurrentNote;
end;
end;
@@ -960,7 +960,7 @@ begin
Lines[0].Current := Lines[0].Current + 1;
CurrentNote := 0;
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 2;
Lyric.AddLine(Lines[0].Current);
end;
@@ -1023,7 +1023,7 @@ begin
Inc(Note[CurrentNote+1].Start);
Dec(Note[CurrentNote+1].Length);
Note[CurrentNote+1].Text := '- ';
- Note[CurrentNote+1].Color := 0;
+ Note[CurrentNote+1].Color := 1;
end;
end;
@@ -1053,7 +1053,7 @@ begin
if CurrentNote > Lines[0].Line[C].HighNote then
Dec(CurrentNote);
- Lines[0].Line[C].Note[CurrentNote].Color := 1;
+ Lines[0].Line[C].Note[CurrentNote].Color := 2;
end
//Last Note of current Sentence Deleted - > Delete Sentence
else
@@ -1073,7 +1073,7 @@ begin
else
Lines[0].Current := 0;
- Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
+ Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 2;
end;
end;
end;
@@ -1327,7 +1327,7 @@ begin
Lines[0].Current := 0;
CurrentNote := 0;
- Lines[0].Line[0].Note[0].Color := 1;
+ Lines[0].Line[0].Note[0].Color := 2;
AudioPlayback.Open(CurrentSong.Path.Append(CurrentSong.Mp3));
//Set Down Music Volume for Better hearability of Midi Sounds
//Music.SetVolume(0.4);