diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-04-05 13:43:20 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-04-05 13:43:20 +0000 |
commit | 5c46c303e25f84e49e36918bafc8d7eca09a507b (patch) | |
tree | 1299c99ac75aa56a4d9bad7c86992628175203d0 /Game/Code | |
parent | 42717e4611f758f137d86fd99e69bf9791d3a727 (diff) | |
download | usdx-5c46c303e25f84e49e36918bafc8d7eca09a507b.tar.gz usdx-5c46c303e25f84e49e36918bafc8d7eca09a507b.tar.xz usdx-5c46c303e25f84e49e36918bafc8d7eca09a507b.zip |
Fixed: Button.Z Attribut not loaded from Theme
Fixed: AddButton procedure don't set Result
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@58 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r-- | Game/Code/Classes/UThemes.pas | 50 | ||||
-rw-r--r-- | Game/Code/Menu/UMenu.pas | 54 |
2 files changed, 71 insertions, 33 deletions
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas index a62c5aed..d2fb5b11 100644 --- a/Game/Code/Classes/UThemes.pas +++ b/Game/Code/Classes/UThemes.pas @@ -113,6 +113,7 @@ type Text: AThemeText;
X: integer;
Y: integer;
+ Z: Real;
W: integer;
H: integer;
Color: string;
@@ -280,6 +281,9 @@ type StaticP3RScoreBG: TThemeStatic; //Static for ScoreBG
TextP3R: TThemeText;
TextP3RScore: TThemeText;
+
+ //Linebonus Translations
+ LineBonusText: Array [0..8] of String;
end;
TThemeScore = class(TThemeBasic)
@@ -402,6 +406,12 @@ type ButtonSearchText: TThemeButton;
SelectSlideType: TThemeSelectSlide;
TextFound: TThemeText;
+
+ //Translated Texts
+ Songsfound: String;
+ NoSongsfound: String;
+ CatText: String;
+ IType: array [0..2] of String;
end;
//Party Screens
@@ -512,6 +522,11 @@ type ButtonPrev: TThemeButton;}
end;
+ //Playlist Translations
+ TThemePlaylist = record
+ CatText: string;
+ end;
+
TTheme = class
{$IFDEF THEMESAVE}
ThemeIni: TIniFile;
@@ -541,8 +556,10 @@ type PartyNewRound: TThemePartyNewRound;
PartyScore: TThemePartyScore;
PartyWin: TThemePartyWin;
- PartyOptions: TThemePartyOptions;
- PartyPlayer: TThemePartyPlayer;
+ PartyOptions: TThemePartyOptions;
+ PartyPlayer: TThemePartyPlayer;
+
+ Playlist: TThemePlaylist;
constructor Create(FileName: string); overload; // Initialize theme system
constructor Create(FileName: string; Color: integer); overload; // Initialize theme system with color
@@ -871,6 +888,16 @@ begin ThemeLoadText(Sing.TextP3R, 'SingP3RText');
ThemeLoadText(Sing.TextP3RScore, 'SingP3RTextScore');
+ //Line Bonus Texts
+ Sing.LineBonusText[0] := Language.Translate('LINEBONUS_WORST');
+ Sing.LineBonusText[1] := Sing.LineBonusText[0];
+ Sing.LineBonusText[2] := Language.Translate('LINEBONUS_BAD');
+ Sing.LineBonusText[3] := Language.Translate('LINEBONUS_NORMAL');
+ Sing.LineBonusText[4] := Sing.LineBonusText[3];
+ Sing.LineBonusText[5] := Language.Translate('LINEBONUS_GOOD');
+ Sing.LineBonusText[6] := Language.Translate('LINEBONUS_BETTER');
+ Sing.LineBonusText[7] := Sing.LineBonusText[6];
+ Sing.LineBonusText[8] := Language.Translate('LINEBONUS_PERFECT');
// Score
ThemeLoadBasic(Score, 'Score');
@@ -1008,6 +1035,13 @@ begin ThemeLoadButton(SongJumpto.ButtonSearchText, 'SongJumptoButtonSearchText');
ThemeLoadSelectSlide(SongJumpto.SelectSlideType, 'SongJumptoSelectSlideType');
ThemeLoadText(SongJumpto.TextFound, 'SongJumptoTextFound');
+ //Translations
+ SongJumpto.IType[0] := Language.Translate('SONG_JUMPTO_TYPE1');
+ SongJumpto.IType[1] := Language.Translate('SONG_JUMPTO_TYPE2');
+ SongJumpto.IType[2] := Language.Translate('SONG_JUMPTO_TYPE3');
+ SongJumpto.SongsFound := Language.Translate('SONG_JUMPTO_SONGSFOUND');
+ SongJumpto.NoSongsFound := Language.Translate('SONG_JUMPTO_NOSONGSFOUND');
+ SongJumpto.CatText := Language.Translate('SONG_JUMPTO_CATTEXT');
//Party Screens:
//Party NewRound
@@ -1122,6 +1156,9 @@ begin {ThemeLoadButton(ButtonNext, 'PartyPlayerButtonNext');
ThemeLoadButton(ButtonPrev, 'PartyPlayerButtonPrev');}
+
+ //Playlist Translations
+ Playlist.CatText := Language.Translate('PLAYLIST_CATTEXT')
end;
ThemeIni.Free;
@@ -1239,10 +1276,11 @@ var begin
DecimalSeparator := '.';
ThemeButton.Tex := ThemeIni.ReadString(Name, 'Tex', '');
- ThemeButton.X := ThemeIni.ReadInteger(Name, 'X', 0);
- ThemeButton.Y := ThemeIni.ReadInteger(Name, 'Y', 0);
- ThemeButton.W := ThemeIni.ReadInteger(Name, 'W', 0);
- ThemeButton.H := ThemeIni.ReadInteger(Name, 'H', 0);
+ ThemeButton.X := ThemeIni.ReadInteger (Name, 'X', 0);
+ ThemeButton.Y := ThemeIni.ReadInteger (Name, 'Y', 0);
+ ThemeButton.Z := ThemeIni.ReadFloat (Name, 'Z', 0);
+ ThemeButton.W := ThemeIni.ReadInteger (Name, 'W', 0);
+ ThemeButton.H := ThemeIni.ReadInteger (Name, 'H', 0);
ThemeButton.Typ := ThemeIni.ReadString(Name, 'Type', '');
diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas index bf823b16..45a25cb7 100644 --- a/Game/Code/Menu/UMenu.pas +++ b/Game/Code/Menu/UMenu.pas @@ -369,6 +369,8 @@ begin ThemeButton.DColR, ThemeButton.DColG, ThemeButton.DColB, ThemeButton.DInt,
Skin.GetTextureFileName(ThemeButton.Tex), 'JPG', ThemeButton.Typ, ThemeButton.Reflection);
+ Button[Result].Z := ThemeButton.Z;
+
BTLen := Length(ThemeButton.Text);
for BT := 0 to BTLen-1 do begin
@@ -390,44 +392,42 @@ begin end;
function TMenu.AddButton(X, Y, W, H, ColR, ColG, ColB, Int, DColR, DColG, DColB, DInt: real; Name, Format, Typ: String; Reflection: Boolean): integer;
-var
- ButNum : integer;
begin
// adds button
- ButNum := Length(Button);
- SetLength(Button, ButNum + 1);
-// Button[ButNum] := TButton.Create(Texture.GetTexture(Name, Typ));
+ Result := Length(Button);
+ SetLength(Button, Result + 1);
+// Button[Result] := TButton.Create(Texture.GetTexture(Name, Typ));
// check here for cache
// Texture.GetTexture(Name, Typ, false); // preloads textures and creates cahce mipmap when needed
// if Covers.CoverExists(Name) then
- Button[ButNum] := TButton.Create(Texture.GetTexture(Name, Typ, true)); // use cache texture
+ Button[Result] := TButton.Create(Texture.GetTexture(Name, Typ, true)); // use cache texture
// else
-// Button[ButNum] := TButton.Create(Texture.GetTexture(Name, Typ, false)); // don't use cache texture}
+// Button[Result] := TButton.Create(Texture.GetTexture(Name, Typ, false)); // don't use cache texture}
// configures button
- Button[ButNum].Texture.X := X;
- Button[ButNum].Texture.Y := Y;
- Button[ButNum].Texture.W := W;
- Button[ButNum].Texture.H := H;
- Button[ButNum].SelectColR := ColR;
- Button[ButNum].SelectColG := ColG;
- Button[ButNum].SelectColB := ColB;
- Button[ButNum].SelectInt := Int;
- Button[ButNum].DeselectColR := DColR;
- Button[ButNum].DeselectColG := DColG;
- Button[ButNum].DeselectColB := DColB;
- Button[ButNum].DeselectInt := DInt;
- Button[ButNum].Texture.TexX1 := 0;
- Button[ButNum].Texture.TexY1 := 0;
- Button[ButNum].Texture.TexX2 := 1;
- Button[ButNum].Texture.TexY2 := 1;
- Button[ButNum].SetSelect(false);
-
- Button[ButNum].Reflection := Reflection;
+ Button[Result].Texture.X := X;
+ Button[Result].Texture.Y := Y;
+ Button[Result].Texture.W := W;
+ Button[Result].Texture.H := H;
+ Button[Result].SelectColR := ColR;
+ Button[Result].SelectColG := ColG;
+ Button[Result].SelectColB := ColB;
+ Button[Result].SelectInt := Int;
+ Button[Result].DeselectColR := DColR;
+ Button[Result].DeselectColG := DColG;
+ Button[Result].DeselectColB := DColB;
+ Button[Result].DeselectInt := DInt;
+ Button[Result].Texture.TexX1 := 0;
+ Button[Result].Texture.TexY1 := 0;
+ Button[Result].Texture.TexX2 := 1;
+ Button[Result].Texture.TexY2 := 1;
+ Button[Result].SetSelect(false);
+
+ Button[Result].Reflection := Reflection;
// adds interaction
- AddInteraction(iButton, ButNum);
+ AddInteraction(iButton, Result);
Interaction := 0;
end;
|