WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   UI Screenshots, Feedback and Design Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=144)
-   -   BasicUI (https://www.wowinterface.com/forums/showthread.php?t=49239)

cokedrivers 04-28-14 01:58 PM

BasicUI
 
3 Attachment(s)
So I've been having a lot of issue with [ADDON_ACTION_BLOCKED] errors, I think its mostly do to my Datapanel and were its placed (below the actionbars), which in turns makes me need to lift them up and I believe this is what is messing with stuff.

So I'm trying something new....

Below are screen shots of the new location for the datapanel/datatexts tell me what you think if you like it or not... Ill post a before and after screenshot for those that have not seen it yet.


Coke

Phanx 04-28-14 02:32 PM

Quote:

Originally Posted by cokedrivers (Post 292376)
So I've been having a lot of issue with [ADDON_ACTION_BLOCKED] errors, I think its mostly do to my Datapanel and were its placed (below the actionbars), which in turns makes me need to lift them up and I believe this is what is messing with stuff.

You may want to look at LibJostle to see how it handles doing this without breaking things.

cokedrivers 04-28-14 08:42 PM

Quote:

Originally Posted by Phanx (Post 292381)
You may want to look at LibJostle to see how it handles doing this without breaking things.

Ok you are a life saver seriously. No moving anything now all I needed to do was add the LibJostle and then change my code to:
Code:

function Datatext:SetDataPanel()

        if db.location ~= "top" then
                Datapanel:SetPoint("BOTTOM", UIParent, 0, 0)
                Datapanel:SetWidth(1200)
                if jostle then
                        jostle:RegisterBottom(Datapanel)
                end               
        else               
                Datapanel:SetPoint("TOP", UIParent, 0, 0)
                Datapanel:SetWidth(SCREEN_WIDTH)
                if jostle then
                        jostle:RegisterTop(Datapanel)
                end
        end
end

EDIT:
And BAM!!!!!!!!!!! everything moves without any problems. Top or Bottom.

Thanks again for saving my arse.
/EDIT

EDIT#2:
Not sure why, im not getting any errors from bug sack but my target frame keep wondering over above my Playerframe (see screenshot) it only seems to happen after I get in combat (as something attacks me).

LibJostle-3.0 that I'm using.
Datatext.lua this is the current datatext file im using.

The only think I change was added the LibJostle to my addon and the little code.

If I disable the datatex in the options it does not move my target frame.

Coke

Edit#3
Its accually the Lib it self cause even without my datapanel the target frame moves over the player frame.
Coke

Phanx 04-29-14 07:08 AM

Just right-click on the target frame, unlock it, and move it where you want it to go. I don't think Jostle was ever updated to handle the movable default unitframes, so just don't tell it to move stuff away from the top. Move the unit frames yourself (or write code to simulate moving them yourself) and move the minimap yourself since that's trivial.

cokedrivers 04-29-14 10:03 PM

Quote:

Originally Posted by Phanx (Post 292410)
Just right-click on the target frame, unlock it, and move it where you want it to go. I don't think Jostle was ever updated to handle the movable default unitframes, so just don't tell it to move stuff away from the top. Move the unit frames yourself (or write code to simulate moving them yourself) and move the minimap yourself since that's trivial.

I was able to fix my issue by marking out the frames I didn't want Jostle to move in the lib file itself.

Code:

local blizzardFrames = {
        --'PlayerFrame',
        --'TargetFrame',
        --'MinimapCluster',
        --'PartyMemberFrame1',
        --'TicketStatusFrame',
        --'WorldStateAlwaysUpFrame',
        'MainMenuBar',
        'MultiBarRight',
        --'CT_PlayerFrame_Drag',
        --'CT_TargetFrame_Drag',
        --'Gypsy_PlayerFrameCapsule',
        --'Gypsy_TargetFrameCapsule',
        --'ConsolidatedBuffs',
        --'BuffFrame',
        --'DEFAULT_CHAT_FRAME',
        --'ChatFrame2',
        --'GroupLootFrame1',
        --'TutorialFrameParent',
        --'FramerateLabel',
        --'DurabilityFrame',
        --'CastingBarFrame',
}

I tired to just shorten the code myself and only do the bottom functions (beings the option for my datatext to be on top now is gone) but all kinds of thinks started to happen.

Thanks again for the suggestion.
Coke

Phanx 04-30-14 01:12 PM

Quote:

Originally Posted by cokedrivers (Post 292429)
I was able to fix my issue by marking out the frames I didn't want Jostle to move in the lib file itself.

That's not a good solution, as if the user has any other addons installed that use the same lib, your modified version may get overwritten, or may overwrite the other version, and either way will result in one addon not getting the functionality it expects. If you don't want Jostle to move the frames at the top of the screen, just don't call the RegisterTop method to tell it to move frames at the top of the screen.

cokedrivers 04-30-14 02:37 PM

Quote:

Originally Posted by Phanx (Post 292433)
That's not a good solution, as if the user has any other addons installed that use the same lib, your modified version may get overwritten, or may overwrite the other version, and either way will result in one addon not getting the functionality it expects. If you don't want Jostle to move the frames at the top of the screen, just don't call the RegisterTop method to tell it to move frames at the top of the screen.

Well then I'm probably going to have to find another solution or see if some of the code I can figure out and add to my add-on. Because even when I disable my datatext module it still moves my target frame over my player frame. So in that aspect if some has this lib used for something else then it will still move the frame. I think it might have something to do with the scaling of the frame but as you know I m not a Luna programmer just a guesser.

Thanks for the heads up.

Coke

Phanx 04-30-14 03:35 PM

I just looked through the Jostle code, and the solution to the "problem" is exactly what I already theorized it would be -- Jostle does not attempt to move frames that are flagged as user-placed, so if you move the player and target frames yourself, Jostle will not touch them.

To do it manually, right-click the frame, select the unlock option in the menu, drag the frame to the desired location, right-click again, and select the lock option in the menu.

To do it programmatically, call the same methods that are ultimately called when you perform the above actions:

Code:

TargetFrame:SetUserPlaced(true)
TargetFrame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 250, -4)

For compatibility reasons I'd suggest sticking with the TOPLEFT point, and just adjusting the x/y offsets. The offsets listed above are the default ones. If you don't already know the offsets you want, use the manual method to put the frame where you want it, then use this command to see where it is:

Code:

/dump tostringall(TargetFrame:GetPoint(1))
If you don't actually want to move the frame anywhere, just calling SetUserPlaced on it is probably enough.


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

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