[PATCH] - Team counter HUD item

2 replies [Last post]
MirceaKitsune
MirceaKitsune's picture
User offline. Last seen 11 years 43 weeks ago. Offline
Joined: 2010-05-06
Posts: 15

My first patch for hedgewars Smile It adds a small feature for players who wish to keep track of everything. It allows people to see how many hedgehogs they have left over how many they entered the game with.

There's now a 4th field on the HUD (between the flag and the health bar) which shows "Your-Current-Hedgehogs / The-Hedgehogs-You-Entered-With", as seen in the screenshot: http://img707.imageshack.us/img707/3879/teamcounterhud.jpg

IMPORTANT: The patch is not completely finished. There's one single thing I couldn't figure out. The hedges you enter with are shown correctly, but your current number of hedgehogs is displayed for the current team in all fields. That's because I need to use TeamSize(CurrentTeam) over a simple TeamSize. So someone needs to fix that first... otherwise everything appears ok (not sure if all items are perfectly centered, I tried to make sure of that too).

Patch link 1: http://www.mediafire.com/?tz5jkmxd0ny
Patch link 2: http://upload.ps/aq35yudm42sd/Team_counter_HUD_V0.9.diff.htm

MirceaKitsune
MirceaKitsune's picture
User offline. Last seen 11 years 43 weeks ago. Offline
Joined: 2010-05-06
Posts: 15

Ok, I managed to fix the counter issue. I needed to use TeamsArray[t] instead of CurrentTeam, so now the remaining hedgehogs are shown correctly for each team. Also fixed an alignment issue and made sure everything is perfectly centered.

New patch link 1: http://www.mediafire.com/?mdzyimlnymi
New patch link 2: http://upload.ps/0oi02tqpgn7m/Team_counter_HUD_V1.0.diff.htm

There's one tiny little problem remaining. It seems that the numbers you have in the counter can change it's width (eg. If it's 8/8 that makes it 2 pixels larger than 4/4). The counter appears to automatically adjust its size based on what's in it, so I'm once again stuck on how to give it a fixed width. This is what happens:

Thomas
Thomas's picture
User offline. Last seen 11 years 11 weeks ago. Offline
Joined: 2009-02-06
Posts: 233

Maybe you can help cause i wrote the suggestion to the devs but they didnt implement it:
just that the chat is in the Teamcolor that you know the owner of the team that chatted, if you know what i mean, left of chatmessange is only the username and i dont know to what team the chat belongs...

please add your xfire accountname here:
http://www.hedgewars.org/node/1977

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]