PDA

View Full Version : Custom layout, please help



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.

Incanus
06-08-2006, 05:45 PM
yea i've been trying to get this working for since yesterday morning, can't figure it out. having the same problem getting the feedback part to show over the player hp bar

MrO
06-09-2006, 01:41 AM
----------------------------------------------------------------------------------------
-- Text Format Vars
-- (HP/MP text and status bars)
-- $miss = Missing hp/mp
-- $cur = current hp/mp
-- $max = Max hp/mp
-- $perc = Percent hp/mp
--
-- (Name/Level text)
-- $nam = Name
-- $lev = Level
-- $cla = Class
-- $key = Key Binding
----------------------------------------------------------------------------------------

Note the ( ). I am guessing that status bars can only have those $vars and the name/level text can only use those $vars.

evilgod
06-09-2006, 01:50 AM
hmm, i didn`t notice that. i`ll look in the lua files if i can register $nam and other stuff together with text format.

Loke
06-09-2006, 06:18 AM
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,
},


tryed that ?

Loke
06-13-2006, 01:12 PM
anyone got this to work proper ?


ahh figured it out, FrameStrata of Background put the normal text on top of the bar

FrameStrata = "LOW",
to
FrameStrata = "BACKGROUND",

might conflict with the actual background though, but i got that diabled, so not sure

evilgod
06-13-2006, 01:35 PM
nice, post screenshots with what you got and your layout.

Loke
06-13-2006, 02:30 PM
im not actually using it myself, though one of my mates are, heres a screen :

http://northrend.dk/upl/spelly.jpg

http://forums.nurfed.com/showthread.php?t=9312 for my setup

Incanus
06-13-2006, 07:14 PM
finally, i had no idea what the framestrata thing did so i didn't wanna mess with it lol.

Aesir123
06-14-2006, 03:16 AM
So thats what you wanted the screeny for loke =P.

Anyway yeah after changing the framestrata on Nurfed_Unit_hp and Nurfed_Unit_mp i was able to put the name above the hp textures. However this is only working on my frame and not my target or party frame. As far as i can tell all 3 use the same template, and all 3 name entries are the same (copy and paste ftw). But it still doesn't work.

http://img.photobucket.com/albums/v257/terra123/new1.jpg

edit: actually it appears not to work for targets target either

a67rhf7823jn8747==