View Single Post
04-17-11, 06:10 AM   #27
Xinhuan
A Chromatic Dragonspawn
 
Xinhuan's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 174
Originally Posted by Aprikot View Post
Code:
print(MinimapZoomOut:GetRegions())
returns
Code:
table: 11877CE8 table:1D55E7B8 table: 1BC89C08 table: 1BC89C30
How does one correlate these hex values to names?
You can't. All you are doing is printing out the memory address of tables (where each Region returned is a Lua table) and that memory address will be different every time you run WoW. Regions are basically Fontstrings and Textures.

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.)
__________________
Author of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, GatherMate2, Routes and Cartographer_Routes

Last edited by Xinhuan : 04-17-11 at 06:12 AM.
  Reply With Quote