aboutsummaryrefslogtreecommitdiffstats
path: root/src/screens
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-06-04 21:31:23 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-06-04 21:31:23 +0000
commit133f0b4ebcc3b731e680a72ced52d00638791bf7 (patch)
treef1d1fa58f4c1660ef9b8cc61d8be5a76326a6510 /src/screens
parentd57509c0c5cbd154bde26be993bd2bb9324d89d6 (diff)
downloadusdx-133f0b4ebcc3b731e680a72ced52d00638791bf7.tar.gz
usdx-133f0b4ebcc3b731e680a72ced52d00638791bf7.tar.xz
usdx-133f0b4ebcc3b731e680a72ced52d00638791bf7.zip
cosmetics
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1800 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/UScreenOptionsGame.pas35
-rw-r--r--src/screens/UScreenSong.pas46
-rw-r--r--src/screens/UScreenTop5.pas35
3 files changed, 58 insertions, 58 deletions
diff --git a/src/screens/UScreenOptionsGame.pas b/src/screens/UScreenOptionsGame.pas
index 3f1cca81..00ff372d 100644
--- a/src/screens/UScreenOptionsGame.pas
+++ b/src/screens/UScreenOptionsGame.pas
@@ -34,14 +34,14 @@ interface
{$I switches.inc}
uses
- UMenu,
SDL,
UDisplay,
- UMusic,
UFiles,
UIni,
- UThemes,
- USongs;
+ UMenu,
+ UMusic,
+ USongs,
+ UThemes;
type
TScreenOptionsGame = class(TMenu)
@@ -56,13 +56,15 @@ type
implementation
uses
- UGraphic,
- SysUtils;
+ SysUtils,
+ UGraphic;
-function TScreenOptionsGame.ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean;
+function TScreenOptionsGame.ParseInput(PressedKey: cardinal;
+ CharCode: WideChar;
+ PressedDown: boolean): boolean;
begin
Result := true;
- if (PressedDown) then
+ if PressedDown then
begin // Key Down
// check normal keys
case WideCharUpperCase(CharCode)[1] of
@@ -80,7 +82,6 @@ begin
begin
AudioPlayback.PlaySound(SoundLib.Back);
RefreshSongs;
-
FadeTo(@ScreenOptions);
end;
SDLK_RETURN:
@@ -126,34 +127,34 @@ begin
old_Sorting := Ini.Sorting;
old_Tabs := Ini.Tabs;
- Theme.OptionsGame.SelectPlayers.showArrows := true;
+ Theme.OptionsGame.SelectPlayers.showArrows := true;
Theme.OptionsGame.SelectPlayers.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGame.SelectPlayers, Ini.Players, IPlayers);
- Theme.OptionsGame.SelectDifficulty.showArrows := true;
+ Theme.OptionsGame.SelectDifficulty.showArrows := true;
Theme.OptionsGame.SelectDifficulty.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGame.SelectDifficulty, Ini.Difficulty, IDifficulty);
- Theme.OptionsGame.SelectLanguage.showArrows := true;
+ Theme.OptionsGame.SelectLanguage.showArrows := true;
Theme.OptionsGame.SelectLanguage.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGame.SelectLanguage, Ini.Language, ILanguage);
- Theme.OptionsGame.SelectTabs.showArrows := true;
+ Theme.OptionsGame.SelectTabs.showArrows := true;
Theme.OptionsGame.SelectTabs.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGame.SelectTabs, Ini.Tabs, ITabs);
- Theme.OptionsGame.SelectSorting.showArrows := true;
+ Theme.OptionsGame.SelectSorting.showArrows := true;
Theme.OptionsGame.SelectSorting.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGame.SelectSorting, Ini.Sorting, ISorting);
- Theme.OptionsGame.SelectDebug.showArrows := true;
+ Theme.OptionsGame.SelectDebug.showArrows := true;
Theme.OptionsGame.SelectDebug.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGame.SelectDebug, Ini.Debug, IDebug);
AddButton(Theme.OptionsGame.ButtonExit);
- if (Length(Button[0].Text)=0) then
+ if (Length(Button[0].Text) = 0) then
AddButtonText(14, 20, Theme.Options.Description[7]);
end;
@@ -161,7 +162,7 @@ end;
//Refresh Songs Patch
procedure TScreenOptionsGame.RefreshSongs;
begin
-if (ini.Sorting <> old_Sorting) or (ini.Tabs <> old_Tabs) then
+ if (ini.Sorting <> old_Sorting) or (ini.Tabs <> old_Tabs) then
ScreenSong.Refresh;
end;
diff --git a/src/screens/UScreenSong.pas b/src/screens/UScreenSong.pas
index 5e794891..fa3c836e 100644
--- a/src/screens/UScreenSong.pas
+++ b/src/screens/UScreenSong.pas
@@ -34,22 +34,22 @@ interface
{$I switches.inc}
uses
- UMenu,
- SDL,
- UMusic,
- UFiles,
- UTime,
- UDisplay,
- USongs,
SysUtils,
+ SDL,
UCommon,
- ULog,
- UThemes,
- UTexture,
+ UDisplay,
+ UFiles,
+ UIni,
ULanguage,
+ ULog,
+ UMenu,
+ UMenuEqualizer,
+ UMusic,
USong,
- UIni,
- UMenuEqualizer;
+ USongs,
+ UTexture,
+ UThemes,
+ UTime;
type
TScreenSong = class(TMenu)
@@ -119,7 +119,7 @@ type
procedure SetScroll5;
procedure SetScroll6;
function ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean; override;
- function ParseMouse(MouseButton: Integer; BtnDown: Boolean; X, Y: integer): boolean; override;
+ function ParseMouse(MouseButton: integer; BtnDown: boolean; X, Y: integer): boolean; override;
function Draw: boolean; override;
procedure GenerateThumbnails();
procedure onShow; override;
@@ -738,26 +738,24 @@ begin
end; // if (PressedDown)
end;
-function TScreenSong.ParseMouse(MouseButton: Integer; BtnDown: Boolean; X, Y: integer): boolean;
+function TScreenSong.ParseMouse(MouseButton: integer; BtnDown: boolean; X, Y: integer): boolean;
begin
- Result := True;
+ Result := true;
- if RightMbESC and (MouseButton = SDL_BUTTON_RIGHT) and BtnDown then begin
+ if RightMbESC and (MouseButton = SDL_BUTTON_RIGHT) and BtnDown then
//if RightMbESC is set, send ESC keypress
- Result:=ParseInput(SDLK_ESCAPE, #0, True);
- end;
+ Result:=ParseInput(SDLK_ESCAPE, #0, true);
//song scrolling with mousewheel
- if (MouseButton = SDL_BUTTON_WHEELDOWN) and BtnDown then begin
+ if (MouseButton = SDL_BUTTON_WHEELDOWN) and BtnDown then
ParseInput(SDLK_RIGHT, #0, true);
- end;
- if (MouseButton = SDL_BUTTON_WHEELUP) and BtnDown then begin
+
+ if (MouseButton = SDL_BUTTON_WHEELUP) and BtnDown then
ParseInput(SDLK_LEFT, #0, true);
- end;
+
//LMB anywhere starts
- if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then begin
+ if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then
ParseInput(SDLK_RETURN, #0, true);
- end;
end;
constructor TScreenSong.Create;
diff --git a/src/screens/UScreenTop5.pas b/src/screens/UScreenTop5.pas
index 39de61c3..1013a9b5 100644
--- a/src/screens/UScreenTop5.pas
+++ b/src/screens/UScreenTop5.pas
@@ -57,7 +57,7 @@ type
constructor Create; override;
function ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean; override;
- function ParseMouse(MouseButton: Integer; BtnDown: Boolean; X, Y: integer): boolean; override;
+ function ParseMouse(MouseButton: integer; BtnDown: boolean; X, Y: integer): boolean; override;
procedure onShow; override;
function Draw: boolean; override;
end;
@@ -70,10 +70,12 @@ uses
UIni,
UNote;
-function TScreenTop5.ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean;
+function TScreenTop5.ParseInput(PressedKey: cardinal;
+ CharCode: WideChar;
+ PressedDown: boolean): boolean;
begin
Result := true;
- if (PressedDown) then
+ if PressedDown then
begin
// check normal keys
case WideCharUpperCase(CharCode)[1] of
@@ -104,13 +106,14 @@ begin
end;
end;
-function TScreenTop5.ParseMouse(MouseButton: Integer; BtnDown: Boolean; X, Y: integer): boolean;
+function TScreenTop5.ParseMouse(MouseButton: integer;
+ BtnDown: boolean;
+ X, Y: integer): boolean;
begin
- Result := True;
- if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then begin
+ Result := true;
+ if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then
//left-click anywhere sends return
ParseInput(SDLK_RETURN, #0, true);
- end;
end;
constructor TScreenTop5.Create;
@@ -121,18 +124,16 @@ begin
LoadFromTheme(Theme.Top5);
- TextLevel := AddText(Theme.Top5.TextLevel);
+ TextLevel := AddText(Theme.Top5.TextLevel);
TextArtistTitle := AddText(Theme.Top5.TextArtistTitle);
for I := 0 to 4 do
- StaticNumber[I+1] := AddStatic( Theme.Top5.StaticNumber[I] );
-
- for I := 0 to 4 do
- TextNumber[I+1] := AddText(Theme.Top5.TextNumber[I]);
- for I := 0 to 4 do
- TextName[I+1] := AddText(Theme.Top5.TextName[I]);
- for I := 0 to 4 do
- TextScore[I+1] := AddText(Theme.Top5.TextScore[I]);
+ begin
+ StaticNumber[I+1] := AddStatic(Theme.Top5.StaticNumber[I]);
+ TextNumber[I+1] := AddText (Theme.Top5.TextNumber[I]);
+ TextName[I+1] := AddText (Theme.Top5.TextName[I]);
+ TextScore[I+1] := AddText (Theme.Top5.TextScore[I]);
+ end;
end;
@@ -169,7 +170,7 @@ begin
Text[TextScore[I]].Text := IntToStr(CurrentSong.Score[Ini.Difficulty, I-1].Score);
end;
- for I := Length(CurrentSong.Score[Ini.Difficulty])+1 to 5 do
+ for I := Length(CurrentSong.Score[Ini.Difficulty]) + 1 to 5 do
begin
Static[StaticNumber[I]].Visible := false;
Text[TextNumber[I]].Visible := false;