Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SimClientGUI adjustments

  • Loading branch information...
commit 4a6764beb7fd1964a7ed3bdca1ce43590f300497 1 parent 312d04a
@AlexanderC2 authored
View
3  gpr/common.gpr
@@ -28,7 +28,8 @@ abstract project Common is
Dir & "../src/simclientgui",
Dir & "../src/logging",
Dir & "../src/xlib",
- Dir & "../src/win32");
+ Dir & "../src/win32",
+ Dir & "../src/simconfig");
CompilerSwitches:=();
ObjectDirectory:=Dir & "../build";
View
17 src/canvas/canvas.adb
@@ -165,8 +165,9 @@ package body Canvas is
Y : Integer;
Color : out Color_Type) is
begin
- if (X in Canvas.Image'Range(2))
- and (Y in Canvas.Image'Range(1)) then
+ if Canvas.Image/=null and then
+ ((X in Canvas.Image'Range(2))
+ and (Y in Canvas.Image'Range(1))) then
Color:=Canvas.Image(Y,X);
else
Color:=0;
@@ -181,8 +182,9 @@ package body Canvas is
Color : Color_Type) is
begin
- if (X in Canvas.Image'Range(2))
- and (Y in Canvas.Image'Range(1)) then
+ if Canvas.Image/=null and then
+ ((X in Canvas.Image'Range(2))
+ and (Y in Canvas.Image'Range(1))) then
Canvas.Image(Y,X):=Color;
end if;
@@ -214,7 +216,7 @@ package body Canvas is
Intery : Float;
XPXL2 : Integer;
YPXL2 : Integer;
- Order : Boolean:=True;
+ Order : Boolean:=False;
procedure SPixel
(X : Integer;
@@ -264,7 +266,7 @@ package body Canvas is
Swap(XPos1,YPos1);
Swap(XPos2,YPos2);
Swap(DeltaX,DeltaY);
- Order:=False;
+ Order:=True;
end if;
if XPos2<XPos1 then
Swap(XPos1,XPos2);
@@ -436,7 +438,8 @@ package body Canvas is
DrawY : Integer;
begin
- if (X<0)
+ if (Canvas.Image=null)
+ or (X<0)
or (X>=Canvas.ContentWidth) then
return;
end if;
View
1  src/canvas/canvas.ads
@@ -41,6 +41,7 @@ package Canvas is
ContentHeight : Integer;
ContentWidth : Integer;
end record;
+ type Canvas_Access is access all Canvas_Type;
type Canvas_ClassAccess is access all Canvas_Type'Class;
procedure Initialize
View
11 src/gui/gui-combobox.adb
@@ -18,7 +18,7 @@
-------------------------------------------------------------------------------
pragma Ada_2005;
-with Ada.Text_IO; use Ada.Text_IO;
+--with Ada.Text_IO; use Ada.Text_IO;
package body GUI.Combobox is
@@ -56,9 +56,12 @@ package body GUI.Combobox is
if Index not in -1..Integer(Item.Choices.Length) then
raise IndexOutOfRange;
end if;
- Put("SetIndex");
- New_Line;
- Item.Index:=Index;
+ if Index/=Item.Index then
+ Item.Index:=Index;
+ if Item.OnSelect/=null then
+ Item.OnSelect(Item.CallBackObject);
+ end if;
+ end if;
end SetIndex;
---------------------------------------------------------------------------
View
39 src/gui/gui-combobox.ads
@@ -31,47 +31,56 @@ with Canvas;
with GUI.Basics; use GUI.Basics;
-package GUI.Combobox is
+package GUI.ComboBox is
IndexOutOfRange : Exception;
- type Combobox_Type is new Object_Type with private;
- type Combobox_Access is access all Combobox_Type;
- type Combobox_ClassAccess is access all Combobox_Type'Class;
+ type OnSelect_Access is
+ access procedure
+ (CallBackObject : AnyObject_ClassAccess);
+
+ type ComboBox_Public is new Object_Type with
+ record
+ OnSelect : OnSelect_Access:=null;
+ end record;
+
+ type ComboBox_Type is new ComboBox_Public with private;
+ type ComboBox_Access is access all Combobox_Type;
+ type ComboBox_ClassAccess is access all Combobox_Type'Class;
overriding
procedure Free
- (Item : access Combobox_Type);
+ (Item : access ComboBox_Type);
overriding
procedure Initialize
- (Item : access Combobox_Type;
+ (Item : access ComboBox_Type;
Parent : Object_ClassAccess);
procedure SetIndex
- (Item : access Combobox_Type;
+ (Item : access ComboBox_Type;
Index : Integer);
function GetIndex
- (Item : access Combobox_Type)
+ (Item : access ComboBox_Type)
return Integer;
procedure AddEntry
- (Item : access Combobox_Type;
+ (Item : access ComboBox_Type;
String : Unbounded_String;
Color : Canvas.Color_Type);
function GetSelectedEntryString
- (Item : access Combobox_Type)
+ (Item : access ComboBox_Type)
return Unbounded_String;
procedure GetSelectedEntry
- (Item : access Combobox_Type;
+ (Item : access ComboBox_Type;
String : out Unbounded_String;
Color : out Canvas.Color_Type);
function GetEntries
- (Item : access Combobox_Type)
+ (Item : access ComboBox_Type)
return GUI.Basics.StringAndColorList_Pack.List;
function GetEntryCount
@@ -79,17 +88,17 @@ package GUI.Combobox is
return Integer;
---------------------------------------------------------------------------
- type Combobox_Constructor is
+ type ComboBox_Constructor is
access function
(Parent : GUI.Object_ClassAccess)
return Combobox_ClassAccess;
private
- type Combobox_Type is new Object_Type with
+ type ComboBox_Type is new ComboBox_Public with
record
Choices : GUI.Basics.StringAndColorList_Pack.List;
Index : Integer;
end record;
-end GUI.Combobox;
+end GUI.ComboBox;
View
4 src/gui/gui-edit.ads
@@ -33,4 +33,8 @@ package GUI.Edit is
(Parent : Object_ClassAccess)
return Edit_ClassAccess;
+ procedure SetText
+ (Item : access Edit_Type;
+ Text : Unbounded_String) is abstract;
+
end GUI.Edit;
View
2  src/gui/gui-themes.ads
@@ -34,6 +34,7 @@ with GUI.CheckBox;
with GUI.RadioButton;
with GUI.Edit;
with GUI.GroupBox;
+with GUI.Label;
package GUI.Themes is
@@ -51,6 +52,7 @@ package GUI.Themes is
NewRadioButton : GUI.RadioButton.RadioButton_Constructor := null;
NewEdit : GUI.Edit.Edit_Constructor := null;
NewGroupBox : GUI.GroupBox.GroupBox_Constructor := null;
+ NewLabel : GUI.Label.Label_Constructor := null;
end record;
package Implementations is new Config.Implementations
View
9 src/gui/gui.adb
@@ -946,6 +946,8 @@ package body GUI is
Canvas.Object.Canvasse:=Canvas.Next;
end if;
+ Standard.Canvas.Canvas_Access(Canvas).Finalize;
+
end Finalize;
---------------------------------------------------------------------------
@@ -991,6 +993,9 @@ package body GUI is
-- TODO: This is not enough, there can be referenced through containers
-- be left which MUST be removed too
+ Put("Free Object:");
+ Put(Item.all'Address);
+ New_Line;
if Item.Context.Priv.FocusObject=Object_ClassAccess(Item) then
ClearFocusTree(Object_ClassAccess(Item));
end if;
@@ -1013,7 +1018,7 @@ package body GUI is
end loop;
end;
- -- Free all Canvasse
+ -- Free all Canvases
declare
Canvas : Canvas_ClassAccess;
NextCanvas : Canvas_ClassAccess;
@@ -1022,7 +1027,7 @@ package body GUI is
while Canvas/=null loop
NextCanvas:=Canvas.Next;
- Free(Canvas);
+ FreeCanvas(Canvas);
Canvas:=NextCanvas;
end loop;
end;
View
3  src/gui/themes/yellowblue/yellowblue-combobox.adb
@@ -79,6 +79,7 @@ package body YellowBlue.Combobox is
use type Fonts.Font_ClassAccess;
begin
+
if Item.Font/=null then
Fonts.Release(Item.Font);
end if;
@@ -323,8 +324,6 @@ package body YellowBlue.Combobox is
(Item : access Combobox_Type;
Index : Integer) is
begin
- Put("Set Index of Combobox");
- New_Line;
GUI.Combobox.Combobox_Access(Item).SetIndex(Index);
DrawCanvas(Item);
end SetIndex;
View
37 src/gui/themes/yellowblue/yellowblue-edit.adb
@@ -29,7 +29,7 @@ with GUIMouse; use GUIMouse;
with GUIKeys; use GUIKeys;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
-with Ada.Text_IO; use Ada.Text_IO;
+--with Ada.Text_IO; use Ada.Text_IO;
package body YellowBlue.Edit is
@@ -74,6 +74,15 @@ package body YellowBlue.Edit is
X : Integer;
Y : Integer)
return Boolean;
+
+ overriding
+ procedure SetText
+ (Item : access Edit_Type;
+ Text : Unbounded_String);
+
+ overriding
+ procedure Free
+ (Item : access Edit_Type);
---------------------------------------------------------------------------
procedure DrawCanvases
@@ -114,6 +123,15 @@ package body YellowBlue.Edit is
end DrawCanvases;
---------------------------------------------------------------------------
+ procedure Free
+ (Item : access Edit_Type) is
+ begin
+ Item.Text.Clear;
+ Fonts.Release(Item.Font);
+ GUI.Edit.Edit_Access(Item).Free;
+ end Free;
+ ---------------------------------------------------------------------------
+
function MouseDown
(Item : access Edit_Type;
Button : MouseButton_Enum;
@@ -190,7 +208,6 @@ package body YellowBlue.Edit is
Chars : Unbounded_String)
return Boolean is
begin
- Put("Token");
Item.CursorPosition:=Item.CursorPosition
+Item.Text.Insert
(Position => Item.CursorPosition,
@@ -209,6 +226,20 @@ package body YellowBlue.Edit is
end Resize;
---------------------------------------------------------------------------
+ procedure SetText
+ (Item : access Edit_Type;
+ Text : Unbounded_String) is
+ begin
+ Item.Text.Initialize
+ (String => Text,
+ Color => TextColor,
+ Font => Item.Font);
+ Item.CursorPosition:=1;
+ MakeCursorVisible(Item);
+ DrawCanvases(Item);
+ end SetText;
+ ---------------------------------------------------------------------------
+
function NewEdit
(Parent : GUI.Object_ClassAccess)
return GUI.Edit.Edit_ClassAccess is
@@ -224,7 +255,7 @@ package body YellowBlue.Edit is
Size => 18,
Attributes => Fonts.NoAttributes);
NewEdit.Text.Initialize
- (String => U("Test"),
+ (String => U(""),
Color => TextColor,
Font => NewEdit.Font);
NewEdit.CursorCanvas:=NewEdit.NewCanvas
View
11 src/gui/themes/yellowblue/yellowblue-groupbox.adb
@@ -53,6 +53,17 @@ package body YellowBlue.GroupBox is
(Item : access GroupBox_Type;
Caption : Unbounded_String);
+ overriding
+ procedure Free
+ (Item : access GroupBox_Type);
+ ---------------------------------------------------------------------------
+
+ procedure Free
+ (Item : access GroupBox_Type) is
+ begin
+ Fonts.Release(Item.Font);
+ GUI.GroupBox.GroupBox_Access(Item).Free;
+ end Free;
---------------------------------------------------------------------------
procedure SetAllBounds
View
18 src/gui/themes/yellowblue/yellowblue-listbox.adb
@@ -35,6 +35,7 @@ package body YellowBlue.ListBox is
FrameColor : constant Canvas.Color_Type:=16#FFFFFF00#;
FrameWidth : constant Integer:=1;
BorderWidth : constant Integer:=2;
+ FillColor : constant Canvas.Color_Type:=16#FF0000FF#;
type ListBox_Type is new GUI.ListBox.ListBox_Type with
record
@@ -44,6 +45,7 @@ package body YellowBlue.ListBox is
LeftFrame : GUI.Canvas_ClassAccess:=null;
TopFrame : GUI.Canvas_ClassAccess:=null;
BottomFrame : GUI.Canvas_ClassAccess:=null;
+ FillCanvas : GUI.Canvas_ClassAccess:=null;
end record;
type ListBox_Access is access all ListBox_Type;
@@ -317,6 +319,22 @@ package body YellowBlue.ListBox is
NewListBox.VerticalScrollbar.CallBackObject:=AnyObject_ClassAccess(NewListBox);
NewListBox.VerticalScrollbar.OnPositionChange:=ScrollPositionChange'Access;
+ NewListBox.FillCanvas:=NewListBox.NewCanvas
+ (Height => 1,
+ Width => 1);
+ NewListBox.FillCanvas.Clear(FillColor);
+ NewListBox.FillCanvas.SetBounds
+ (Top => 0,
+ Left => 0,
+ Height => Bounds.Height,
+ Width => Bounds.Width-YellowBlue.VerticalScrollBar.VerticalScrollBarWidth,
+ Visible => True);
+ NewListBox.FillCanvas.SetAnchors
+ (Top => True,
+ Left => True,
+ Right => True,
+ Bottom => True);
+
return GUI.ListBox.ListBox_ClassAccess(NewListBox);
end NewListBox;
View
1  src/gui/themes/yellowblue/yellowblue-radiobutton.adb
@@ -121,6 +121,7 @@ package body YellowBlue.RadioButton is
Item.CaptionCanvas:=Item.NewCanvas
(Height => TextHeight,
Width => TextWidth);
+ Item.CaptionCanvas.Clear(0);
Item.Font.TextOut
(Canvas => Canvas.Canvas_ClassAccess(Item.CaptionCanvas),
X => 0.0,
View
2  src/gui/themes/yellowblue/yellowblue-verticalscrollbar.adb
@@ -35,7 +35,7 @@ package body YellowBlue.VerticalScrollBar is
SlideTop : constant Integer
:= Integer(ButtonHeight)+BarButtonDistance;
- ButtonBackgroundColor : constant Canvas.Color_Type:=16#00000000#;
+ ButtonBackgroundColor : constant Canvas.Color_Type:=16#FF0000FF#;
ButtonTriangleColor : constant Canvas.Color_Type:=16#FFFFFF00#;
ButtonRectangleColor : constant Canvas.Color_Type:=16#FFFFFF00#;
View
4 src/gui/themes/yellowblue/yellowblue.adb
@@ -35,6 +35,7 @@ with YellowBlue.CheckBox; use YellowBlue.CheckBox;
with YellowBlue.RadioButton; use YellowBlue.RadioButton;
with YellowBlue.Edit; use YellowBlue.Edit;
with YellowBlue.GroupBox; use YellowBlue.GroupBox;
+with YellowBlue.Label; use YellowBlue.Label;
package body YellowBlue is
@@ -50,7 +51,8 @@ package body YellowBlue is
NewCheckBox => NewCheckBox'Access,
NewRadioButton => NewRadioButton'Access,
NewEdit => NewEdit'Access,
- NewGroupBox => NewGroupBox'Access);
+ NewGroupBox => NewGroupBox'Access,
+ NewLabel => NewLabel'Access);
Identifier : constant Unbounded_String:=U("YellowBlue");
View
4 src/opengl/opengl-context-win32.adb
@@ -637,8 +637,8 @@ package body OpenGL.Context.Win32 is
dwStyle => dwStyle,
x => 100,
y => 100,
- nwidth => 640,
- nheight => 480,
+ nwidth => 1024,
+ nheight => 768,
hWndParent => 0,
hMenu => 0,
hInstance => HInstance,
View
164 src/simclientgui/simclientgui-createmenu.adb
@@ -23,28 +23,63 @@ with GUI.TabControl;
with GUI.Button;
with GUI.GroupBox;
with GUI.RadioButton;
+with GUI.Label;
+with GUI.Edit;
with Basics; use Basics;
with BoundsCalc; use BoundsCalc;
with SimClientGUI.MainMenu;
+with SimConfig;
+with SimConfig.Visual;
+
+with Ada.Unchecked_Deallocation;
+with Ada.Text_IO; use Ada.Text_IO;
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
package body SimClientGUI.CreateMenu is
- Tabs : GUI.TabControl.TabControl_ClassAccess;
- Enabled : Boolean:=False;
- GeneralTab : GUI.TabControl.Tab_ClassAccess;
- DistributionTab : GUI.TabControl.Tab_ClassAccess;pragma Unreferenced(DistributionTab);
- NodeTab : GUI.TabControl.Tab_ClassAccess;pragma Unreferenced(NodeTab);
- FrontTab : GUI.TabControl.Tab_ClassAccess;pragma Unreferenced(FrontTab);
- ButtonReturn : GUI.Button.Button_ClassAccess;
- ButtonLaunch : GUI.Button.Button_ClassAccess;
- GameTypeGroup : GUI.GroupBox.GroupBox_ClassAccess;
- NodesGroup : GUI.GroupBox.GroupBox_ClassAccess;
+ type ModuleDesc_Type is
+ record
+ Description : Unbounded_String;
+ FileName : Unbounded_String;
+ end record;
+ type ModuleArray_Type is array(Integer range <>) of ModuleDesc_Type;
+
+ Modules : constant ModuleArray_Type:=
+ ((Description => U("Distribution"),
+ FileName => U("distribution.cfi")),
+ (Description => U("Node"),
+ FileName => U("node.cfi")),
+ (Description => U("Front"),
+ FileName => U("front.cfi")));
+
+ type ModuleTab_Type is
+ record
+ ConfigArray : SimConfig.ConfigArray_Access := null;
+ Tab : GUI.TabControl.Tab_ClassAccess := null;
+ ElementsPage : SimConfig.Visual.ElementsPage_Access := null;
+ end record;
+ type ModuleTabArray_Type is array(Integer range <>) of aliased ModuleTab_Type;
+ type ModuleTabArray_Access is access all ModuleTabArray_Type;
+
+ Tabs : GUI.TabControl.TabControl_ClassAccess;
+ Enabled : Boolean:=False;
+ GeneralTab : GUI.TabControl.Tab_ClassAccess;
+ ButtonReturn : GUI.Button.Button_ClassAccess;
+ ButtonLaunch : GUI.Button.Button_ClassAccess;
+ GameTypeGroup : GUI.GroupBox.GroupBox_ClassAccess;
+ NodesGroup : GUI.GroupBox.GroupBox_ClassAccess;
+ ModuleTabs : ModuleTabArray_Access:=null;
RadioSinglePlayer : GUI.RadioButton.RadioButton_ClassAccess;
RadioMultiPlayerSingleComputer : GUI.RadioButton.RadioButton_ClassAccess;
RadioMultiPlayerMultiComputer : GUI.RadioButton.RadioButton_ClassAccess;
+ NodeCountLabel : GUI.Label.Label_ClassAccess;
+ NodeCountEdit : GUI.Edit.Edit_ClassAccess;
+ FrontCountLabel : GUI.Label.Label_ClassAccess;
+ FrontCountEdit : GUI.Edit.Edit_ClassAccess;
+
procedure WindowAreaResize
(CallBackObject : AnyObject_ClassAccess) is
pragma Unreferenced(CallBackObject);
@@ -84,6 +119,7 @@ package body SimClientGUI.CreateMenu is
Bounds : constant Bounds_Type:=GeneralTab.GetBounds;
begin
+
GameTypeGroup.SetBounds
(Top => 10,
Left => 10,
@@ -96,9 +132,59 @@ package body SimClientGUI.CreateMenu is
Height => Bounds.Height-20,
Width => Bounds.Width-Bounds.Width/2-15,
Visible => True);
+
end GeneralTabResize;
---------------------------------------------------------------------------
+ procedure ClearGameTabs is
+ procedure Free is new Ada.Unchecked_Deallocation
+ (Object => ModuleTabArray_Type,
+ Name => ModuleTabArray_Access);
+ begin
+ if ModuleTabs=null then
+ return;
+ end if;
+ for i in ModuleTabs'Range loop
+ ModuleTabs(i).ElementsPage.Free;
+ ModuleTabs(i).Tab.Free;
+ end loop;
+ Free(ModuleTabs);
+ end ClearGameTabs;
+ ------------------------------------------------------------------------
+
+ procedure SelectGameType is
+
+ use type SimConfig.ConfigArray_Access;
+
+ begin
+ Put_Line("Select Game Type");
+ ClearGameTabs;
+ ModuleTabs:=new ModuleTabArray_Type(Modules'Range);
+ for i in ModuleTabs'Range loop
+ ModuleTabs(i).ConfigArray:=SimConfig.LoadConfig
+ (Modules(i).FileName);
+ SimConfig.DebugConfigArray(ModuleTabs(i).ConfigArray);
+ ModuleTabs(i).Tab:=Tabs.NewTab(Modules(i).Description);
+ ModuleTabs(i).ElementsPage:=SimConfig.Visual.CreateElementsPage
+ (Parent => GUI.Object_ClassAccess(ModuleTabs(i).Tab),
+ Options => ModuleTabs(i).ConfigArray,
+ Theme => ThemeImplementation);
+ ModuleTabs(i).ElementsPage.SetBounds
+ (Top => 0,
+ Left => 0,
+ Height => ModuleTabs(i).Tab.GetBounds.Height,
+ Width => ModuleTabs(i).Tab.GetBounds.Width,
+ Visible => True);
+ ModuleTabs(i).ElementsPage.SetAnchors
+ (Top => True,
+ Left => True,
+ Right => True,
+ Bottom => True);
+ end loop;
+
+ end SelectGameType;
+ ---------------------------------------------------------------------------
+
procedure Enable is
WindowBounds : constant Bounds_Type:=GUIContext.WindowArea.GetBounds;
@@ -110,9 +196,6 @@ package body SimClientGUI.CreateMenu is
GameTypeGroup:=ThemeImplementation.NewGroupBox(GUI.Object_ClassAccess(GeneralTab));
GameTypeGroup.SetCaption(U("Game type"));
- NodesGroup:=ThemeImplementation.NewGroupBox(GUI.Object_ClassAccess(GeneralTab));
- NodesGroup.SetCaption(U("Nodes"));
-
RadioSinglePlayer:=ThemeImplementation.NewRadioButton(GUI.Object_ClassAccess(GameTypeGroup));
RadioSinglePlayer.SetBounds
(Top => 5,
@@ -143,6 +226,46 @@ package body SimClientGUI.CreateMenu is
RadioMultiPlayerMultiComputer.Link(RadioSinglePlayer);
RadioSinglePlayer.SetChecked;
+ ---------------------------------------------------------------------
+
+ NodesGroup:=ThemeImplementation.NewGroupBox(GUI.Object_ClassAccess(GeneralTab));
+ NodesGroup.SetCaption(U("Nodes"));
+
+ NodeCountLabel:=ThemeImplementation.NewLabel(GUI.Object_ClassAccess(NodesGroup));
+ NodeCountLabel.SetBounds
+ (Top => 5,
+ Left => 5,
+ Height => 30,
+ Width => 300,
+ Visible => True);
+ NodeCountLabel.SetCaption(U("Simulation Node Count:"));
+
+ NodeCountEdit:=ThemeImplementation.NewEdit(GUI.Object_ClassAccess(NodesGroup));
+ NodeCountEdit.SetBounds
+ (Top => 35,
+ Left => 5,
+ Height => 30,
+ Width => 100,
+ Visible => True);
+ NodeCountEdit.SetText(U("1"));
+
+ FrontCountLabel:=ThemeImplementation.NewLabel(GUI.Object_ClassAccess(NodesGroup));
+ FrontCountLabel.SetBounds
+ (Top => 85,
+ Left => 5,
+ Height => 30,
+ Width => 300,
+ Visible => True);
+ FrontCountLabel.SetCaption(U("Front Node Count:"));
+
+ FrontCountEdit:=ThemeImplementation.NewEdit(GUI.Object_ClassAccess(NodesGroup));
+ FrontCountEdit.SetBounds
+ (Top => 110,
+ Left => 5,
+ Height => 30,
+ Width => 100,
+ Visible => True);
+ FrontCountEdit.SetText(U("1"));
GeneralTab.OnResize:=GeneralTabResize'Access;
GeneralTabResize(null);
@@ -150,14 +273,13 @@ package body SimClientGUI.CreateMenu is
end CreateGeneralTab;
begin
+ Put_Line("Enabled **********************");
if Enabled then
raise ReenabledGUIModule with "CreateMenu";
end if;
Tabs:=ThemeImplementation.NewTabControl(GUIContext.WindowArea);
+ Put_Line("General Tab Create*******");
CreateGeneralTab;
- DistributionTab:=Tabs.NewTab(U("Distribution"));
- NodeTab:=Tabs.NewTab(U("Node"));
- FrontTab:=Tabs.NewTab(U("Front"));
GUIContext.WindowArea.OnResize:=WindowAreaResize'Access;
ButtonReturn:=ThemeImplementation.NewButton(GUIContext.WindowArea);
@@ -189,8 +311,14 @@ package body SimClientGUI.CreateMenu is
Bottom => True);
ButtonLaunch.SetCaption(U("Launch Game"));
+ -- TODO: Could be unnecessary if the above .SetChecked does that
+ Put_Line("Select Game Type*********************************");
+ SelectGameType;
+
+ Put_Line("WindowAreaResize******************************");
WindowAreaResize(null);
Enabled:=True;
+
end Enable;
---------------------------------------------------------------------------
@@ -199,11 +327,15 @@ package body SimClientGUI.CreateMenu is
if not Enabled then
raise RedisabledGUIModule with "CreateMenu";
end if;
+ Put_Line("Disable..***********************:");
+ ClearGameTabs;
+ Put_Line("Rest******************************");
Tabs.Free;
ButtonReturn.Free;
ButtonLaunch.Free;
GUIContext.WindowArea.OnResize:=null;
Enabled:=False;
+ Put_Line("Done DISABLE*************");
end Disable;
---------------------------------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.