mouse camera control menu

This commit is contained in:
April Ayres-Griffiths 2019-04-14 17:01:12 +10:00
parent 3c03c55dce
commit 9d0c8fb688
10 changed files with 199 additions and 67 deletions

View File

@ -6063,6 +6063,21 @@ object GUIForm: TGUIForm
Caption = 'Copy Text Screen'
OnClick = miCopyTextClick
end
object N13: TMenuItem
Caption = '-'
end
object miCamera: TMenuItem
Caption = 'Camera'
OnClick = miCameraClick
object miCameraMouseControl: TMenuItem
Caption = 'Mouse Control'
OnClick = miCameraMouseControlClick
end
object miCameraAlternateControls: TMenuItem
Caption = 'Alternate Controls'
OnClick = miCameraAlternateControlsClick
end
end
end
object Input: TMenuItem
Caption = 'Input'

View File

@ -27,6 +27,10 @@ type
btnHide: TButton;
Label1: TLabel;
Label2: TLabel;
miCameraMouseControl: TMenuItem;
miCameraAlternateControls: TMenuItem;
miCamera: TMenuItem;
N13: TMenuItem;
miMemoryEdit: TMenuItem;
miCopyText: TMenuItem;
miPasteText: TMenuItem;
@ -369,6 +373,9 @@ type
procedure miAR100Click(Sender: TObject);
procedure miARClick(Sender: TObject);
procedure miAudioClick(Sender: TObject);
procedure miCameraAlternateControlsClick(Sender: TObject);
procedure miCameraClick(Sender: TObject);
procedure miCameraMouseControlClick(Sender: TObject);
procedure miColorDotsClick(Sender: TObject);
procedure miColorRasterClick(Sender: TObject);
procedure miColorVoxelsClick(Sender: TObject);
@ -752,6 +759,7 @@ begin
end;
2: begin
SimpleGet(baseUrl + '/api/control/hardware/disk/swap');
SendOSDMessage('Swapped disks in Drive 1 & 2');
end;
3: begin
@ -851,6 +859,40 @@ begin
miSNDMuted.Checked := GetConfig('audio/init.master.mute') = '1';
end;
procedure TGUIForm.miCameraAlternateControlsClick(Sender: TObject);
begin
if GetConfig('video/current.mousemovecamera.alternate') = '1' then
begin
UpdateConfig('video/current.mousemovecamera.alternate', '0', false);
SendOSDMessage('Alternate Camera Mouse control disabled');
end
else
begin
UpdateConfig('video/current.mousemovecamera.alternate', '1', false);
SendOSDMessage('Alternate Camera Mouse control enabled');
end;
end;
procedure TGUIForm.miCameraClick(Sender: TObject);
begin
miCameraMouseControl := GetConfig('video/current.mousemovecamera.enabled') = '1';
miCameraAlternateControls := GetConfig('video/current.mousemovecamera.alternate') = '1';
end;
procedure TGUIForm.miCameraMouseControlClick(Sender: TObject);
begin
if GetConfig('video/current.mousemovecamera.enabled') = '1' then
begin
UpdateConfig('video/current.mousemovecamera.enabled', '0', false);
SendOSDMessage('Camera Mouse control disabled');
end
else
begin
UpdateConfig('video/current.mousemovecamera.enabled', '1', false);
SendOSDMessage('Camera Mouse control enabled');
end;
end;
procedure TGUIForm.miColorDotsClick(Sender: TObject);
begin
UpdateConfig( 'video/init.video.hgrmode', '0', true );

View File

@ -21,8 +21,8 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<TopLine Value="2381"/>
<CursorPos X="22" Y="2399"/>
<TopLine Value="1771"/>
<CursorPos X="15" Y="1773"/>
<UsageCount Value="323"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -64,123 +64,127 @@
<UsageCount Value="24"/>
</Unit5>
</Units>
<JumpHistory Count="29" HistoryIndex="28">
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="main.pas"/>
<Caret Line="540" Column="30" TopLine="520"/>
<Caret Line="2361" Column="14" TopLine="2337"/>
</Position1>
<Position2>
<Filename Value="main.pas"/>
<Caret Line="605" Column="25" TopLine="579"/>
<Caret Line="2362" Column="13" TopLine="623"/>
</Position2>
<Position3>
<Filename Value="main.pas"/>
<Caret Line="1907" Column="46" TopLine="1965"/>
<Caret Line="2414" Column="26" TopLine="2404"/>
</Position3>
<Position4>
<Filename Value="main.pas"/>
<Caret Line="1640" Column="3" TopLine="1638"/>
<Caret Line="2415" Column="26" TopLine="2405"/>
</Position4>
<Position5>
<Filename Value="main.pas"/>
<Caret Line="1647" Column="3" TopLine="1645"/>
<Caret Line="1623" Column="23" TopLine="1620"/>
</Position5>
<Position6>
<Filename Value="main.pas"/>
<Caret Line="838" Column="16" TopLine="825"/>
<Caret Line="1177" Column="48" TopLine="1175"/>
</Position6>
<Position7>
<Filename Value="main.pas"/>
<Caret Line="537" TopLine="519"/>
<Caret Line="1999" Column="28" TopLine="1995"/>
</Position7>
<Position8>
<Filename Value="main.pas"/>
<Caret Line="538" TopLine="520"/>
<Caret Line="531" Column="15" TopLine="664"/>
</Position8>
<Position9>
<Filename Value="main.pas"/>
<Caret Line="540" TopLine="522"/>
<Caret Line="2472" Column="33" TopLine="2480"/>
</Position9>
<Position10>
<Filename Value="main.pas"/>
<Caret Line="542" TopLine="524"/>
<Caret Line="2449" Column="3" TopLine="2447"/>
</Position10>
<Position11>
<Filename Value="main.pas"/>
<Caret Line="543" TopLine="525"/>
<Caret Line="1738" Column="15" TopLine="1736"/>
</Position11>
<Position12>
<Filename Value="main.pas"/>
<Caret Line="544" TopLine="526"/>
<Caret Line="1734" Column="4" TopLine="1716"/>
</Position12>
<Position13>
<Filename Value="main.pas"/>
<Caret Line="545" TopLine="527"/>
<Caret Line="1738" Column="3" TopLine="1706"/>
</Position13>
<Position14>
<Filename Value="main.pas"/>
<Caret Line="547" TopLine="529"/>
<Caret Line="1192" Column="15" TopLine="1189"/>
</Position14>
<Position15>
<Filename Value="main.pas"/>
<Caret Line="2338" Column="29" TopLine="2336"/>
<Caret Line="2397" Column="3" TopLine="2381"/>
</Position15>
<Position16>
<Filename Value="main.pas"/>
<Caret Line="2361" Column="14" TopLine="2337"/>
<Caret Line="2087" Column="42" TopLine="2078"/>
</Position16>
<Position17>
<Filename Value="main.pas"/>
<Caret Line="2362" Column="13" TopLine="623"/>
<Caret Line="2467" Column="38" TopLine="2452"/>
</Position17>
<Position18>
<Filename Value="main.pas"/>
<Caret Line="2414" Column="26" TopLine="2404"/>
<Caret Line="35" Column="19" TopLine="16"/>
</Position18>
<Position19>
<Filename Value="main.pas"/>
<Caret Line="2415" Column="26" TopLine="2405"/>
<Caret Line="392" Column="29" TopLine="362"/>
</Position19>
<Position20>
<Filename Value="main.pas"/>
<Caret Line="1623" Column="23" TopLine="1620"/>
<Caret Line="537" Column="14" TopLine="507"/>
</Position20>
<Position21>
<Filename Value="main.pas"/>
<Caret Line="1177" Column="48" TopLine="1175"/>
<Caret Line="542" Column="17" TopLine="512"/>
</Position21>
<Position22>
<Filename Value="main.pas"/>
<Caret Line="1999" Column="28" TopLine="1995"/>
<Caret Line="635" Column="54" TopLine="604"/>
</Position22>
<Position23>
<Filename Value="main.pas"/>
<Caret Line="531" Column="15" TopLine="664"/>
<Caret Line="656" Column="22" TopLine="625"/>
</Position23>
<Position24>
<Filename Value="main.pas"/>
<Caret Line="2472" Column="33" TopLine="2480"/>
<Caret Line="657" Column="15" TopLine="626"/>
</Position24>
<Position25>
<Filename Value="main.pas"/>
<Caret Line="2449" Column="3" TopLine="2447"/>
<Caret Line="672" Column="6" TopLine="670"/>
</Position25>
<Position26>
<Filename Value="main.pas"/>
<Caret Line="1738" Column="15" TopLine="1736"/>
<Caret Line="766" Column="45" TopLine="743"/>
</Position26>
<Position27>
<Filename Value="main.pas"/>
<Caret Line="1734" Column="4" TopLine="1716"/>
<Caret Line="1280" Column="6" TopLine="1278"/>
</Position27>
<Position28>
<Filename Value="main.pas"/>
<Caret Line="1738" Column="3" TopLine="1706"/>
<Caret Line="786" Column="46" TopLine="761"/>
</Position28>
<Position29>
<Filename Value="main.pas"/>
<Caret Line="1192" Column="15" TopLine="1189"/>
<Caret Line="1280" Column="65" TopLine="1259"/>
</Position29>
<Position30>
<Filename Value="main.pas"/>
<Caret Line="1324" Column="31" TopLine="1307"/>
</Position30>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -6063,6 +6063,21 @@ object GUIForm: TGUIForm
Caption = 'Copy Text Screen'
OnClick = miCopyTextClick
end
object N13: TMenuItem
Caption = '-'
end
object miCamera: TMenuItem
Caption = 'Camera'
OnClick = miCameraClick
object miCameraMouseControl: TMenuItem
Caption = 'Mouse Control'
OnClick = miCameraMouseControlClick
end
object miCameraAlternateControls: TMenuItem
Caption = 'Alternate Controls'
OnClick = miCameraAlternateControlsClick
end
end
end
object Input: TMenuItem
Caption = 'Input'

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6063,6 +6063,21 @@ object GUIForm: TGUIForm
Caption = 'Copy Text Screen'
OnClick = miCopyTextClick
end
object N13: TMenuItem
Caption = '-'
end
object miCamera: TMenuItem
Caption = 'Camera'
OnClick = miCameraClick
object miCameraMouseControl: TMenuItem
Caption = 'Mouse Control'
OnClick = miCameraMouseControlClick
end
object miCameraAlternateControls: TMenuItem
Caption = 'Alternate Controls'
OnClick = miCameraAlternateControlsClick
end
end
end
object Input: TMenuItem
Caption = 'Input'

View File

@ -27,6 +27,10 @@ type
btnHide: TButton;
Label1: TLabel;
Label2: TLabel;
miCameraMouseControl: TMenuItem;
miCameraAlternateControls: TMenuItem;
miCamera: TMenuItem;
N13: TMenuItem;
miMemoryEdit: TMenuItem;
miCopyText: TMenuItem;
miPasteText: TMenuItem;
@ -369,6 +373,9 @@ type
procedure miAR100Click(Sender: TObject);
procedure miARClick(Sender: TObject);
procedure miAudioClick(Sender: TObject);
procedure miCameraAlternateControlsClick(Sender: TObject);
procedure miCameraClick(Sender: TObject);
procedure miCameraMouseControlClick(Sender: TObject);
procedure miColorDotsClick(Sender: TObject);
procedure miColorRasterClick(Sender: TObject);
procedure miColorVoxelsClick(Sender: TObject);
@ -852,6 +859,40 @@ begin
miSNDMuted.Checked := GetConfig('audio/init.master.mute') = '1';
end;
procedure TGUIForm.miCameraAlternateControlsClick(Sender: TObject);
begin
if GetConfig('video/current.mousemovecamera.alternate') = '1' then
begin
UpdateConfig('video/current.mousemovecamera.alternate', '0', false);
SendOSDMessage('Alternate Camera Mouse control disabled');
end
else
begin
UpdateConfig('video/current.mousemovecamera.alternate', '1', false);
SendOSDMessage('Alternate Camera Mouse control enabled');
end;
end;
procedure TGUIForm.miCameraClick(Sender: TObject);
begin
miCameraMouseControl.Checked := GetConfig('video/current.mousemovecamera.enabled') = '1';
miCameraAlternateControls.Checked := GetConfig('video/current.mousemovecamera.alternate') = '1';
end;
procedure TGUIForm.miCameraMouseControlClick(Sender: TObject);
begin
if GetConfig('video/current.mousemovecamera.enabled') = '1' then
begin
UpdateConfig('video/current.mousemovecamera.enabled', '0', false);
SendOSDMessage('Camera Mouse control disabled');
end
else
begin
UpdateConfig('video/current.mousemovecamera.enabled', '1', false);
SendOSDMessage('Camera Mouse control enabled');
end;
end;
procedure TGUIForm.miColorDotsClick(Sender: TObject);
begin
UpdateConfig( 'video/init.video.hgrmode', '0', true );

70
poc.lps
View File

@ -21,8 +21,8 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1771"/>
<CursorPos X="15" Y="1773"/>
<TopLine Value="859"/>
<CursorPos X="8" Y="862"/>
<UsageCount Value="323"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -43,7 +43,7 @@
<EditorIndex Value="-1"/>
<TopLine Value="576"/>
<CursorPos X="49" Y="591"/>
<UsageCount Value="109"/>
<UsageCount Value="108"/>
</Unit3>
<Unit4>
<Filename Value="C:\lazarus\components\lazutils\utf8process.pp"/>
@ -51,7 +51,7 @@
<EditorIndex Value="-1"/>
<TopLine Value="636"/>
<CursorPos Y="654"/>
<UsageCount Value="4"/>
<UsageCount Value="3"/>
</Unit4>
<Unit5>
<Filename Value="images\memory.pas"/>
@ -61,129 +61,129 @@
<EditorIndex Value="-1"/>
<TopLine Value="40"/>
<CursorPos X="17" Y="44"/>
<UsageCount Value="24"/>
<UsageCount Value="23"/>
</Unit5>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="main.pas"/>
<Caret Line="2361" Column="14" TopLine="2337"/>
<Caret Line="2087" Column="42" TopLine="2078"/>
</Position1>
<Position2>
<Filename Value="main.pas"/>
<Caret Line="2362" Column="13" TopLine="623"/>
<Caret Line="2467" Column="38" TopLine="2452"/>
</Position2>
<Position3>
<Filename Value="main.pas"/>
<Caret Line="2414" Column="26" TopLine="2404"/>
<Caret Line="35" Column="19" TopLine="16"/>
</Position3>
<Position4>
<Filename Value="main.pas"/>
<Caret Line="2415" Column="26" TopLine="2405"/>
<Caret Line="392" Column="29" TopLine="362"/>
</Position4>
<Position5>
<Filename Value="main.pas"/>
<Caret Line="1623" Column="23" TopLine="1620"/>
<Caret Line="537" Column="14" TopLine="507"/>
</Position5>
<Position6>
<Filename Value="main.pas"/>
<Caret Line="1177" Column="48" TopLine="1175"/>
<Caret Line="542" Column="17" TopLine="512"/>
</Position6>
<Position7>
<Filename Value="main.pas"/>
<Caret Line="1999" Column="28" TopLine="1995"/>
<Caret Line="635" Column="54" TopLine="604"/>
</Position7>
<Position8>
<Filename Value="main.pas"/>
<Caret Line="531" Column="15" TopLine="664"/>
<Caret Line="656" Column="22" TopLine="625"/>
</Position8>
<Position9>
<Filename Value="main.pas"/>
<Caret Line="2472" Column="33" TopLine="2480"/>
<Caret Line="657" Column="15" TopLine="626"/>
</Position9>
<Position10>
<Filename Value="main.pas"/>
<Caret Line="2449" Column="3" TopLine="2447"/>
<Caret Line="672" Column="6" TopLine="670"/>
</Position10>
<Position11>
<Filename Value="main.pas"/>
<Caret Line="1738" Column="15" TopLine="1736"/>
<Caret Line="766" Column="45" TopLine="743"/>
</Position11>
<Position12>
<Filename Value="main.pas"/>
<Caret Line="1734" Column="4" TopLine="1716"/>
<Caret Line="1280" Column="6" TopLine="1278"/>
</Position12>
<Position13>
<Filename Value="main.pas"/>
<Caret Line="1738" Column="3" TopLine="1706"/>
<Caret Line="786" Column="46" TopLine="761"/>
</Position13>
<Position14>
<Filename Value="main.pas"/>
<Caret Line="1192" Column="15" TopLine="1189"/>
<Caret Line="1280" Column="65" TopLine="1259"/>
</Position14>
<Position15>
<Filename Value="main.pas"/>
<Caret Line="2397" Column="3" TopLine="2381"/>
<Caret Line="1324" Column="31" TopLine="1307"/>
</Position15>
<Position16>
<Filename Value="main.pas"/>
<Caret Line="2087" Column="42" TopLine="2078"/>
<Caret Line="1685" Column="63" TopLine="1663"/>
</Position16>
<Position17>
<Filename Value="main.pas"/>
<Caret Line="2467" Column="38" TopLine="2452"/>
<Caret Line="2109" Column="33" TopLine="2099"/>
</Position17>
<Position18>
<Filename Value="main.pas"/>
<Caret Line="35" Column="19" TopLine="16"/>
<Caret Line="2116" Column="33" TopLine="2106"/>
</Position18>
<Position19>
<Filename Value="main.pas"/>
<Caret Line="392" Column="29" TopLine="362"/>
<Caret Line="638" Column="15" TopLine="634"/>
</Position19>
<Position20>
<Filename Value="main.pas"/>
<Caret Line="537" Column="14" TopLine="507"/>
<Caret Line="1206" TopLine="1203"/>
</Position20>
<Position21>
<Filename Value="main.pas"/>
<Caret Line="542" Column="17" TopLine="512"/>
<Caret Line="2427" Column="3" TopLine="2424"/>
</Position21>
<Position22>
<Filename Value="main.pas"/>
<Caret Line="635" Column="54" TopLine="604"/>
<Caret Line="2808" Column="26" TopLine="2798"/>
</Position22>
<Position23>
<Filename Value="main.pas"/>
<Caret Line="656" Column="22" TopLine="625"/>
<Caret Line="535" Column="15" TopLine="530"/>
</Position23>
<Position24>
<Filename Value="main.pas"/>
<Caret Line="657" Column="15" TopLine="626"/>
<Caret Line="2813" Column="13" TopLine="2805"/>
</Position24>
<Position25>
<Filename Value="main.pas"/>
<Caret Line="672" Column="6" TopLine="670"/>
<Caret Line="757" Column="53" TopLine="747"/>
</Position25>
<Position26>
<Filename Value="main.pas"/>
<Caret Line="766" Column="45" TopLine="743"/>
<Caret Line="758" Column="53" TopLine="748"/>
</Position26>
<Position27>
<Filename Value="main.pas"/>
<Caret Line="1280" Column="6" TopLine="1278"/>
<Caret Line="759" Column="53" TopLine="749"/>
</Position27>
<Position28>
<Filename Value="main.pas"/>
<Caret Line="786" Column="46" TopLine="761"/>
<Caret Line="760" Column="53" TopLine="750"/>
</Position28>
<Position29>
<Filename Value="main.pas"/>
<Caret Line="1280" Column="65" TopLine="1259"/>
<Caret Line="762" Column="53" TopLine="752"/>
</Position29>
<Position30>
<Filename Value="main.pas"/>
<Caret Line="1324" Column="31" TopLine="1307"/>
<Caret Line="862" TopLine="859"/>
</Position30>
</JumpHistory>
<RunParams>