PDA

View Full Version : FrameStrata for feedback



Saroz
06-22-2006, 01:40 AM
Anyone know how to get the feedback frame/text to show above the HP/mana bars? I centered the feedback frame, but it keeps showing behind the bars, instead of above them.

I've set FrameStrata = "HIGH", but it did nothing.

Muriana
06-22-2006, 07:55 AM
I haven't been able to figure this out either, and I really want to do this. I also can't figure out how to change the font for the feedback to the default font. Help!

Saroz
06-22-2006, 08:28 AM
I haven't been able to figure this out either, and I really want to do this. I also can't figure out how to change the font for the feedback to the default font. Help!


well THAT is easy
feedback = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 20, "OUTLINE" },
JustifyH = "CENTER",
Anchor = { "CENTER", "$parent", "CENTER", 0, 0 },
},

Muriana
06-22-2006, 09:16 AM
Sorry, I should have been more clear. I mean the default game font, FRIZQT. Although that helps, that one is a lot clearer than the one that's in there now. Thanks!

Got it switched, thanks again.

Blur
06-22-2006, 10:23 AM
yeah, I'm trying to figure out how to get the feedback text to display over the 3d model.

I've currently got my UI set up like the attachment, note the feedback text BEHIND the model.

(and ignore the text color of the name, that will change)

Tivoli
06-22-2006, 10:41 AM
Set the level or strata for the other parts lower ;)

Saroz
06-22-2006, 10:44 AM
Set the level or strata for the other parts lower ;)
Shouldn't they inherit that from the parent? parent is "LOW".

Anyway, fixed it by giving Nurfed_Unit_hp and Nurfed_Unit_mp a FrameLevel of 1.



The feedback thing doesn't seem to work for the party members, or target, can you fix that?
I tried to register UNIT_COMBAT to the target frame, but it didnt work.

Blur
06-22-2006, 10:56 AM
Hmm, still can't seem to get feedback above the 3d img.

Lua:



Nurfed_Unit_hp = {
type = "StatusBar",
strata = "LOW",
Orientation = "HORIZONTAL",
StatusBarTexture = NRF_IMG.."statusbar6.tga",
FrameLevel="1",
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", 12, "OUTLINE" },
JustifyH = "CENTER",
TextColor = { 1, 1, 1 },
Anchor = "all",
vars = { format = "$cur / ($max)" },
},
},
},

Nurfed_Unit_mp = {
type = "StatusBar",
strata = "LOW",
FrameLevel="1",
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", 8, "OUTLINE" },
JustifyH = "CENTER",
TextColor = { 1, 1, 1 },
Anchor = "all",
vars = { format = "$cur / ($max)" },
},
},
},

Nurfed_Unit_model = {
type = "PlayerModel",
strata = "LOW",
FrameLevel="1",
events = {
"PLAYER_ENTERING_WORLD",
"DISPLAY_SIZE_CHANGED",
"UNIT_MODEL_CHANGED",
},
ModelScale = 1.8,
Camera = 1,
OnEvent = function() if (event == "DISPLAY_SIZE_CHANGED") then this:RefreshUnit() else this:SetUnit(this:GetParent().unit) end end,
OnUpdate = function() this:SetCamera(1) end,
},


and down further...



feedback = {
type = "FontString",
layer = "OVERLAY",
FrameStrata = "TOP",
FrameLevel = "10",
Font = { "Fonts\\skurri.ttf", 36, "OUTLINE" },
JustifyH = "CENTER",
Anchor = { "LEFT", "$parent", "LEFT", -20, 0 },
},


Also note i've never, ever worked in .lua before, so I'm just kind of hacking at the moment :)

Tivoli
06-22-2006, 11:09 AM
Shouldn't they inherit that from the parent? parent is "LOW".

Anyway, fixed it by giving Nurfed_Unit_hp and Nurfed_Unit_mp a FrameLevel of 1.



The feedback thing doesn't seem to work for the party members, or target, can you fix that?
I tried to register UNIT_COMBAT to the target frame, but it didnt work.
Yes the Strata is inherited, just a brainfart ^^, i meant to say Layer and Level.

Change your FrameLevel of your model to 1. You don't need "" around numbers, ""'s makes it a string.

Blur
06-22-2006, 11:16 AM
Ah, stupid me with the ""s. Can you tell I have no experience whatsoever with lua? Works great now, thanks!

now if I could only figure out how to make some random things show better in camera=1 mode... hehe

Muriana
06-22-2006, 11:45 AM
Awesome, that worked like a charm.

a67rhf7823jn8747==