Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-21-20, 02:19 AM   #1
Lybrial
A Flamescale Wyrmkin
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 120
oUF: How to enable right click menus on units?

When I spawn units like player or target I would like to have the default right click menu enabled.
Everything works perfect (like showing health, castbar, etc.) but there are no right click menus.

The left click to select units works.

How can I make right click menu work?

Lua Code:
  1. OUF:RegisterStyle(ADDON_NAME, function(frame, unit)
  2.     LybrialUnitFrames:Style(frame, unit);
  3. end);
  4. OUF:SetActiveStyle(ADDON_NAME);
  5.  
  6. OUF:Spawn("player", Player.MODULE_NAME);
  7. OUF:Spawn("target", Target.MODULE_NAME)
  8.  
  9. function LybrialUnitFrames:Style(frame, unit)
  10.     if (unit == "player") then
  11.         self:Player_Create(frame); -- adds health, castbar, name and level
  12.     elseif (unit == "target") then
  13.         self:Target_Create(frame); -- adds health, castbar, name and level
  14.     end
  15. end

Last edited by Lybrial : 04-21-20 at 02:23 AM.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF: How to enable right click menus on units?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off