summaryrefslogtreecommitdiff
path: root/src/displays.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/displays.adb')
-rw-r--r--src/displays.adb36
1 files changed, 34 insertions, 2 deletions
diff --git a/src/displays.adb b/src/displays.adb
index 03a0d43..4f3da3d 100644
--- a/src/displays.adb
+++ b/src/displays.adb
@@ -34,18 +34,26 @@ package body Displays is
return Display
is
My_Width : Integer := Max (Message_Box_Width, W);
- My_Height : Integer := Max (Message_Box_Height, H);
+ My_Height : Integer := Max (Message_Box_Height + Stat_Box_Height, H);
begin
return This : Display :=
(WD.Double_Window'(WD.Create (X, Y, My_Width, My_Height, Text)) with
Message_Box => B.Box'(B.Create
(0, 0, Message_Box_Width, Message_Box_Height, "")),
+ Level_Box => B.Box'(B.Create
+ (0, Message_Box_Height, Stat_Box_Width, Stat_Box_Height, "")),
+ Move_Box => B.Box'(B.Create
+ (Stat_Box_Width, Message_Box_Height, Stat_Box_Width, Stat_Box_Height, "")),
Current_Grid => null,
Key_Func => null) do
This.Add (This.Message_Box);
+ This.Add (This.Level_Box);
+ This.Add (This.Move_Box);
This.Message_Box.Set_Label_Size (Text_Size);
+ This.Level_Box.Set_Label_Size (Text_Size);
+ This.Move_Box.Set_Label_Size (Text_Size);
end return;
end Create;
@@ -104,13 +112,17 @@ package body Displays is
New_Width : Integer :=
Max (Message_Box_Width, This.Current_Grid.Get_W);
New_Height : Integer :=
- Message_Box_Height + This.Current_Grid.Get_H;
+ Message_Box_Height + This.Current_Grid.Get_H + Stat_Box_Height;
Grid_X : Integer :=
Max (0, (Message_Box_Width - This.Current_Grid.Get_W) / 2);
begin
This.Current_Grid.Reposition (Grid_X, 0);
This.Message_Box.Resize (New_Width, This.Message_Box.Get_H);
This.Message_Box.Reposition (This.Message_Box.Get_X, This.Current_Grid.Get_H);
+ This.Level_Box.Resize (New_Width / 2, This.Level_Box.Get_H);
+ This.Level_Box.Reposition (0, New_Height - Stat_Box_Height);
+ This.Move_Box.Resize (New_Width / 2, This.Move_Box.Get_H);
+ This.Move_Box.Reposition (New_Width / 2, New_Height - Stat_Box_Height);
This.Resize (New_Width, New_Height);
end Ensure_Correct_Size;
@@ -140,6 +152,26 @@ package body Displays is
+ procedure Set_Level_Number
+ (This : in out Display;
+ To : in Natural) is
+ begin
+ This.Level_Box.Set_Label ("Level:" & Natural'Image (To));
+ end Set_Level_Number;
+
+
+
+
+ procedure Set_Move_Number
+ (This : in out Display;
+ To : in Natural) is
+ begin
+ This.Move_Box.Set_Label ("Moves:" & Natural'Image (To));
+ end Set_Move_Number;
+
+
+
+
procedure Set_Keyboard_Callback
(This : in out Display;
Func : in Keyboard_Callback) is