Permalink
Browse files

remove ttf,add config

  • Loading branch information...
1 parent bd15acc commit f0087b4951835f7ffba748842c999345f620e67e unknown committed Apr 2, 2012
Showing with 29 additions and 1 deletion.
  1. +18 −1 SlideLock.lua
  2. +2 −0 SlideLock.toc
  3. +9 −0 config.lua
  4. BIN media/beta.TTF
  5. BIN media/core_font.ttf
View
@@ -1,6 +1,7 @@
--Susnow
local addon,ns = ...
+local cfg = ns.cfg
local texFile = "Interface\\Buttons\\WHITE8X8"
local bgTex = {bgFile = texFile,edgeFile = texFile, edgeSize = 1,insets={top = 0, bottom = 0,left = 0,right = 0}}
local tex = "Interface\\AddOns\\SlideLock\\media\\"
@@ -208,16 +209,32 @@ local function ToggleSlideLock(flag)
BP1:Show()
BP2:Show()
TP:Show()
+ PlaySoundFile(tex.."lock2.ogg","Master")
end
end
ToggleSlideLock("HIDE")
UIParent:HookScript("OnHide",function()
ToggleSlideLock("SHOW")
- PlaySoundFile(tex.."lock2.ogg","Master")
end)
UIParent:HookScript("OnShow",function()
ToggleSlideLock("HIDE")
end)
+
+
+local UIP = CreateFrame("Frame")
+if cfg.AFK then
+ UIP:RegisterEvent("PLAYER_FLAGS_CHANGED")
+ UIP:SetScript("OnEvent",function()
+ if UnitIsAFK("player") then
+ UIParent:Hide()
+ else
+ return
+ end
+ end)
+else
+ return
+end
+
View
@@ -7,4 +7,6 @@
## Notes-zhCN: 和iOS风格类似的锁屏插件
## Notes-zhTW: 和iOS風格類似的鎖屏插件
+
+config.lua
SlideLock.lua
View
@@ -0,0 +1,9 @@
+--Susnow
+
+local addon,ns = ...
+local cfg = CreateFrame("Frame")
+
+cfg.AFK = true -- lock screen when player away from the keyboard
+
+
+ns.cfg = cfg
View
Binary file not shown.
View
Binary file not shown.

0 comments on commit f0087b4

Please sign in to comment.