1. #9521
    Deleted
    Quote Originally Posted by Submann View Post
    No they are not defined by UICheckButtonTemplate, is UICheckButtonTemplate not just a standard "layout" or is it me there still don't get it ?
    The UICheckButtonTemplate is a frame template which can have any number of properties defined that are then inherited by any frames that specify this template for creation - this includes script handlers. For example, SecureActionButtonTemplate and friends all define a secure OnClick handler in the template itself that allows them to perform secure operations (casting spells, using items, calling macros that do those).

    Quote Originally Posted by Submann View Post
    but can't get the "GetText" to work, so i tryed with this
    Code:
    -- ********************* * * * * * Do your stuf * * * * * ********************
        local GsGuild = CreateFrame("CheckButton", "SetGsGuild", Window, "UICheckButtonTemplate")
        strText = "Text line here"
        GsGuild:SetScript("OnEnter", OnEnter(strText));
        GsGuild:SetScript("OnLeave", OnLeave);
        GsGuild:SetPoint("TOPLEFT", Window, "TOPLEFT", 10, -30)
        GsGuild.tooltip = "Tooltip here, now it's working ?";
        if (GS_InGuild:lower() == "on") then
            GsGuild:SetChecked(true)
        else
            GsGuild:SetChecked(false)
        end
        SetGsGuildText:SetText(strText);
        GsGuild:SetScript("OnClick", function()
            if (GsGuild:GetChecked() == 1) then
                GS_InGuild = "on"
            elseif (GsGuild:GetChecked() == nil) then
                GS_InGuild = "off"
            else
                print("Error");
            end
        end)
    end
    
    function OnEnter(self, strText)
        GameTooltip:ClearLines()
        GameTooltip:SetOwner(self,"ANCHOR_RIGHT")
        GameTooltip:AddLine(strText,1,0.82,0)
        GameTooltip:AddLine(self.tooltip,1,1,1)
        GameTooltip:Show()
    end
    But the "GetText" is it still not working, any ide how to make it work ?
    This one has a different issue in that you're misunderstanding how :SetScript calls work.

    What you do when you call SetScript is you pass the frame as arg1 (done through the colon call automatically), you pass the script handler label as arg2, and then you pass a function reference as arg3 (every "function" is simply a pointer to a memory address that contains the code to be executed - tables also work this way).
    Code:
    GsGuild:SetScript("OnLeave", OnLeave);
    Here you pass a reference to the function stored in variable OnLeave to the :SetScript call.

    However, let's take a look at your other :SetScript line:
    Code:
    GsGuild:SetScript("OnEnter", OnEnter(strText));
    Here you call the function stored in variable OnEnter with strText as arg1, then pass the return values of that function call to :SetScript. Now the solution I'd propose is to modify the :GetText call in OnEnter to read the proper FontString label for the button using :GetName to determine its global label (as determined by the UICheckButtonTemplate template to be $parentText - see my XML snippet from the template definition in my previous post).

    Code:
    local function OnEnter(self)
        GameTooltip:ClearLines()
        GameTooltip:SetOwner(self,"ANCHOR_RIGHT")
        GameTooltip:AddLine(_G[self:GetName().."Text"]:GetText(),1,0.82,0)
        GameTooltip:AddLine(self.tooltip,1,1,1)
        GameTooltip:Show()
    end
    Revert the rest of your calls back to the way they were:
    Code:
    GsGuild:SetScript("OnEnter", OnEnter)
    Code:
    SetGsGuildText:SetText("Text line here")
    PS: You might want to always double-check your code for whether you unnecessarily use the global namespace - your OnEnter and OnLeave definitions as well as the strText varaible both violate it. Proper etiquette would be to use locals (as you can see exemplified by my OnEnter definition above).
    In case you're curious, this further ties in with the memory pointer handling of functions in Lua. Defining using "function" (in simple terms) creates a function object in memory from the function body, then saves a pointer to that memory location into a global variable with the name specified - "local function" on the other hand uses a local variable to store the function reference.

    Hope this clears it up a bit!

    PS: Make sure your functions (OnEnter and OnLeave) are defined before they are passed to SetScript.
    Last edited by mmocba105e19de; 2011-11-19 at 02:00 AM.

  2. #9522
    Deleted
    Hello. I'm looking for a addon that will UNMUTE wow when i enter combat. Is there such a addon? If not, does anyone know how to change the NPCSCAN addon to unmute upon entering combat rather than unmuting when finding a rare spawn? I have some problems getting ganked while afk'ing at a spawn location. =P

  3. #9523
    Deleted
    Code:
    local f = CreateFrame("Frame")
    f:SetScript("OnEvent",function(s,e)
        if e == "PLAYER_REGEN_ENABLED" then
            SetCVar("Sound_EnableSFX","0")
        else
            SetCVar("Sound_EnableSFX","1")
        end
    end)
    f:RegisterEvent("PLAYER_REGEN_ENABLED")
    f:RegisterEvent("PLAYER_REGEN_DISABLED")
    How to use. Untested. Report back with issues.

  4. #9524
    Deleted
    Im looking for a way to revert a setvertexcolor call made by blizzard:

    https://github.com/tekkub/wow-ui-sou...terationUI.xml (In row 318).

    I manage to add another color to it, but the 2 colors you melt and create a new one.

    What i'd like to to is to be able to set my own color and delete the color given by blizzard.

  5. #9525
    I am trying to nudge my raid into focusing more on avoiding the avoidable dmg in encounters. What are the good addons that can alert me or raid chat when someone has stood in fire. I found one on curse. Are there others?

  6. #9526
    I used to have an addon that activated on a keypress, which then opened a circular "actionbar", which could be configured into having buttons for Raid Markers, spells, abilities and stuff like that - can anyone help me remembering the name?

    - EDIT: Nvm, remembered it was OPie
    Last edited by Nuljan; 2011-11-20 at 04:52 PM.

  7. #9527
    Quote Originally Posted by Tanker View Post
    I am trying to nudge my raid into focusing more on avoiding the avoidable dmg in encounters. What are the good addons that can alert me or raid chat when someone has stood in fire. I found one on curse. Are there others?
    There are some that are just annoying and announce things as "fails" which in my opinion tend to be spammy, annoying, and demotivating. I really can't say enough good things about PhoenixStyle on the other hand to help your raid figure out where it can be improving at things when people aren't doing their job properly.

    Gershuun @ Borean Tundra US - Interface & Macros Moderator

  8. #9528
    Deleted
    Quote Originally Posted by Neza View Post
    Im looking for a way to revert a setvertexcolor call made by blizzard:

    https://github.com/tekkub/wow-ui-sou...terationUI.xml (In row 318).

    I manage to add another color to it, but the 2 colors you melt and create a new one.

    What i'd like to to is to be able to set my own color and delete the color given by blizzard.
    Are you sure that the XML <Color> tag is equivalent to the Lua :SetVertexColor call? I've done some testing, and it seems that vertex coloring is properly replaced on subsequent calls to SetVertexColor.

    In fact, upon looking at it again, I believe that the <Color> tag is equivalent to :SetTexture with numerical arguments (:SetTexture(r,g,b,a)), seeing as there is no texture file specified for the texture in question, and should thus be replaced by another :SetTexture call with the intended coloring.

  9. #9529
    Deleted
    Quote Originally Posted by Treeston View Post
    Are you sure that the XML <Color> tag is equivalent to the Lua :SetVertexColor call? I've done some testing, and it seems that vertex coloring is properly replaced on subsequent calls to SetVertexColor.

    In fact, upon looking at it again, I believe that the <Color> tag is equivalent to :SetTexture with numerical arguments (:SetTexture(r,g,b,a)), seeing as there is no texture file specified for the texture in question, and should thus be replaced by another :SetTexture call with the intended coloring.
    I tried both; setvertexcolor and settexture, the results are better with settexure, but there is still some tintage of some sort.

    When setting the texture to 0,0,0,0 i end up with the purple tintage left, which is set by the xml tag i rather have to recolor that specific layer that lies over the texture?

    (talking about TransmogrifyFrameMarbleBg which doesnt seem to be the texture im looking for)
    Last edited by mmoc5d3981592b; 2011-11-21 at 09:46 AM.

  10. #9530
    Deleted
    Well, you'll have to :SetTexture the unnamed texture object at sublevel 2 which has the <Color> attribute. Try using :GetChildren on TransmogrifyModelFrame to access it.

  11. #9531
    Deleted
    Quote Originally Posted by Treeston View Post
    Well, you'll have to :SetTexture the unnamed texture object at sublevel 2 which has the <Color> attribute. Try using :GetChildren on TransmogrifyModelFrame to access it.
    Tried
    /run kids = { TransmogrifyModelFrame:GetChildren() };for _,framechild in ipairs(kids) do print("-"..framechild:GetName() ); end
    which only returns TransmogrifyModelFrameControlFrame :/

    edit: maybe rather use getregions? shows 3 table entries

    edit2: yep seems to be it
    Last edited by mmoc5d3981592b; 2011-11-21 at 11:21 AM.

  12. #9532
    Deleted
    Yeah, never checked if GetChildren returns non-Frame-inheriting children. Apparently it doesn't, and you need :GetRegions for that.

  13. #9533
    Deleted
    Ok thanks again, everything worked out fine

  14. #9534
    Hiya,
    I've decided to delete my ElvUI after a very long time of usage, I grew tired of it and wanted to create my very own UI.
    The thing is, I have downloaded Bartender, and I was wondering how do you set this Border Window around your bars ? cause right now it's just the skills, and there's nothing around, I'm looking for something like this for example ;

    http://i.imgur.com/CvBjL.jpg

    or

    http://www.1337upload.net/files/ragnaroshc.png

    Oh, and I was also wondering what Unit Frames is the guy on the first picture using ?

    Thanks in advance !

  15. #9535
    Quote Originally Posted by Len View Post
    ...
    KgPanels

    Anyone know how to edit Ovale to anchor to CENTER instead of TOPLEFT? It's annoying to have to move the addon when switching specs(going from 2 to 3 icons)

  16. #9536
    Quote Originally Posted by tordenflesk View Post
    KgPanels

    Anyone know how to edit Ovale to anchor to CENTER instead of TOPLEFT? It's annoying to have to move the addon when switching specs(going from 2 to 3 icons)

    How exactly do I set it up with kgPanels ?

    Edit:

    Nevermind, found an amazing guide (http://freewowguide.org/wow-addon-gu...with-kgpanels/) Just incase anyone's interested.
    Still wondering about the UnitFrames though, thanks alot!
    Last edited by Len; 2011-11-22 at 02:23 PM.

  17. #9537
    Deleted
    Hey, anyone who can help me out?

    Trying to find a specific combo point counter (rogue), i'm not yet allowed though to post a link to show what it looks like :/
    It's very simple, just 1,2,3,4,5 showing up in different colours, been trying to find it myself, tried ComboWatch (4.0) that one is very close, but at 5 points an annoying red cloud like thing happens under the 5 :/ So i want one like ComboWatch, but without the redness extra thing happening.

    Clean and simple 1,2,3,4,5 and not like Blink's RogueHelper -continued either, in that addon they just flash once, i want mine to stick around as long as i have them up.

    Any help would be greatly appreciated.

  18. #9538
    Quote Originally Posted by Solanche View Post
    Hey, anyone who can help me out?

    Trying to find a specific combo point counter (rogue), i'm not yet allowed though to post a link to show what it looks like :/
    It's very simple, just 1,2,3,4,5 showing up in different colours, been trying to find it myself, tried ComboWatch (4.0) that one is very close, but at 5 points an annoying red cloud like thing happens under the 5 :/ So i want one like ComboWatch, but without the redness extra thing happening.

    Clean and simple 1,2,3,4,5 and not like Blink's RogueHelper -continued either, in that addon they just flash once, i want mine to stick around as long as i have them up.

    Any help would be greatly appreciated.
    A lot of addons come up when you search for combo on Curse.

    Maybe try this one if you want the number displayed BasicComboPoints.

    Gershuun @ Borean Tundra US - Interface & Macros Moderator

  19. #9539
    Deleted
    Quote Originally Posted by lawomous View Post
    A lot of addons come up when you search for combo on Curse.

    Maybe try this one if you want the number displayed BasicComboPoints.
    Or try Power Auras - a little overpowered for what you want to do (but it most definitely can), but you'll possibly love it.

  20. #9540
    Quote Originally Posted by Len View Post
    Still wondering about the UnitFrames though, thanks alot!
    The unit frames there look like ShadowedUnitFrames. Both that and Pitbull can give that look. I've done it with SUF and it's just a matter of setting the offset of the left/right powerbar/health bar texts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •