User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: sgHUD: RU Color

  1. #1
    Rampage Crsk's Avatar
    Join Date
    Nov 2011
    Location
    I'm out
    Posts
    323
    Country:

    sgHUD: RU Color

    how about changing the Siege HUD

    image 1: actual


    image 2: changing text color


    image 3: white + translucent background


    image 4: translucent background + RU bar


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

    UPDATED after more than a year lol

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

    image 5: yellow text + ru bar + new core icons + "BASECORE:" removed


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

    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)
    }
    Last edited by Crsk; 02-19-2014 at 06:21 AM. Reason: updated
    w5ykj

  2. #2
    Unstoppable audiosonic's Avatar
    Join Date
    Jan 2011
    Posts
    734
    Country:
    I got 99 problems, but keeping track of my RU ain't one of them.

  3. #3
    Rampage Crsk's Avatar
    Join Date
    Nov 2011
    Location
    I'm out
    Posts
    323
    Country:
    this is not a big problem, maybe isn't one but would be good improve the HUD a little
    w5ykj

  4. #4
    Moderator .seVered.]['s Avatar
    Join Date
    Jun 2011
    Location
    Near a River and Under a Bridge
    Posts
    2,125
    Country:
    Quote Originally Posted by Crsk View Post
    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.

  5. #5
    The Best There Ever Will Be! |uK|B|aZe//.'s Avatar
    Join Date
    Jan 2011
    Location
    London, United Kingdom
    Posts
    6,860
    just dont gay it up please.

  6. #6
    Whicked Sick ~~D4RR3N~~'s Avatar
    Join Date
    Jul 2012
    Location
    Venezuela
    Posts
    1,614
    Country:
    Nice.

  7. #7
    Moderator .seVered.]['s Avatar
    Join Date
    Jun 2011
    Location
    Near a River and Under a Bridge
    Posts
    2,125
    Country:
    Quote Originally Posted by |uK|B|aZe//. View Post
    just dont gay it up please.
    NO PINK! However, she does have nice ABS....

  8. #8
    Rampage Crsk's Avatar
    Join Date
    Nov 2011
    Location
    I'm out
    Posts
    323
    Country:
    Better now?

    w5ykj

  9. #9
    Administrator |uK|chiseller's Avatar
    Join Date
    Apr 2011
    Posts
    1,968
    Country:
    I prefer image 3 with slightly higher transparency.

  10. #10
    Rampage Crsk's Avatar
    Join Date
    Nov 2011
    Location
    I'm out
    Posts
    323
    Country:
    with a background the HUD size no need to be so bigger

    Last edited by Crsk; 11-25-2012 at 05:23 PM.
    w5ykj

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Code review: sgHUD
    By Higor in forum Code Reviews
    Replies: 6
    Last Post: 06-01-2012, 02:45 PM
  2. Code review: sgHUD
    By Higor in forum #siegepug Discussion
    Replies: 6
    Last Post: 06-01-2012, 02:45 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •