WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   combo points (https://www.wowinterface.com/forums/showthread.php?t=33822)

mankeluvsit 07-08-10 10:20 PM

combo points
 
i never had to deal with combo points untill i started playing on my cousins rogue, and i want to see my CP's and im not getting it correctly.
lua Code:
  1. if unit=="player" then
  2.  
  3. if(playerClass=="ROGUE") then
  4. local CPoints = {}
  5. for index = 1, MAX_COMBO_POINTS do
  6.    local CPoint = self.Health:CreateFontString(nil, "OVERLAY")
  7.    CPoint:SetSize(6, 6)
  8.    CPoint:SetPoint("TOPLEFT", self.Health, 0, 0)
  9.  
  10.    CPoints[index] = CPoint
  11. end
  12. self.CPoints = CPoints
  13. end
  14. end
  15.  
  16.  
  17.  
  18.  
  19. -- ---------------------------------------- or ---------------------------------------- --
  20.  
  21.  
  22.  
  23.  
  24. if (class == "ROGUE") then
  25. self.cpoints = self.Health:CreateTexture(nil, "OVERLAY")
  26. self.cpoints:SetHeight(8)
  27. self.cpoints:SetWidth(8)
  28. self.cpoints:SetPoint("TOPRIGHT", self, -0, -6)
  29. end
*just a snippet
anyone see anything wrong?

Rostok 07-08-10 11:36 PM

You're trying to add CP to your player frame and not to the target frame.

yj589794 07-09-10 02:42 AM

In oUF 1.4 there are 2 ways to display combo points:

1) Use the 'cpoints' tag to display a text representation of the current combo points

e.g.
Code:

                local cpoints = self:CreateFontString(nil, 'OVERLAY')
                cpoints:SetPoint('RIGHT', self, 'LEFT', -config.SPACING, 0)
                cpoints:SetFont(config.FONT, config.FONTSIZELARGE, config.FONTBORDER)
                cpoints:SetJustifyH('RIGHT')
                self:Tag(cpoints, '|cffffffff[cpoints]|r')



2) Use the combo points element to display a number of texture for the current combo points

e.g.
Code:

        local cpoints = {}
        for i = 1, MAX_COMBO_POINTS do
                cpoints[i] = self:CreateTexture(nil, 'ARTWORK')
                cpoints[i]:SetSize(8, 8)
                cpoints[i]:SetTexture(1, i == 5 and 0 or 1, i == 5 and 0 or 1, 1)
                cpoints[i]:SetPoint('RIGHT', i == 1 and self or cpoints[i - 1], 'LEFT', -config.SPACING, 0)
        end



All times are GMT -6. The time now is 01:37 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI