PDA

View Full Version : Question about mergeWith for UI: Game vs. Player


jeremyosborne
11-29-2010, 05:40 PM
N00b question:

My first attempt at modding was to turn off the blinking icons in the game, and it worked.

To turn off the blinking Town Win icon, I placed the following in a _noBlinking.mnu file:


mergeWith Game
// Won game icon

Widget
{
position 496.0 20.0
size 28.0 27.0
texture Textures/Icons/wonGame.tga
showCondition ConfirmWin
//Jeremy: Turn off blinking by commenting out.
// blinkCondition ConfirmWin
highlightTextSource Text $$ConfirmWinText$$
canClick 1
// addCommand "confirmWin"
// addCommand "pushMenu WinGame"
addCommand "pushMenu ConfirmWin2"
}


Cool, so I started to mess with the player stat display found in UI/player.mnu. First task, turn off the gradiant to get a plain green display:


mergeWith Player
// Health bar
StatBar
{
//JEREMY: Turn off gradiant
// texture Textures/UI/gradiant_green.tga
position 14.0 26.5
size 100.0 10.0
color Green
stat Other Health MaxHealth
entityType PlayerServer
highlightText "$$HealthBarDesc$$\n"
blinkCondition LowHealth
blinkIntensity 0.5
draworder 1
canClick 1
addCommand selectPlayer
}


For this one, I can't seem to affect any sort of change in game. I've tried renaming the file, zipping up in different file names, etc. I've even tried to just overwrite the "name Player" menu but to no avail.

Question: Let's say I wanted to change the player health bar from green to black. How would I go about doing that through the .mnu file?

Shadow
11-29-2010, 07:03 PM
It doesn't look like you have a texture at all specified in your 2nd example, so it has nothing to draw.

Adding the line
texture Textures/white.tga
should do what you want.

jeremyosborne
11-29-2010, 08:26 PM
Thanks Shadow. That did it.

By the way, I love the IgnoreWidescreenCenter property. It gives my stat bars a bit of stretch, but being able to push things to the side of the screen is awesome.