mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 02:16:02 +00:00
actionbar: add option to selfcast on rightclick
This commit is contained in:
@@ -457,6 +457,7 @@ function pfUI:LoadConfig()
|
||||
|
||||
pfUI:UpdateConfig("bars", nil, "keydown", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "altself", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "rightself", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "animation", "zoomfade")
|
||||
pfUI:UpdateConfig("bars", nil, "animalways", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "reagents", "1")
|
||||
|
||||
@@ -296,6 +296,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
|
||||
local mouse = arg1 and not keystate
|
||||
local keystate = keystate
|
||||
local slfcast = C.bars.altself == "1" and IsAltKeyDown() and true or self.slfcast
|
||||
slfcast = C.bars.rightself == "1" and arg1 and arg1 == "RightButton" and true or slfcast
|
||||
self.slfcast = nil
|
||||
|
||||
if ( pfUI_config.bars.keydown == "1" and keystate == "down" ) or (pfUI_config.bars.keydown == "0" and keystate == "up" ) or self.bar == 11 or mouse then
|
||||
@@ -834,6 +835,11 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
|
||||
f:SetAttribute(("*type-S%dRight"):format(state), "action")
|
||||
f:SetAttribute(("*action-S%d"):format(state), action)
|
||||
f:SetAttribute(("*action-S%dRight"):format(state), action)
|
||||
if C.bars.rightself == "1" then
|
||||
f:SetAttribute(("*unit-S%dRight"):format(state), "player")
|
||||
else
|
||||
f:SetAttribute(("*unit-S%dRight"):format(state), nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+2
-1
@@ -1825,7 +1825,8 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
|
||||
CreateGUIEntry(T["Actionbar"], T["General"], function()
|
||||
CreateConfig(U["bars"], T["Trigger Actions On Key Down"], C.bars, "keydown", "checkbox")
|
||||
CreateConfig(U["bars"], T["Alt Self Cast For All Hotkeys"], C.bars, "altself", "checkbox")
|
||||
CreateConfig(U["bars"], T["Self Cast: Alt Key"], C.bars, "altself", "checkbox")
|
||||
CreateConfig(U["bars"], T["Self Cast: Right Click"], C.bars, "rightself", "checkbox")
|
||||
CreateConfig(U["bars"], T["Button Animation"], C.bars, "animation", "dropdown", pfUI.gui.dropdowns.actionbuttonanimations)
|
||||
CreateConfig(U["bars"], T["Show Animation On Hidden Bars"], C.bars, "animalways", "checkbox")
|
||||
CreateConfig(U["bars"], T["Show Reagent Count"], C.bars, "reagents", "checkbox")
|
||||
|
||||
Reference in New Issue
Block a user