in the default layout.lua there's a template for every hp/mp statusbar.
Nurfed_Unit_hp, Nurfed_Unit_mp
Nurfed_Unit_hp = {
type = "StatusBar",
FrameStrata = "LOW",
Orientation = "HORIZONTAL",
StatusBarTexture = NRF_IMG.."statusbar6.tga",
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, "NONE" },
JustifyH = "LEFT",
TextColor = { 1, 1, 1 },
ShadowColor = { 0, 0, 0, 0},
ShadowOffset = { -1, -1 },
Anchor = "all",
vars = { format = "$cur" },
},
},
},
Nurfed_Unit_mp = {
type = "StatusBar",
FrameStrata = "LOW",
Orientation = "HORIZONTAL",
StatusBarTexture = NRF_IMG.."statusbar6.tga",
children = {
bg = {
type = "Texture",
layer = "BACKGROUND",
Texture = NRF_IMG.."statusbar6.tga",
VertexColor = { 0, 1, 1, 0.25 },
Anchor = "all" },
text = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 10, "NONE" },
JustifyH = "LEFT",
TextColor = { 1, 1, 1 },
ShadowColor = { 0, 0, 0, 0 },
ShadowOffset = { -1, -1 },
Anchor = "all",
vars = { format = "$cur" },
},
},
},
to get an exclusive statusbarconfiguration for a frame you have to create the statusbars locally.
the default looks like this
hp = {
template = "Nurfed_Unit_hp",
properties = {
size = { 147, 12 },
Anchor = { "BOTTOMRIGHT", "$parent", "BOTTOMRIGHT", -5, 14 },
},
},
mp = {
template = "Nurfed_Unit_mp",
properties = {
size = { 147, 8 },
Anchor = { "BOTTOMRIGHT", "$parent", "BOTTOMRIGHT", -5, 5 },
},
},
hp calls the Nurfed_Unit_hp template and mp calls the Nurfed_Unit_mp template to create the statusbar.
to create the statusbar locally replace the red marked lines with the corresponding code from the default two templates and add two lines for size and anchoring after "StatusBarTexture = NRF_IMG.."statusbar6.tga"," in your newly pasted code.
this would be the way if you want many different statusbars (eg every frame has a differently labeled bar)
if you only want two different types of bars (eg a default one and a blank one) in your whole layout.lua then it's easier to create two new templates.
copy&paste the default hp/mp templates and rename them
Nurfed_Unit_hp_new = {
type = "StatusBar",
FrameStrata = "LOW",
Orientation = "HORIZONTAL",
StatusBarTexture = NRF_IMG.."statusbar6.tga",
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, "NONE" },
JustifyH = "LEFT",
TextColor = { 1, 1, 1 },
ShadowColor = { 0, 0, 0, 0},
ShadowOffset = { -1, -1 },
Anchor = "all",
vars = { format = "$cur" },
},
},
},
Nurfed_Unit_mp_new = {
type = "StatusBar",
FrameStrata = "LOW",
Orientation = "HORIZONTAL",
StatusBarTexture = NRF_IMG.."statusbar6.tga",
children = {
bg = {
type = "Texture",
layer = "BACKGROUND",
Texture = NRF_IMG.."statusbar6.tga",
VertexColor = { 0, 1, 1, 0.25 },
Anchor = "all" },
text = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 10, "NONE" },
JustifyH = "LEFT",
TextColor = { 1, 1, 1 },
ShadowColor = { 0, 0, 0, 0 },
ShadowOffset = { -1, -1 },
Anchor = "all",
vars = { format = "$cur" },
},
},
},
you can edit those templates to fit your needs eg to remove the text delete the red marked lines.
to use one of your new templates replace the red part in those lines
template = "Nurfed_Unit_hp",
with your templates's name.
hopefully it's not to hard to understand :D
Powered by vBulletin® Version 4.1.9 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.