2 Attachment(s)
Quote:
What's more confusing to me, is that in running the below code, I expected *all* UI textures to be affected: Code:
local abc = function() Attachment 6002 Attachment 6003 My total inexperience with global tables aside for a sec :rolleyes:, it feels like there is a methodology to solving this that I'm totally missing. :) |
Another example (Clock button: \Blizzard_AddOns\Blizzard_TimeManager\Blizzard_TimeManager.xml):
Code:
<!-- Minimap button to access the TimeManagerButton --> |
Quote:
:D |
Quote:
I'm poking around dev tools for something...I don't presume I'm the first to run into this. I have a "global table" dump in xml format from the api highlighter I use, but not sure how comprehensive it is. In general, is it normal for some objects to exist outside of framexml & blizz addons, and are there tables other than _G I can/should iterate through? All for a few silly buttons that most folks hide() anyway. :p |
Code:
print(MinimapZoomOut:GetRegions()) Code:
table: 11877CE8 table:1D55E7B8 table: 1BC89C08 table: 1BC89C30 |
Oops, sorry. Yeah, I meant GetRegions. That's how you get the parts of the clock at least (see PocketPlot).
|
Quote:
All f:GetRegions() does is give you a list of children textures and fontstrings for frame f, and you can operate on them like any other texture or fontstring. If they have a name, then :GetName() would return a string, otherwise nil is returned. The regions are returned in the order of creation for the frame in question, so look at the XML and start counting, if you want to figure out which region is which texture you want to modify (such as, I want to modify the 2nd created texture of this frame, so use the 2nd return of :GetRegions() on it and call :SetVertexColor() on it.) |
Thanks Xinhuan & Seerah for the help (success fir the Zoom Out button texture):
Code:
local zotex = select(1, MinimapZoomOut:GetRegions()) |
Code:
local zotex = select(1, MinimapZoomOut:GetRegions()) |
Quote:
|
TotemFrame buttons
Everything I thought I learned in this thread is availing me little in trying to color the TotemFrame button "borders".
I've tried arbitrarily checking args 1-30 (via select()) for both GetRegions() & GetChildren() against each of the TotemFrame* frames shown in the below framestack screenshot (layers 7-10): I'm now trying to do it via CreateTexture(), and I think there is trouble with the way I'm interpreting TotemFrame.xml: lua Code:
xml Code:
|
You cannot overwrite an XML template by creating a Button in Lua using the same name. Instead, to replace the texture, you would use the absolute name of the texture and modify that:
Code:
local texture1 = TotemFrameTotem1IconTexture |
My goal is identification of the texture object(s) being used for the button borders.
TotemFrame.xml does specify hierarchy for TotemFrameTotem1IconTexture for example ($parentTotem1 $parentIcon $parentTexture -- colored below), whereas the border texture appears nameless, and resides in its own nameless frame. Code:
|
All times are GMT -6. The time now is 06:18 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI