From 51363b1e1ebec9c79b6983799e8fc802027f599c Mon Sep 17 00:00:00 2001 From: April Ayres-Griffiths Date: Sun, 14 Apr 2019 17:16:22 +1000 Subject: [PATCH] camera reset --- backup/main.lfm | 7 +++++++ backup/main.pas | 8 ++++++++ main.pas | 2 ++ 3 files changed, 17 insertions(+) diff --git a/backup/main.lfm b/backup/main.lfm index 8d5a35e..c42dbe9 100644 --- a/backup/main.lfm +++ b/backup/main.lfm @@ -6077,6 +6077,13 @@ object GUIForm: TGUIForm Caption = 'Alternate Controls' OnClick = miCameraAlternateControlsClick end + object N15: TMenuItem + Caption = '-' + end + object miCameraReset: TMenuItem + Caption = 'Reset Camera' + OnClick = miCameraResetClick + end end end object Input: TMenuItem diff --git a/backup/main.pas b/backup/main.pas index b2feecf..fdc8987 100644 --- a/backup/main.pas +++ b/backup/main.pas @@ -27,6 +27,8 @@ type btnHide: TButton; Label1: TLabel; Label2: TLabel; + miCameraReset: TMenuItem; + N15: TMenuItem; miPRFReboot: TMenuItem; N14: TMenuItem; miCameraMouseControl: TMenuItem; @@ -378,6 +380,7 @@ type procedure miCameraAlternateControlsClick(Sender: TObject); procedure miCameraClick(Sender: TObject); procedure miCameraMouseControlClick(Sender: TObject); + procedure miCameraResetClick(Sender: TObject); procedure miColorDotsClick(Sender: TObject); procedure miColorRasterClick(Sender: TObject); procedure miColorVoxelsClick(Sender: TObject); @@ -896,6 +899,11 @@ begin end; end; +procedure TGUIForm.miCameraResetClick(Sender: TObject); +begin + SimpleGet(baseUrl+'/api/control/system/camera/reset'); +end; + procedure TGUIForm.miColorDotsClick(Sender: TObject); begin UpdateConfig( 'video/init.video.hgrmode', '0', true ); diff --git a/main.pas b/main.pas index fdc8987..adb9fa8 100644 --- a/main.pas +++ b/main.pas @@ -902,6 +902,8 @@ end; procedure TGUIForm.miCameraResetClick(Sender: TObject); begin SimpleGet(baseUrl+'/api/control/system/camera/reset'); + UpdateConfig('video/current.mousemovecamera.enabled', '0', false) + UpdateConfig('video/current.mousemovecamera.alternate', '0', false) end; procedure TGUIForm.miColorDotsClick(Sender: TObject);