WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   MoP Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=162)
-   -   rAddons (https://www.wowinterface.com/forums/showthread.php?t=43631)

zork 07-07-12 09:06 AM

Quote:

Originally Posted by Haleth (Post 257714)
Tukz fixed the problem by creating a new bar with new secure buttons using StanceButtonTemplate.

@Haleth. Can you post me the fix from Tukz?

The StanceBar_Update function updates the position of the first stance button each time it fires.
Since they changed the actionbar controller to fire every now and then this is a problem now.

So for now it is actually impossible to change without rewriting the stancebar which Tukz seems to have done.

Haleth 07-07-12 09:26 AM

Override bar works perfectly for me, no taint.

For shapeshift bar, I've modified Tukz's code a little so it shows/hides with override bar.

Code:

local function updateShift()
        local numForms = GetNumShapeshiftForms()
        local texture, name, isActive, isCastable
        local button, icon, cooldown
        local start, duration, enable
        for i = 1, NUM_STANCE_SLOTS do
                buttonName = "FreeUIStanceButton"..i
                button = _G[buttonName]
                icon = _G[buttonName.."Icon"]
                if i <= numForms then
                        texture, name, isActive, isCastable = GetShapeshiftFormInfo(i)
                        icon:SetTexture(texture)

                        cooldown = _G[buttonName.."Cooldown"]
                        if texture then
                                cooldown:SetAlpha(1)
                        else
                                cooldown:SetAlpha(0)
                        end

                        start, duration, enable = GetShapeshiftFormCooldown(i)
                        CooldownFrame_SetTimer(cooldown, start, duration, enable)

                        if isActive then
                                StanceBarFrame.lastSelected = button:GetID()
                                button:SetChecked(1)
                        else
                                button:SetChecked(0)
                        end

                        if isCastable then
                                icon:SetVertexColor(1.0, 1.0, 1.0)
                        else
                                icon:SetVertexColor(0.4, 0.4, 0.4)
                        end
                end
        end
end

local shiftbar = CreateFrame("Frame", "FreeUI_StanceBar", UIParent, "SecureHandlerStateTemplate")
shiftbar:SetWidth(NUM_STANCE_SLOTS * 27 - 1)
shiftbar:SetHeight(26)
shiftbar:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 50, 4)
shiftbar.buttons = {}
shiftbar:SetAttribute("_onstate-show", [[
        if newstate == "hide" then
                self:Hide();
        else
                self:Show();
        end
]])

shiftbar:RegisterEvent("PLAYER_LOGIN")
shiftbar:RegisterEvent("PLAYER_ENTERING_WORLD")
shiftbar:RegisterEvent("UPDATE_SHAPESHIFT_FORMS")
shiftbar:RegisterEvent("UPDATE_SHAPESHIFT_USABLE")
shiftbar:RegisterEvent("UPDATE_SHAPESHIFT_COOLDOWN")
shiftbar:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
shiftbar:RegisterEvent("ACTIONBAR_PAGE_CHANGED")
shiftbar:SetScript("OnEvent", function(self, event, ...)
        if event == "PLAYER_LOGIN" then
                for i = 1, NUM_STANCE_SLOTS do
                        if not self.buttons[i] then
                                self.buttons[i] = CreateFrame("CheckButton", format("FreeUIStanceButton%d", i), self, "StanceButtonTemplate")
                                self.buttons[i]:SetID(i)
                        end
                        local button = self.buttons[i]
                        button:ClearAllPoints()
                        button:SetParent(self)
                        button:SetSize(26, 26)
                        button:SetFrameStrata("LOW")
                        if i == 1 then
                                button:SetPoint("BOTTOMLEFT", shiftbar, 0, 0)
                        else
                                local previous = _G["FreeUIStanceButton"..i-1]
                                button:SetPoint("LEFT", previous, "RIGHT", 3, 0)
                        end
                        local _, name = GetShapeshiftFormInfo(i)
                        if name then
                                button:Show()
                        else
                                button:Hide()
                        end
                end
                RegisterStateDriver(self, "visibility", "[vehicleui] hide; show")
        elseif event == "UPDATE_SHAPESHIFT_FORMS" then
                if InCombatLockdown() then return end
                for i = 1, NUM_STANCE_SLOTS do
                        local button = self.buttons[i]
                        local _, name = GetShapeshiftFormInfo(i)
                        if name then
                                button:Show()
                        else
                                button:Hide()
                        end
                end
        else
                updateShift()
        end
end)


zork 07-07-12 10:07 AM

Thanks. Actually I found a better solution for myself. I'm just doing
Lua Code:
  1. --fix for button1 placement with only one form
  2.   StanceBarFrame:ClearAllPoints()
  3.   StanceBarFrame:SetPoint("BOTTOMLEFT",frame,cfg.padding-12,cfg.padding-3)
  4.   StanceBarFrame.ignoreFramePositionManager = true

The StanceBarFrame will get moved via the position manager. But we can disable that behaviour. Now we only need to adjust the offset for button1. (Offset is found in FrameXML/stancebar.lua)

Haleth 07-07-12 10:12 AM

Are you sure that'll work? StanceButton1 is moved in StanceBar_Update. UIParent_ManageFramePositions is called there without any parameters so ignoreFramePositionManager might not work.

zork 07-07-12 10:30 AM

I tested it before posting. It does.

zork 07-07-12 11:53 AM

rActionBarStyler, rActionButtonStyler, rBuffFrameStyler and rChat are done. Links are added to the first post.

Coldkil 07-22-12 03:15 AM

I have an issue with your nameplates addon.

Apart the editing which i need to make the style consistent with my UI, i have everytime on screen 1 or in some rare cases 2 nameplates which don't get styled at all.

It seems like they are ignored by the code. If you toggle them off then back on, anothe random one will be the unstyled nameplate. Same happens if i turn the camera around - everytime there is 1 and only 1 nameplate not being styled.

EDIT: adding a screen so you can see what i'm doing (don't mind the style being ugly, it's still WIP)

zork 07-22-12 06:46 AM

I think for whatever reason IsNamePlateFrame() fails.
My best bet is: Check the result of o:GetTexture().

Either that function is incorrectly returning nil for a nameplate frame. (GetTexture() is acting wierd atm...green texture bug for returning nil etc.)
Other possibility is that texture path is different from: "Interface\\Tooltips\\Nameplate-Border"

Coldkil 07-22-12 07:32 AM

EDIT: my reading comprehension is reaching new low levels-.-

So it's probably a wow-side bug?

Haleth 07-22-12 08:46 AM

zork, since a few patches ago (on live as well) you no longer need to check the frame regions to know whether or not a frame is a name plate. Name plates have actual names now. It's easier (and probably faster) to do this instead:

Code:

local IsNamePlateFrame = function(f)
        local name = f:GetName()
        if name and name:find("NamePlate") then
                return true
        end
        f.styled = true
        return false
end


zork 07-22-12 09:14 AM

Thanks. That is good to know. Gonna test it.

Btw beta is currently pretty unstable. As soon as you use slash command functions the client will crash.

Talyrius 07-22-12 10:28 AM

Quote:

Originally Posted by zork (Post 258582)
... As soon as you use slash command functions the client will crash.

Have you tried disabling the taintLog?

zork 07-22-12 01:00 PM

No. Is the taintlog gone? Because it is pretty important to track down taint errors.
Crash is gone after disabling the taintlog. So thanks for that.

@Haleth
Added the nameplate stuff. Works flawlessly.

Coldkil 07-22-12 01:12 PM

i use multiple slash commands in my UI and they work fine - it seems instead that per character variables aren't saved bewtween sessions sometimes.

Quote:

Originally Posted by zork (Post 258595)
No. Is the taintlog gone? Because it is pretty important to track down taint errors.
Crash is gone after disabling the taintlog. So thanks for that.

@Haleth
Added the nameplate stuff. Works flawlessly.

Does that solve the "only one nameplate not styled" issue? That would be really cool.

zork 07-22-12 02:09 PM

That has nothing to do with that issue. Check the latest DIFF: http://code.google.com/p/rothui/sour...ates2/core.lua
I have no issues with the nameplates using that code.

Coldkil 07-22-12 03:29 PM

Quote:

Originally Posted by zork (Post 258599)
That has nothing to do with that issue. Check the latest DIFF: http://code.google.com/p/rothui/sour...ates2/core.lua
I have no issues with the nameplates using that code.

Ok, going to try tomorrow. I'll write here if something goes wild.

Coldkil 07-24-12 12:17 PM

All working ;) zork, i'm going to send you a pm about your addon, i just want to know the correct way to include them in my ui without going against any right/permission :)

zork 08-06-12 01:52 AM

Finished rMinimap for WoW MoP Beta
http://www.wowinterface.com/download...apMoPBeta.html

That leaves rThreat and rFilter3 and oUF_Diablo on the table.

zork 08-06-12 03:21 PM

2^24 * 15 * 93

That is the number of possible outcomes of DiscoKugel. :)

Not including alpha...

http://www.wowinterface.com/download...elMoPBeta.html


zork 08-25-12 01:47 PM

Time is pretty short to work on addons atm.

Still working on Pulsar...but I will probably have to delay it and fix oUF_Diablo before MoP comes out.

rFilter3 got updated:
http://www.wowinterface.com/download...r3MoPBeta.html


All times are GMT -6. The time now is 07:47 AM.

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