mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 18:36:01 +00:00
nameplates: enable mouselook on right clicks
This commit is contained in:
@@ -143,6 +143,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("nameplates", nil, "spellname", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "showdebuffs", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "clickthrough", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "rightclick", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "raidiconsize", "16")
|
||||
pfUI:UpdateConfig("nameplates", nil, "players", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "showhp", "0")
|
||||
|
||||
@@ -989,6 +989,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show spellname:", pfUI_config.nameplates, "spellname", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show debuffs:", pfUI_config.nameplates, "showdebuffs", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Clickthrough:", pfUI_config.nameplates, "clickthrough", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable MouseLook on right-clicks:", pfUI_config.nameplates, "rightclick", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Raidicon size:", pfUI_config.nameplates, "raidiconsize")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Players only:", pfUI_config.nameplates, "players", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Healthpoints:", pfUI_config.nameplates, "showhp", "checkbox")
|
||||
|
||||
@@ -86,6 +86,15 @@ pfUI:RegisterModule("nameplates", function ()
|
||||
-- enable clickthrough
|
||||
if pfUI_config.nameplates["clickthrough"] == "0" then
|
||||
nameplate:EnableMouse(true)
|
||||
if pfUI_config.nameplates["rightclick"] == "1" then
|
||||
nameplate:SetScript("OnMouseDown", function()
|
||||
if arg1 and arg1 == "RightButton" then
|
||||
this:Click("LeftButton")
|
||||
AttackTarget()
|
||||
MouselookStart()
|
||||
end
|
||||
end)
|
||||
end
|
||||
else
|
||||
nameplate:EnableMouse(false)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user