From 347942a0e548e72bcd5c0749324e29a35efe91d5 Mon Sep 17 00:00:00 2001 From: Lionas Date: Tue, 30 Aug 2016 23:41:29 +0900 Subject: [PATCH] =?UTF-8?q?StateChange=E3=81=97=E3=81=9F=E6=99=82=E3=81=AB?= =?UTF-8?q?=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3=E3=81=AE=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E7=8A=B6=E6=85=8B=E3=82=92=E5=8D=B3=E6=99=82=E5=8F=8D=E6=98=A0?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LionasFoodAndDrinkReminder.lua | 38 +++++++++++++------ .../LionasFoodAndDrinkReminder.xml | 2 +- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.lua b/LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.lua index e196563..863091b 100755 --- a/LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.lua +++ b/LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.lua @@ -137,7 +137,7 @@ function OnIconMouseUp(self, mouseButton, upInside) if mouseButton == 2 and upInside then -- right click - LioFADR.isNeverNotify = true + LioFADR.isNeverNotify = true hideIcon() end @@ -364,6 +364,24 @@ local function notifyExpiredBuffs(currentBuffs) end +-- show / hide icon +local function setIconVisibility() + + if(((LioFADRCommon.getTableLength(LioFADR.notifyRemain) > 0) or + (LioFADRCommon.getTableLength(LioFADR.notifyClosed) > 0) or + (LioFADRCommon.getTableLength(LioFADR.notifyExpired)> 0)) and + not LioFADR.isNeverNotify) then + + showIcon() + + else + + hideIcon() + end + +end + + -- Scan buffs local function scanBuffs() @@ -443,17 +461,7 @@ local function scanBuffs() end -- アイコンの表示判断 - if(((LioFADRCommon.getTableLength(LioFADR.notifyRemain) > 0) or - (LioFADRCommon.getTableLength(LioFADR.notifyClosed) > 0) or - (LioFADRCommon.getTableLength(LioFADR.notifyExpired)> 0)) and - not LioFADR.isNeverNotify) then - - showIcon() - - else - hideIcon() - end - + setIconVisibility() end @@ -586,6 +594,9 @@ local function initializeIcon() LioFADR.isHideScene = true end + -- アイコンの表示判断 + setIconVisibility() + end ) HUD_UI_SCENE:RegisterCallback("StateChange", @@ -599,6 +610,9 @@ local function initializeIcon() LioFADR.isHideReticle = false end + -- アイコンの表示判断 + setIconVisibility() + end ) diff --git a/LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.xml b/LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.xml index fcbf6ba..1b2f9c2 100644 --- a/LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.xml +++ b/LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.xml @@ -1,6 +1,6 @@ -