mouseover: introducing mouseover casts

This commit is contained in:
shagu
2016-12-18 20:19:29 +01:00
parent 2a02beb308
commit 2972cc8eab
7 changed files with 36 additions and 0 deletions
+3
View File
@@ -56,6 +56,9 @@ The term "*pfui!*" is german and simply stands for "*pooh!*", because I'm not a
big fan of creating configuration UI's especially not via the Wow-API
(you might have noticed that in ShaguUI).
**How can I enable mouseover cast?**
Create a macro with "/pfcast SPELLNAME".
**How can I checkout the current state?**
See Installation Section. But be aware that things might not work for you.
+24
View File
@@ -0,0 +1,24 @@
pfUI:RegisterModule("mouseover", function ()
pfUI.uf.mouseover = CreateFrame("Frame", "pfMouseOver", UIParent)
SLASH_PFCAST1, SLASH_LPFCAST2 = "/pfcast", "/pfmouse"
function SlashCmdList.PFCAST(msg, editbox)
local oldt = true
local unit = "mouseover"
if not UnitExists(unit) then
local frame = GetMouseFocus()
if frame.label and frame.id then
unit = frame.label .. frame.id
else
return
end
end
if UnitIsUnit("target", unit) then oldt = nil end
TargetUnit(unit)
CastSpellByName(msg)
if oldt then TargetLastTarget() end
end
end)
+2
View File
@@ -8,6 +8,8 @@ pfUI:RegisterModule("pet", function ()
end
pfUI.uf.pet = CreateFrame("Button","pfPet",UIParent)
pfUI.uf.pet.label = "pet"
pfUI.uf.pet.id = ""
pfUI.uf.pet:SetFrameStrata("LOW")
pfUI.uf.pet:SetWidth(100)
pfUI.uf.pet:SetHeight(20 + 2*default_border + pfUI_config.unitframes.pet.pspace)
+2
View File
@@ -11,6 +11,8 @@ pfUI:RegisterModule("player", function ()
PlayerFrame:UnregisterAllEvents()
pfUI.uf.player = CreateFrame("Button","pfPlayer",UIParent)
pfUI.uf.player.label = "player"
pfUI.uf.player.id = ""
pfUI.uf.player:SetFrameStrata("LOW")
pfUI.uf.player:SetWidth(pfUI_config.unitframes.player.width)
pfUI.uf.player:SetHeight(pfUI_config.unitframes.player.height + pfUI_config.unitframes.player.pheight + 2*default_border + pfUI_config.unitframes.player.pspace)
+2
View File
@@ -16,6 +16,8 @@ pfUI:RegisterModule("target", function ()
ComboFrame:UnregisterAllEvents()
pfUI.uf.target = CreateFrame("Button","pfTarget",UIParent)
pfUI.uf.target.label = "target"
pfUI.uf.target.id = ""
pfUI.uf.target:SetFrameStrata("LOW")
pfUI.uf.target:Hide()
pfUI.uf.target:SetWidth(pfUI_config.unitframes.target.width)
+2
View File
@@ -17,6 +17,8 @@ pfUI:RegisterModule("targettarget", function ()
end)
pfUI.uf.targettarget = CreateFrame("Button","pfTargetTarget",UIParent)
pfUI.uf.targettarget.label = "targettarget"
pfUI.uf.targettarget.id = ""
pfUI.uf.targettarget:SetFrameStrata("LOW")
pfUI.uf.targettarget:SetWidth(100)
pfUI.uf.targettarget:SetHeight(20 + 2*default_border + pfUI_config.unitframes.ttarget.pspace)
+1
View File
@@ -39,6 +39,7 @@ modules\targettarget.lua
modules\pet.lua
modules\group.lua
modules\raid.lua
modules\mouseover.lua
modules\castbar.lua
modules\skin.lua
modules\xpbar.lua