This commit is contained in:
April Ayres-Griffiths 2019-04-15 12:54:17 +10:00
parent ba2db4e5d5
commit ad3cc31139
4 changed files with 83 additions and 49 deletions

View File

@ -5,7 +5,7 @@ object GUIForm: TGUIForm
Width = 1014
AlphaBlendValue = 128
Caption = 'microM8 GUI'
ClientHeight = 648
ClientHeight = 643
ClientWidth = 1014
Constraints.MinWidth = 1014
DoubleBuffered = False
@ -29,8 +29,8 @@ object GUIForm: TGUIForm
LCLVersion = '2.0.0.4'
object StatusBar1: TStatusBar
Left = 0
Height = 23
Top = 625
Height = 19
Top = 624
Width = 1014
Panels = <>
end
@ -232,7 +232,7 @@ object GUIForm: TGUIForm
end
object tbMasterVolume: TTrackBar
Left = 249
Height = 32
Height = 38
Top = 2
Width = 64
OnChange = tbMasterVolumeChange
@ -273,7 +273,7 @@ object GUIForm: TGUIForm
end
object TrackBar2: TTrackBar
Left = 417
Height = 32
Height = 38
Top = 2
Width = 64
Max = 4
@ -322,31 +322,31 @@ object GUIForm: TGUIForm
end
object pnlContainer: TPanel
Left = 0
Height = 589
Height = 588
Top = 36
Width = 1014
Align = alClient
BevelOuter = bvNone
ClientHeight = 589
ClientHeight = 588
ClientWidth = 1014
ParentColor = False
TabOrder = 2
object sidecarPanel: TPanel
Left = 844
Height = 552
Height = 551
Top = 0
Width = 170
Align = alRight
BevelOuter = bvNone
Caption = 'sidecarPanel'
ClientHeight = 552
ClientHeight = 551
ClientWidth = 170
Color = clBlack
ParentColor = False
TabOrder = 0
object Image1: TImage
Left = 0
Height = 552
Height = 551
Top = 0
Width = 170
Align = alClient
@ -5439,12 +5439,12 @@ object GUIForm: TGUIForm
end
object embedPanel: TPanel
Left = 0
Height = 552
Height = 551
Top = 0
Width = 844
Align = alClient
BevelOuter = bvNone
ClientHeight = 552
ClientHeight = 551
ClientWidth = 844
Color = clBlack
Font.Color = clWhite
@ -5456,7 +5456,7 @@ object GUIForm: TGUIForm
OnMouseUp = FormMouseUp
object backdrop: TImage
Left = 0
Height = 552
Height = 551
Top = 0
Width = 844
Align = alClient
@ -5469,7 +5469,7 @@ object GUIForm: TGUIForm
object pnlMemory: TPanel
Left = 0
Height = 37
Top = 552
Top = 551
Width = 1014
Align = alBottom
ClientHeight = 37
@ -5480,7 +5480,7 @@ object GUIForm: TGUIForm
OnResize = pnlMemoryResize
object txtAddress: TEdit
Left = 136
Height = 23
Height = 29
Top = 8
Width = 80
OnKeyPress = txtAddressKeyPress
@ -5490,23 +5490,23 @@ object GUIForm: TGUIForm
end
object Label1: TLabel
Left = 9
Height = 15
Height = 17
Top = 10
Width = 122
Width = 130
Caption = 'Memory Address (hex):'
ParentColor = False
end
object Label2: TLabel
Left = 240
Height = 15
Height = 17
Top = 10
Width = 60
Width = 65
Caption = 'Value (hex):'
ParentColor = False
end
object txtValue: TEdit
Left = 312
Height = 23
Height = 29
Top = 8
Width = 80
OnKeyPress = txtValueKeyPress
@ -10611,4 +10611,18 @@ object GUIForm: TGUIForm
left = 238
top = 223
end
object SPMenu: TPopupMenu
OnPopup = DiskMenuPopup
OnClose = DiskMenuClose
left = 24
top = 272
object miSPConnect: TMenuItem
Caption = 'Connect Disk'
OnClick = miSPFileClick
end
object miSPMenuEject: TMenuItem
Caption = 'Eject'
OnClick = miSPEjectClick
end
end
end

View File

@ -25,8 +25,11 @@ type
btnRead: TButton;
btnWrite: TButton;
btnHide: TButton;
SPMenu: TPopupMenu;
Label1: TLabel;
Label2: TLabel;
miSPConnect: TMenuItem;
miSPMenuEject: TMenuItem;
miOpenPAK: TMenuItem;
N16: TMenuItem;
miCameraReset: TMenuItem;
@ -779,8 +782,8 @@ begin
odDiskImages.FilterIndex := 2;
if Button = mbRight then
begin
DiskMenu.Tag := 2;
DiskMenu.PopUp(Mouse.CursorPos.X, Mouse.CursorPos.Y);
SPMenu.Tag := 2;
SPMenu.PopUp(Mouse.CursorPos.X, Mouse.CursorPos.Y);
end
else
begin
@ -2669,8 +2672,8 @@ const
SHIFT_CTRL_A = $e071;
PAGE_UP = $e004;
PAGE_DOWN = $e005;
SHIFT_LEFT = $e014;
SHIFT_RIGHT = $e015;
SHIFT_CSR_LEFT = $e05b;
SHIFT_CSR_RIGHT = $e05c;
begin
case Key of
219:
@ -2737,11 +2740,11 @@ begin
else
Result := CSR_DOWN;
VK_Left: if (ssShift in Shift) then
Result := SHIFT_LEFT
Result := SHIFT_CSR_LEFT
else
Result := CSR_LEFT;
VK_Right: if (ssShift in Shift) then
Result := SHIFT_RIGHT
Result := SHIFT_CSR_RIGHT
else
Result := CSR_RIGHT;
VK_0..VK_9:

View File

@ -5,7 +5,7 @@ object GUIForm: TGUIForm
Width = 1014
AlphaBlendValue = 128
Caption = 'microM8 GUI'
ClientHeight = 648
ClientHeight = 643
ClientWidth = 1014
Constraints.MinWidth = 1014
DoubleBuffered = False
@ -29,8 +29,8 @@ object GUIForm: TGUIForm
LCLVersion = '2.0.0.4'
object StatusBar1: TStatusBar
Left = 0
Height = 23
Top = 625
Height = 19
Top = 624
Width = 1014
Panels = <>
end
@ -232,7 +232,7 @@ object GUIForm: TGUIForm
end
object tbMasterVolume: TTrackBar
Left = 249
Height = 32
Height = 38
Top = 2
Width = 64
OnChange = tbMasterVolumeChange
@ -273,7 +273,7 @@ object GUIForm: TGUIForm
end
object TrackBar2: TTrackBar
Left = 417
Height = 32
Height = 38
Top = 2
Width = 64
Max = 4
@ -322,31 +322,31 @@ object GUIForm: TGUIForm
end
object pnlContainer: TPanel
Left = 0
Height = 589
Height = 588
Top = 36
Width = 1014
Align = alClient
BevelOuter = bvNone
ClientHeight = 589
ClientHeight = 588
ClientWidth = 1014
ParentColor = False
TabOrder = 2
object sidecarPanel: TPanel
Left = 844
Height = 552
Height = 551
Top = 0
Width = 170
Align = alRight
BevelOuter = bvNone
Caption = 'sidecarPanel'
ClientHeight = 552
ClientHeight = 551
ClientWidth = 170
Color = clBlack
ParentColor = False
TabOrder = 0
object Image1: TImage
Left = 0
Height = 552
Height = 551
Top = 0
Width = 170
Align = alClient
@ -5439,12 +5439,12 @@ object GUIForm: TGUIForm
end
object embedPanel: TPanel
Left = 0
Height = 552
Height = 551
Top = 0
Width = 844
Align = alClient
BevelOuter = bvNone
ClientHeight = 552
ClientHeight = 551
ClientWidth = 844
Color = clBlack
Font.Color = clWhite
@ -5456,7 +5456,7 @@ object GUIForm: TGUIForm
OnMouseUp = FormMouseUp
object backdrop: TImage
Left = 0
Height = 552
Height = 551
Top = 0
Width = 844
Align = alClient
@ -5469,7 +5469,7 @@ object GUIForm: TGUIForm
object pnlMemory: TPanel
Left = 0
Height = 37
Top = 552
Top = 551
Width = 1014
Align = alBottom
ClientHeight = 37
@ -5480,7 +5480,7 @@ object GUIForm: TGUIForm
OnResize = pnlMemoryResize
object txtAddress: TEdit
Left = 136
Height = 23
Height = 29
Top = 8
Width = 80
OnKeyPress = txtAddressKeyPress
@ -5490,23 +5490,23 @@ object GUIForm: TGUIForm
end
object Label1: TLabel
Left = 9
Height = 15
Height = 17
Top = 10
Width = 122
Width = 130
Caption = 'Memory Address (hex):'
ParentColor = False
end
object Label2: TLabel
Left = 240
Height = 15
Height = 17
Top = 10
Width = 60
Width = 65
Caption = 'Value (hex):'
ParentColor = False
end
object txtValue: TEdit
Left = 312
Height = 23
Height = 29
Top = 8
Width = 80
OnKeyPress = txtValueKeyPress
@ -10611,4 +10611,18 @@ object GUIForm: TGUIForm
left = 238
top = 223
end
object SPMenu: TPopupMenu
OnPopup = DiskMenuPopup
OnClose = DiskMenuClose
left = 24
top = 272
object miSPConnect: TMenuItem
Caption = 'Connect Disk'
OnClick = miSPFileClick
end
object miSPMenuEject: TMenuItem
Caption = 'Eject'
OnClick = miSPEjectClick
end
end
end

View File

@ -25,8 +25,11 @@ type
btnRead: TButton;
btnWrite: TButton;
btnHide: TButton;
SPMenu: TPopupMenu;
Label1: TLabel;
Label2: TLabel;
miSPConnect: TMenuItem;
miSPMenuEject: TMenuItem;
miOpenPAK: TMenuItem;
N16: TMenuItem;
miCameraReset: TMenuItem;
@ -779,8 +782,8 @@ begin
odDiskImages.FilterIndex := 2;
if Button = mbRight then
begin
DiskMenu.Tag := 2;
DiskMenu.PopUp(Mouse.CursorPos.X, Mouse.CursorPos.Y);
SPMenu.Tag := 2;
SPMenu.PopUp(Mouse.CursorPos.X, Mouse.CursorPos.Y);
end
else
begin
@ -1677,7 +1680,7 @@ end;
procedure TGUIForm.miSPEjectClick(Sender: TObject);
begin
SimpleGet(baseUrl + '/api/control/hardware/disk/eject/2');
StatusBar1.SimpleText := SimpleGet(baseUrl + '/api/control/hardware/disk/eject/2');
end;
procedure TGUIForm.miSPFileClick(Sender: TObject);