PDA

View Full Version : how to add the exp bar to a new layout



Columbia
06-30-2006, 09:53 AM
how would i go about adding the exp/faction bar to a custom layout?
thanks

Shield
06-30-2006, 05:40 PM
Open your layout.lua

Add the following under Nurfed_Unit_mp


Nurfed_Unit_xp = {
type = "StatusBar",
strata = "LOW",
Orientation = "HORIZONTAL",
StatusBarTexture = NRF_IMG.."statusbar6.tga",
children = {
bg = {
type = "Texture",
layer = "BACKGROUND",
Texture = NRF_IMG.."statusbar6.tga",
VertexColor = { 0, 0, 1, 0.25 },
Anchor = "all" },
text = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 8, "NONE" },
JustifyH = "LEFT",
TextColor = { 1, 1, 1 },
ShadowColor = { 0, 0, 0, 0.75 },
ShadowOffset = { -1, -1 },
Anchor = "all",
vars = { format = "$cur/$max$rest" },
},
text2 = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 8, "NONE" },
JustifyH = "RIGHT",
TextColor = { 1, 1, 1 },
ShadowColor = { 0, 0, 0, 0.75 },
ShadowOffset = { -1, -1 },
Anchor = "all",
vars = { format = "$perc" },
}
},
},


Then find

--Frame Design
Nurfed_UnitsLayout.Layout = {
player = {
type = "Button",
size = { 180, 52 },
FrameStrata = "LOW",
ClampedToScreen = true,
events = {
"PLAYER_ENTERING_WORLD",
"PLAYER_ENTER_COMBAT",
"PLAYER_LEAVE_COMBAT",
"PLAYER_REGEN_DISABLED",
"PLAYER_REGEN_ENABLED",
"PLAYER_UPDATE_RESTING",
"PARTY_MEMBERS_CHANGED",
"RAID_ROSTER_UPDATE",
"PARTY_LEADER_CHANGED",
"PARTY_LOOT_METHOD_CHANGED",
"UNIT_LEVEL",
"UNIT_HEALTH",
"UNIT_MANA",
"UNIT_ENERGY",
"UNIT_RAGE",
"UNIT_MAXHEALTH",
"UNIT_MAXMANA",
"UNIT_MAXENERGY",
"UNIT_MAXRAGE",
"UNIT_DISPLAYPOWER",
"UNIT_PVP_UPDATE",
"UNIT_NAME_UPDATE",
"UNIT_COMBAT",
},

And add "PLAYER_XP_UPDATE", to the bottom.
Then add the following after the mp = {...}


xp = {
template = "Nurfed_Unit_xp",
properties = {
size = { 170, 8 },
Anchor = { "BOTTOMRIGHT", "$parent", "BOTTOMRIGHT", -5, 5 },
},
},


You may have to change the size of it depending if you have the unit model or not. (i.e. change 170 to 130)

Columbia
07-01-2006, 01:44 PM
THANK YOU SO MUCH

a67rhf7823jn8747==