From 310c3fe2ed78e43fe4b83a4115d41edd84f2be4d Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 6 May 2016 15:42:19 +0200 Subject: [PATCH] Fixed global enable/disable. --- Vect.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Vect.lua b/Vect.lua index ac24a04..a3c0909 100644 --- a/Vect.lua +++ b/Vect.lua @@ -354,14 +354,31 @@ end function Vect:VectDisable() self:Reset(); + self:ApplySettings(); + --hide the frames + Vect:HideFrames(); --self:Disable(); end function Vect:VectEnable() + --self:Enable(); self:Reset(); self:ApplySettings(); end +--global utility + +function Vect:HideFrames() + for i = 1, 23 do + local frame = self.frames["target"][i]["frame"]; + frame:Hide(); + end + for i = 1, 23 do + local frame = self.frames["focus"][i]["frame"]; + frame:Hide(); + end +end + --Utility Functions for the options --enable