Coldfury
10-28-2006, 01:12 AM
player = {
type = "Button",
size = { 250, 75 },
FrameStrata = "LOW",
ClampedToScreen = true,
Backdrop = "Nurfed_Unit_backdrop",
BackdropColor = { 0, 0, 0, 1 },
BackdropBorderColor = { (255/255), (255/255), (255/255), 1 },
Movable = true,
Mouse = true,
children = {
hp = {
template = "Nurfed_Unit_hp",
size = { 190, 25 },
Anchor = { "BOTTOMRIGHT", "$parent", "BOTTOMLEFT", -5, 12 },
},
first of all, this is a part of the player frame section. important things are:
"player = {" this is what we are working on. the player frame in this case.
"size = { 250, 75 }," this mean that the main frame of the player frame will be 250 pixel width, 75 pixel height.
"children = {" is what contain all the elements in the actual main frame of the player frame.
"hp = {" is the element we are working on. using the template "Nurfed_Unit_hp"(its in the template you choose which text to be displayed in the hp bar, what font, what size of font, etc) that is defined at the top of the file. The hp bar will have a size of 190 width and 25 height. And that hp bar is anchored to the $parent frame(the player frame, in this case).
Anchor = { "BOTTOMRIGHT", "$parent", "BOTTOMLEFT", -5, 12 }, that mean that the "BOTTOMRIGHT" of the hp bar, will be anchored to the "BOTTOMLEFT" of the $parent frame(player frame for instance). The 2 numbers are the offsets. This mean that the hp bar will have its bottomright corner stick to the bottomleft corner of the player frame, but moved 5 pixel left and 12 pixel up. if the numbers would have been 16, -20, then the hp bar would have been moved 16 pixel right, and 20 pixel down. First value is left/right, Second value is up/down.
youll see something like this for every elements(hp, mp, name, level, etc) in every frame section(player, target, party, etc).
hope it helps a bit.
type = "Button",
size = { 250, 75 },
FrameStrata = "LOW",
ClampedToScreen = true,
Backdrop = "Nurfed_Unit_backdrop",
BackdropColor = { 0, 0, 0, 1 },
BackdropBorderColor = { (255/255), (255/255), (255/255), 1 },
Movable = true,
Mouse = true,
children = {
hp = {
template = "Nurfed_Unit_hp",
size = { 190, 25 },
Anchor = { "BOTTOMRIGHT", "$parent", "BOTTOMLEFT", -5, 12 },
},
first of all, this is a part of the player frame section. important things are:
"player = {" this is what we are working on. the player frame in this case.
"size = { 250, 75 }," this mean that the main frame of the player frame will be 250 pixel width, 75 pixel height.
"children = {" is what contain all the elements in the actual main frame of the player frame.
"hp = {" is the element we are working on. using the template "Nurfed_Unit_hp"(its in the template you choose which text to be displayed in the hp bar, what font, what size of font, etc) that is defined at the top of the file. The hp bar will have a size of 190 width and 25 height. And that hp bar is anchored to the $parent frame(the player frame, in this case).
Anchor = { "BOTTOMRIGHT", "$parent", "BOTTOMLEFT", -5, 12 }, that mean that the "BOTTOMRIGHT" of the hp bar, will be anchored to the "BOTTOMLEFT" of the $parent frame(player frame for instance). The 2 numbers are the offsets. This mean that the hp bar will have its bottomright corner stick to the bottomleft corner of the player frame, but moved 5 pixel left and 12 pixel up. if the numbers would have been 16, -20, then the hp bar would have been moved 16 pixel right, and 20 pixel down. First value is left/right, Second value is up/down.
youll see something like this for every elements(hp, mp, name, level, etc) in every frame section(player, target, party, etc).
hope it helps a bit.