aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Menu/UMenu.pas
diff options
context:
space:
mode:
authorb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-03 00:19:52 +0000
committerb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-03 00:19:52 +0000
commit5bf0ebf274fef28811ab952338bd261bd1dd0fa8 (patch)
treef6271ebd739455d74a7e6e4abd535c7ad3413b33 /Game/Code/Menu/UMenu.pas
parent28b809432bd8064400bbc9a52a4e354debf86bb6 (diff)
downloadusdx-5bf0ebf274fef28811ab952338bd261bd1dd0fa8.tar.gz
usdx-5bf0ebf274fef28811ab952338bd261bd1dd0fa8.tar.xz
usdx-5bf0ebf274fef28811ab952338bd261bd1dd0fa8.zip
added "popups" to ask for confirmation when leaving party mode or game or to display messages (like minor errors)
still ugly, needs some theme work git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@157 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Menu/UMenu.pas19
1 files changed, 15 insertions, 4 deletions
diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas
index 4ad8270a..c9d3c726 100644
--- a/Game/Code/Menu/UMenu.pas
+++ b/Game/Code/Menu/UMenu.pas
@@ -12,7 +12,7 @@ type
TMenu = class
protected
ButtonPos: Integer;
-
+
Interactions: array of TInteract;
SelInteraction: integer;
Button: array of TButton;
@@ -29,7 +29,7 @@ type
mY: integer; // mouse Y
Fade: integer; // fade type
- ShowFinish: boolean; // true if there is no fade
+ ShowFinish: boolean; // true if there is no fade
destructor Destroy; override;
@@ -47,7 +47,7 @@ type
procedure PrepareButtonCollections(const Collections: AThemeButtonCollection);
procedure AddButtonCollection(const ThemeCollection: TThemeButtonCollection; Const Num: Byte);
-
+
// background
procedure AddBackground(Name: string);
@@ -68,7 +68,7 @@ type
function AddText(X, Y, W: real; Style: integer; Size, ColR, ColG, ColB: real; Align: integer; Tekst: string): integer; overload;
// button
- Procedure SetButtonLength(Length: Cardinal); //Function that Set Length of Button Array in one Step instead of register new Memory for every Button
+ Procedure SetButtonLength(Length: Cardinal); //Function that Set Length of Button Array in one Step instead of register new Memory for every Button
function AddButton(ThemeButton: TThemeButton): integer; overload;
function AddButton(X, Y, W, H: real; Name: String): integer; overload;
function AddButton(X, Y, W, H: real; Name, Format, Typ: String; Reflection: Boolean): integer; overload;
@@ -107,6 +107,8 @@ type
// function AddWidget(X, Y : UInt16; WidgetSrc : PSDL_Surface): Int16;
// procedure ClearWidgets(MinNumber : Int16);
procedure FadeTo(Screen: PMenu);
+ //popup hack
+ procedure CheckFadeTo(Screen: PMenu; msg: String);
function DrawBG: boolean; virtual;
function DrawFG: boolean; virtual;
@@ -873,6 +875,15 @@ begin
Display.NextScreen := Screen;
end;
+//popup hack
+procedure TMenu.CheckFadeTo(Screen: PMenu; msg: String);
+begin
+ Display.Fade := 0;
+ Display.NextScreenWithCheck := Screen;
+ Display.CheckOK:=False;
+ ScreenPopupCheck.ShowPopup(msg);
+end;
+
procedure TMenu.AddButtonText(AddX, AddY: real; AddText: string);
begin
AddButtonText(AddX, AddY, 1, 1, 1, AddText);