PDA

View Full Version : sgHUD: RU Color



Crsk
11-24-2012, 07:18 PM
how about changing the Siege HUD

image 1: actual
http://www.mediafire.com/conv/d7d1f722d9d65717c1e25a46fcb3baa0da10ce24d1547a6671 f5ca4b199ccb5c6g.jpg

image 2: changing text color
http://www.mediafire.com/conv/df534d4401a708d38df7d0a65696bdd17b242f511fc6ea7787 8bb4bdc936c6cf6g.jpg

image 3: white + translucent background
http://www.mediafire.com/conv/4b63a17f7f186710fdb21f7cb54a1a8ea0f374021c1fae2fa1 dd9675c5ba87fc6g.jpg

image 4: translucent background + RU bar
http://www.mediafire.com/conv/f5b0aec6380bf4581829781984763a10a653e958c1bbb16f54 31b3c28d8f5ed76g.jpg

------------

UPDATED after more than a year lol

------------

image 5: yellow text + ru bar + new core icons + "BASECORE:" removed
http://www.mediafire.com/convkey/1d44/6t0bv30cw9dy1d66g.jpg

no photoshop this time, it's already done, here's the code.



class sgHUD extends ChallengeTeamHUD config;

// I imported it here just to try, should go in 'sgUMedia.Icons'
#exec TEXTURE IMPORT NAME=IconCore FILE=Textures\IconCore.bmp GROUP=Icons

// used by the RU bar
var() color YellowColor, DarkColor;

// Used by the team core icons
var() color TeamColors[4];

// the code under this function is new, it can be added as an extension
simulated function DrawGameSynopsis(canvas Canvas)
{
local float XR,YR;

// saving text length of player's RU to then use to adjust the RU bar length
Canvas.TextSize(int(PRI.RU)@"/"@int(sgPRI(PawnOwner.PlayerReplicationInfo).MaxRU) , XR, YR);

// setting the possition in where to draw (XL and YOffset are old DrawGameSynopsis() variables)
Canvas.SetPos(XL+7, YOffset+25);

// setting a dark color to give some contrast to the next drawn texture
Canvas.DrawColor = DarkColor;

// drawing a dark bar
Canvas.DrawTile(Texture'BotPack.FacePanel2', XR, 2.0, 0, 0, 128.0, 64.0);

// setting same position as before so the yellow bar will be above the dark bar, using dark bar as container
Canvas.SetPos(XL+7, YOffset+25);

// establishing a color before draw to improve the yellow bar appearance
Canvas.DrawColor = YellowColor;

// the function in where we are is called from PostRender function and this is called from Tick function so here is a good place to make RU bar lenght proportional to the drawn RU ammount
Canvas.DrawTile(Texture'BotPack.HudElements1', FMin(XR*int(PRI.RU)/int(sgPRI(PawnOwner.PlayerReplicationInfo).MaxRU), XR), 2.0, 64, 64, 128.0, 8.0);
}

// the code under this function has been modified, it can be entirely replaced
simulated function DrawTeam(Canvas Canvas, TeamInfo TI)
{
local int i;

if ( (TI != None) && (TI.Size > 0) )
{
// iterator to pick the correct color before draw the core icon and its health
for (i=0; i<=4; i++)
{
if (TI.TeamIndex == i)
{
Canvas.DrawColor = TeamColors[i];
Canvas.Font = MyFonts.GetMediumFont( Canvas.ClipX );
Canvas.SetPos(Canvas.ClipX - 72, Canvas.ClipY - (384 + 72 * i));
Canvas.DrawIcon(Texture'IconCore', 1.0);
Canvas.SetPos(Canvas.ClipX - 112, Canvas.ClipY - (368 + 72 * i));
Canvas.DrawText(int(TI.Score), false);
break;
}
}
}
}

defaultproperties
{
YellowColor=(R=255,G=162,B=0,A=0)
DarkColor=(R=24,G=24,B=24,A=0)
TeamColors(0)=(R=64,G=0,B=0,A=0)
TeamColors(1)=(R=0,G=0,B=64,A=0)
TeamColors(2)=(R=0,G=64,B=23,A=0)
TeamColors(3)=(R=142,G=109,B=0,A=0)
}

audiosonic
11-24-2012, 07:25 PM
I got 99 problems, but keeping track of my RU ain't one of them.

Crsk
11-24-2012, 07:29 PM
this is not a big problem, maybe isn't one but would be good improve the HUD a little

.seVered.][
11-25-2012, 12:58 AM
this is not a big problem, maybe isn't one but would be good improve the HUD a little

HUD seriously needs an update... speaking of stuck in the 70's .... it's like lacking major. Dude.

|uK|B|aZe//.
11-25-2012, 11:48 AM
just dont gay it up please.

~~D4RR3N~~
11-25-2012, 02:29 PM
Nice.

.seVered.][
11-25-2012, 03:12 PM
just dont gay it up please.

NO PINK! However, she does have nice ABS....

Crsk
11-25-2012, 04:22 PM
Better now?

http://www.mediafire.com/conv/80df1344f657cbb834bc5f113191c0f2639ca6bf0ef19af302 54a5b02b9384dd6g.jpg

|uK|chiseller
11-25-2012, 04:29 PM
I prefer image 3 with slightly higher transparency.

Crsk
11-25-2012, 04:45 PM
with a background the HUD size no need to be so bigger

http://www.mediafire.com/conv/f5b0aec6380bf4581829781984763a10a653e958c1bbb16f54 31b3c28d8f5ed76g.jpg

Disturbed//*.
11-25-2012, 08:40 PM
with a background the HUD size no need to be so bigger

http://www.mediafire.com/conv/f5b0aec6380bf4581829781984763a10a653e958c1bbb16f54 31b3c28d8f5ed76g.jpg
I like the "RU BAR" The gold'ish. Its like a bar that tells you if your RU is full.

Crsk
02-19-2014, 06:20 AM
image 5: yellow text + ru bar + new core icons + "BASECORE:" removed
http://www.mediafire.com/convkey/1d44/6t0bv30cw9dy1d66g.jpg

no photoshop this time, it's already done, here's the code.



class sgHUD extends ChallengeTeamHUD config;

// I imported it here just to try, should go in 'sgUMedia.Icons'
#exec TEXTURE IMPORT NAME=IconCore FILE=Textures\IconCore.bmp GROUP=Icons

// used by the RU bar
var() color YellowColor, DarkColor;

// Used by the team core icons
var() color TeamColors[4];

// the code under this function is new, it can be added as an extension
simulated function DrawGameSynopsis(canvas Canvas)
{
local float XR,YR;

// saving text length of player's RU to then use to adjust the RU bar length
Canvas.TextSize(int(PRI.RU)@"/"@int(sgPRI(PawnOwner.PlayerReplicationInfo).MaxRU) , XR, YR);

// setting the possition in where to draw (XL and YOffset are old DrawGameSynopsis() variables)
Canvas.SetPos(XL+7, YOffset+25);

// setting a dark color to give some contrast to the next drawn texture
Canvas.DrawColor = DarkColor;

// drawing a dark bar
Canvas.DrawTile(Texture'BotPack.FacePanel2', XR, 2.0, 0, 0, 128.0, 64.0);

// setting same position as before so the yellow bar will be above the dark bar, using dark bar as container
Canvas.SetPos(XL+7, YOffset+25);

// establishing a color before draw to improve the yellow bar appearance
Canvas.DrawColor = YellowColor;

// the function in where we are is called from PostRender function and this is called from Tick function so here is a good place to make RU bar lenght proportional to the drawn RU ammount
Canvas.DrawTile(Texture'BotPack.HudElements1', FMin(XR*int(PRI.RU)/int(sgPRI(PawnOwner.PlayerReplicationInfo).MaxRU), XR), 2.0, 64, 64, 128.0, 8.0);
}

// the code under this function has been modified, it can be entirely replaced
simulated function DrawTeam(Canvas Canvas, TeamInfo TI)
{
local int i;

if ( (TI != None) && (TI.Size > 0) )
{
// iterator to pick the correct color before draw the core icon and its health
for (i=0; i<=4; i++)
{
if (TI.TeamIndex == i)
{
Canvas.DrawColor = TeamColors[i];
Canvas.Font = MyFonts.GetMediumFont( Canvas.ClipX );
Canvas.SetPos(Canvas.ClipX - 72, Canvas.ClipY - (384 + 72 * i));
Canvas.DrawIcon(Texture'IconCore', 1.0);
Canvas.SetPos(Canvas.ClipX - 112, Canvas.ClipY - (368 + 72 * i));
Canvas.DrawText(int(TI.Score), false);
break;
}
}
}
}

defaultproperties
{
YellowColor=(R=255,G=162,B=0,A=0)
DarkColor=(R=24,G=24,B=24,A=0)
TeamColors(0)=(R=64,G=0,B=0,A=0)
TeamColors(1)=(R=0,G=0,B=64,A=0)
TeamColors(2)=(R=0,G=64,B=23,A=0)
TeamColors(3)=(R=142,G=109,B=0,A=0)
}

Higor
02-19-2014, 12:43 PM
That might be a bit theme altering... but I REALLY like this kind of hud (sort of Source and UT3 mix...)
Wouldn't be a bad idea to do a whole different HUD system and let the player choose it in the Constructor GUI.

PD: Modulated backgrounds with rounded edges look pretty and take 9 drawcalls from a very small texture (expensive on Software renderers tho).
PD2: And texts as seen below (modulated, bright shaded, antialiased) are easy to do, got some nice methods you'll may want to learn.
https://dl.dropboxusercontent.com/u/58384316/UT99/Shots/SevenTest.jpg

Crsk
02-20-2014, 07:43 AM
got some nice methods you'll may want to learn.

yes, i love learning :D

Higor
02-20-2014, 01:33 PM
I'll write up a guide in UT99.org one of these days, soon I hope.