camera reset

This commit is contained in:
April Ayres-Griffiths 2019-04-14 17:16:22 +10:00
parent af237b74d5
commit 51363b1e1e
3 changed files with 17 additions and 0 deletions

View File

@ -6077,6 +6077,13 @@ object GUIForm: TGUIForm
Caption = 'Alternate Controls' Caption = 'Alternate Controls'
OnClick = miCameraAlternateControlsClick OnClick = miCameraAlternateControlsClick
end end
object N15: TMenuItem
Caption = '-'
end
object miCameraReset: TMenuItem
Caption = 'Reset Camera'
OnClick = miCameraResetClick
end
end end
end end
object Input: TMenuItem object Input: TMenuItem

View File

@ -27,6 +27,8 @@ type
btnHide: TButton; btnHide: TButton;
Label1: TLabel; Label1: TLabel;
Label2: TLabel; Label2: TLabel;
miCameraReset: TMenuItem;
N15: TMenuItem;
miPRFReboot: TMenuItem; miPRFReboot: TMenuItem;
N14: TMenuItem; N14: TMenuItem;
miCameraMouseControl: TMenuItem; miCameraMouseControl: TMenuItem;
@ -378,6 +380,7 @@ type
procedure miCameraAlternateControlsClick(Sender: TObject); procedure miCameraAlternateControlsClick(Sender: TObject);
procedure miCameraClick(Sender: TObject); procedure miCameraClick(Sender: TObject);
procedure miCameraMouseControlClick(Sender: TObject); procedure miCameraMouseControlClick(Sender: TObject);
procedure miCameraResetClick(Sender: TObject);
procedure miColorDotsClick(Sender: TObject); procedure miColorDotsClick(Sender: TObject);
procedure miColorRasterClick(Sender: TObject); procedure miColorRasterClick(Sender: TObject);
procedure miColorVoxelsClick(Sender: TObject); procedure miColorVoxelsClick(Sender: TObject);
@ -896,6 +899,11 @@ begin
end; end;
end; end;
procedure TGUIForm.miCameraResetClick(Sender: TObject);
begin
SimpleGet(baseUrl+'/api/control/system/camera/reset');
end;
procedure TGUIForm.miColorDotsClick(Sender: TObject); procedure TGUIForm.miColorDotsClick(Sender: TObject);
begin begin
UpdateConfig( 'video/init.video.hgrmode', '0', true ); UpdateConfig( 'video/init.video.hgrmode', '0', true );

View File

@ -902,6 +902,8 @@ end;
procedure TGUIForm.miCameraResetClick(Sender: TObject); procedure TGUIForm.miCameraResetClick(Sender: TObject);
begin begin
SimpleGet(baseUrl+'/api/control/system/camera/reset'); SimpleGet(baseUrl+'/api/control/system/camera/reset');
UpdateConfig('video/current.mousemovecamera.enabled', '0', false)
UpdateConfig('video/current.mousemovecamera.alternate', '0', false)
end; end;
procedure TGUIForm.miColorDotsClick(Sender: TObject); procedure TGUIForm.miColorDotsClick(Sender: TObject);