evilgod
06-08-2006, 08:55 AM
in short i`m trying to make the name on the ToT frame to show over the health bar texture.
the code is this :
Nurfed_Unit_mini = {
type = "Button",
size = { 160, 18 },
FrameStrata = "LOW",
Backdrop = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
tileSize = 16,
edgeSize = 8,
insets = { left = 2, right = 2, top = 2, bottom = 2 }
},
children = {
hp = {
type = "StatusBar",
size = { 154, 12 },
FrameStrata = "LOW",
Orientation = "HORIZONTAL",
StatusBarTexture = NRF_IMG.."statusbar6.tga",
Anchor = { "BOTTOMLEFT", "$parent", "BOTTOMLEFT", 3, 3 },
children = {
bg = {
type = "Texture",
layer = "BACKGROUND",
Texture = NRF_IMG.."statusbar6.tga",
VertexColor = { 1, 0, 0, 0.25 },
Anchor = "all",
},
text = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 10, "OUTLINE" },
JustifyH = "RIGHT",
TextColor = { 1, 0.25, 0 },
Anchor = "all",
vars = { format = "$perc" },
},
},
},
name = {
type = "FontString",
size = { 75, 8 },
layer = "HIGHLIGHT",
Font = { NRF_FONT.."framd.ttf", 10, "OUTLINE" },
JustifyH = "LEFT",
ShadowColor = { 0, 0, 0, 0.75 },
ShadowOffset = { -1, -1 },
Anchor = { "TOPLEFT", "$parent", "TOPLEFT", 3, -2 },
vars = { format = "$nam" },
},
},
OnClick = function() Nurfed_Unit_OnClick(arg1) end,
Hide = true,
},
the problem is that it`s only showing behind the hp texture. i tried to move the "name" part inside with the "percent", but then "$nam" doesn`t register.
the red square in the pic is where i want the name to show up.
help.
the code is this :
Nurfed_Unit_mini = {
type = "Button",
size = { 160, 18 },
FrameStrata = "LOW",
Backdrop = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
tileSize = 16,
edgeSize = 8,
insets = { left = 2, right = 2, top = 2, bottom = 2 }
},
children = {
hp = {
type = "StatusBar",
size = { 154, 12 },
FrameStrata = "LOW",
Orientation = "HORIZONTAL",
StatusBarTexture = NRF_IMG.."statusbar6.tga",
Anchor = { "BOTTOMLEFT", "$parent", "BOTTOMLEFT", 3, 3 },
children = {
bg = {
type = "Texture",
layer = "BACKGROUND",
Texture = NRF_IMG.."statusbar6.tga",
VertexColor = { 1, 0, 0, 0.25 },
Anchor = "all",
},
text = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 10, "OUTLINE" },
JustifyH = "RIGHT",
TextColor = { 1, 0.25, 0 },
Anchor = "all",
vars = { format = "$perc" },
},
},
},
name = {
type = "FontString",
size = { 75, 8 },
layer = "HIGHLIGHT",
Font = { NRF_FONT.."framd.ttf", 10, "OUTLINE" },
JustifyH = "LEFT",
ShadowColor = { 0, 0, 0, 0.75 },
ShadowOffset = { -1, -1 },
Anchor = { "TOPLEFT", "$parent", "TOPLEFT", 3, -2 },
vars = { format = "$nam" },
},
},
OnClick = function() Nurfed_Unit_OnClick(arg1) end,
Hide = true,
},
the problem is that it`s only showing behind the hp texture. i tried to move the "name" part inside with the "percent", but then "$nam" doesn`t register.
the red square in the pic is where i want the name to show up.
help.