Skip to content

Commit

Permalink
Merge pull request #4 from mrunion/menuwork
Browse files Browse the repository at this point in the history
Added a simple menu
  • Loading branch information
mrunion authored Dec 21, 2023
2 parents adb55e1 + 68b6fab commit 3014822
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 9 deletions.
1 change: 1 addition & 0 deletions flaxlauncherlite.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@
<Filename Value="unit_about.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="FormAbout"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit>
</Units>
Expand Down
6 changes: 3 additions & 3 deletions unit_addengineform.lfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object FormAddEngine: TFormAddEngine
Left = 389
Left = 283
Height = 114
Top = 574
Top = 572
Width = 400
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Expand Down Expand Up @@ -83,7 +83,7 @@ object FormAddEngine: TFormAddEngine
end
object OpenDialogEngine: TOpenDialog
Title = 'Select Flax Engine'
Options = [ofPathMustExist, ofFileMustExist, ofEnableSizing, ofViewDetail]
Options = [ofPathMustExist, ofEnableSizing, ofViewDetail]
Left = 40
Top = 64
end
Expand Down
4 changes: 2 additions & 2 deletions unit_addprojectform.lfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object FormAddProject: TFormAddProject
Left = 385
Left = 280
Height = 155
Top = 741
Top = 734
Width = 400
BorderStyle = bsDialog
Caption = 'Add Project'
Expand Down
31 changes: 31 additions & 0 deletions unit_mainform.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ object FormMain: TFormMain
Caption = 'Flax Launcher Lite'
ClientHeight = 353
ClientWidth = 634
Menu = MainMenu1
OnCreate = FormCreate
OnDestroy = FormDestroy
Position = poScreenCenter
Expand Down Expand Up @@ -176,4 +177,34 @@ object FormMain: TFormMain
OnClick = MenuItemRemoveProjectClick
end
end
object MainMenu1: TMainMenu
Left = 313
Top = 164
object MenuItem1: TMenuItem
Caption = '&File'
object MenuItem2: TMenuItem
Action = AAbout
end
object MenuItem3: TMenuItem
Action = AExit
end
end
end
object ActionListMain: TActionList
Left = 313
Top = 232
object AExit: TAction
Category = 'File'
Caption = 'E&xit'
Hint = 'Quit this program'
OnExecute = ButtonExitClick
ShortCut = 16465
end
object AAbout: TAction
Category = 'Help'
Caption = '&About'
OnExecute = AboutClick
ShortCut = 16449
end
end
end
16 changes: 12 additions & 4 deletions unit_mainform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
interface

uses
Classes, SysUtils, LResources, SQLite3Conn, SQLDB, DB, Forms, Controls, Graphics, Dialogs,
ComCtrls, StdCtrls, Menus, DBCtrls, ExtCtrls, Generics.Collections, Generics.Defaults, Process,
unit_addengineform, unit_addprojectform, unit_tfllbase, unit_tfllengine, unit_tfllproject,
unit_about;
Classes, SysUtils, LResources, SQLite3Conn, SQLDB, DB, Forms, Controls,
Graphics, Dialogs, ComCtrls, StdCtrls, Menus, DBCtrls, ExtCtrls, ActnList,
StdActns, Generics.Collections, Generics.Defaults, Process,
unit_addengineform, unit_addprojectform, unit_tfllbase, unit_tfllengine,
unit_tfllproject, unit_about;

type
{ Engine and Project object lists }
Expand All @@ -26,10 +27,17 @@ TFLLPanel = class(TPanel)
{ TFormMain }

TFormMain = class(TForm)
AAbout: TAction;
AExit: TAction;
ActionListMain: TActionList;
ButtonAbout: TButton;
ButtonExit: TButton;
FlowPanelEngines: TFlowPanel;
FlowPanelProjects: TFlowPanel;
MainMenu1: TMainMenu;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItemAddEngine2: TMenuItem;
MenuItemImportProject2: TMenuItem;
MenuItemNewProject2: TMenuItem;
Expand Down

0 comments on commit 3014822

Please sign in to comment.