nameplates: enable mouselook on right clicks

This commit is contained in:
shagu
2017-01-03 15:58:06 +01:00
parent 7cddaa076b
commit f72757ed43
3 changed files with 11 additions and 0 deletions
+1
View File
@@ -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")
+1
View File
@@ -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")
+9
View File
@@ -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