aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-30 12:30:35 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-30 12:30:35 +0000
commit5737662e749229ef0631e3731858a5bf013c78eb (patch)
tree675f4a745bc93c27ddffa4822ca6f739ffd4335b
parent37f734e1943563ca121791eabb9bff067a591e3d (diff)
downloadusdx-5737662e749229ef0631e3731858a5bf013c78eb.tar.gz
usdx-5737662e749229ef0631e3731858a5bf013c78eb.tar.xz
usdx-5737662e749229ef0631e3731858a5bf013c78eb.zip
Added ability to make buttons invisible(and also unselectable) in Theme.
Visible = 0 Useful for f.e. the Exit Button from MainScreen Fixed a bug in PartyNewRoundScreen that causes a crash when an Arrow Button is pressed git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@152 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Classes/UThemes.pas5
-rw-r--r--Game/Code/Menu/UMenu.pas5
-rw-r--r--Game/Code/Screens/UScreenPartyNewRound.pas8
3 files changed, 9 insertions, 9 deletions
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas
index 414da72f..47c1abf1 100644
--- a/Game/Code/Classes/UThemes.pas
+++ b/Game/Code/Classes/UThemes.pas
@@ -131,6 +131,9 @@ type
DInt: real;
Tex: string;
Typ: string;
+
+ Visible: Boolean;
+
//Reflection Mod
Reflection: boolean;
Reflectionspacing: Real;
@@ -1530,6 +1533,8 @@ begin
ThemeButton.DColB := Color[C].RGB.B;
end;
+ ThemeButton.Visible := (ThemeIni.ReadInteger(Name, 'Visible', 1) = 1);
+
//Fade Mod
ThemeButton.SelectH := ThemeIni.ReadInteger (Name, 'SelectH', ThemeButton.H);
ThemeButton.SelectW := ThemeIni.ReadInteger (Name, 'SelectW', ThemeButton.W);
diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas
index c30b5c5c..4ad8270a 100644
--- a/Game/Code/Menu/UMenu.pas
+++ b/Game/Code/Menu/UMenu.pas
@@ -528,6 +528,9 @@ begin
Button[Result].Z := ThemeButton.Z;
+ //Button Visibility
+ Button[Result].Visible := ThemeButton.Visible;
+
//Some Things from ButtonFading
Button[Result].SelectH := ThemeButton.SelectH;
Button[Result].SelectW := ThemeButton.SelectW;
@@ -574,7 +577,7 @@ end;
function TMenu.AddButton(X, Y, W, H, ColR, ColG, ColB, Int, DColR, DColG, DColB, DInt: real; Name, Format, Typ: String; Reflection: Boolean; ReflectionSpacing, DeSelectReflectionSpacing: Real): integer;
begin
// adds button
- //SetLength is used to reduce Memory usement
+ //SetLength is used once to reduce Memory usement
if (ButtonPos <> -1) then
begin
Result := ButtonPos;
diff --git a/Game/Code/Screens/UScreenPartyNewRound.pas b/Game/Code/Screens/UScreenPartyNewRound.pas
index 8c1b8369..09391438 100644
--- a/Game/Code/Screens/UScreenPartyNewRound.pas
+++ b/Game/Code/Screens/UScreenPartyNewRound.pas
@@ -99,14 +99,6 @@ begin
FadeTo(@ScreenSingModi);
end;
end;
-
- // Up and Down could be done at the same time,
- // but I don't want to declare variables inside
- // functions like this one, called so many times
- SDLK_DOWN: InteractNext;
- SDLK_UP: InteractPrev;
- SDLK_RIGHT: InteractNext;
- SDLK_LEFT: InteractPrev;
end;
end
else // Key Up