aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2016-01-03 20:10:11 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2016-01-03 20:10:11 +0000
commit769e3fc3de23b38adeece09b6ab7edb3f0d096b0 (patch)
tree497d2617f610b7ca706f239cbe3cba05378eabbd /src/menu
parente7d5808c9427766baa9c747edfbb74f1b89538a9 (diff)
downloadusdx-769e3fc3de23b38adeece09b6ab7edb3f0d096b0.tar.gz
usdx-769e3fc3de23b38adeece09b6ab7edb3f0d096b0.tar.xz
usdx-769e3fc3de23b38adeece09b6ab7edb3f0d096b0.zip
add menus
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3181 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/menu')
-rw-r--r--src/menu/UMenuInteract.pas4
-rw-r--r--src/menu/UMenuStatic.pas20
2 files changed, 21 insertions, 3 deletions
diff --git a/src/menu/UMenuInteract.pas b/src/menu/UMenuInteract.pas
index 7cb92025..10259940 100644
--- a/src/menu/UMenuInteract.pas
+++ b/src/menu/UMenuInteract.pas
@@ -35,8 +35,8 @@ interface
type
TInteract = record // for moving thru menu
- Typ: integer; // 0 - button, 1 - select, 2 - Text, 3 - Select SLide, 5 - ButtonCollection Child
- Num: integer; // number of this item in proper list like buttons, selects
+ Typ: integer; // 0 - button, 1 - select, 2 - Text, 3 - Select SLide, 5 - ButtonCollection Child
+ Num: integer; // number of this item in proper list like buttons, selects
end;
{ to handle the area where the mouse is over a control }
diff --git a/src/menu/UMenuStatic.pas b/src/menu/UMenuStatic.pas
index 72f4eb36..e8324c84 100644
--- a/src/menu/UMenuStatic.pas
+++ b/src/menu/UMenuStatic.pas
@@ -35,6 +35,7 @@ interface
uses
UTexture,
+ UMenuInteract,
gl;
type
@@ -43,17 +44,23 @@ type
Texture: TTexture; // Button Screen position and size
Visible: boolean;
+ // for list item
+ TextureSelect: TTexture;
+ TextureDeselect: TTexture; // Button Screen position and size
+
//Reflection Mod
Reflection: boolean;
Reflectionspacing: real;
procedure Draw;
constructor Create(Textura: TTexture); overload;
+ function GetMouseOverArea: TMouseOverRect;
end;
implementation
uses
- UDrawTexture;
+ UDrawTexture,
+ UDisplay;
procedure TStatic.Draw;
begin
@@ -114,4 +121,15 @@ begin
Texture := Textura;
end;
+function TStatic.GetMouseOverArea: TMouseOverRect;
+begin
+ if not(Display.Cursor_HiddenByScreen) then
+ begin
+ Result.X := Texture.X;
+ Result.Y := Texture.Y;
+ Result.W := Texture.W;
+ Result.H := Texture.H;
+ end;
+end;
+
end.