From 0d7ae02277f25a9dc1464b3910976c05da4a81e5 Mon Sep 17 00:00:00 2001 From: Saif Addin Date: Fri, 18 Feb 2022 02:01:32 +0100 Subject: [PATCH] Re-render on hidden settings change --- lang/en.json | 2 +- modules/component/camera.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index 7f6423d..74ea1ee 100644 --- a/lang/en.json +++ b/lang/en.json @@ -76,7 +76,7 @@ "MinimalUI.ColorPicker": "Color Picker", "MinimalUI.NoCameraBehaviorName": "No Camera Behavior", - "MinimalUI.NoCameraBehaviorHint": "What to do with players with cameras turned off?", + "MinimalUI.NoCameraBehaviorHint": "What to do with players with cameras turned off?. Careful: Hidden mode is meant for disabled cameras. If you plan on toggling cameras on and off, use Reduced mode instead.", "MinimalUI.NoCameraBehaviorReduced": "Reduced", "MinimalUI.NoCameraBehaviorHidden": "Hidden" diff --git a/modules/component/camera.js b/modules/component/camera.js index f43a63b..a0eac62 100644 --- a/modules/component/camera.js +++ b/modules/component/camera.js @@ -53,6 +53,10 @@ export default class MinimalUICamera { Hooks.on('ready', function() { MinimalUICamera.updateCameraSettings(); }); + Hooks.on('rtcSettingsChanged', function(act, cl) { + if (cl.client.users[game.user.id].hidden !== undefined) + game.webrtc.render(); + }); } } \ No newline at end of file