From 4a12311556082939556b0e1a045ff0d1f734fbfc Mon Sep 17 00:00:00 2001 From: Markus Ast Date: Mon, 19 Aug 2019 19:48:00 +0200 Subject: [PATCH] hide insert coords button for non-server clients --- Scripts/Hooks/scratchpad-hook.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Scripts/Hooks/scratchpad-hook.lua b/Scripts/Hooks/scratchpad-hook.lua index 9b3f2db..bc94ac1 100644 --- a/Scripts/Hooks/scratchpad-hook.lua +++ b/Scripts/Hooks/scratchpad-hook.lua @@ -343,6 +343,13 @@ function scratchpad_load() panel:setVisible(true) window:setHasCursor(true) + -- insert coords only works if the client is the server, so hide the button otherwise + if DCS.isServer() then + insertCoordsBtn:setVisible(true) + else + insertCoordsBtn:setVisible(false) + end + isHidden = false end