increase size of the text

Discussions about Coding and Scripting
User avatar
Letylove49
Masterful
Posts: 537
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: AK admin
Location: suisse

increase size of the text

Post by Letylove49 »

i would like to increase the size for the text

( Monsterleft , Hunter , Death , Rank and spread on the left a

text on the left.png

nd the player liste on the right. How i can do that ? i didn^t find the value on the Mh2Hud.uc file.
player liste.png
somone could help me for that please ?
You do not have the required permissions to view the files attached to this post.
Image
Image
Letylove49 aka Alicia
User avatar
Barbie
Godlike
Posts: 3347
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: increase size of the text

Post by Barbie »

Look for something like this:

Code: Select all

Canvas.Font = MyFonts.GetSmallFont( Canvas.ClipX );
and replace it with one equivalent function of class'FontInfo':

Code: Select all

function font GetHugeFont(float Width)
function font GetBigFont(float Width)
function font GetMediumFont(float Width)
function font GetSmallFont(float Width)
function font GetSmallestFont(float Width)
function font GetAReallySmallFont(float Width)
function font GetACompletelyUnreadableFont(float Width)
(last is nice :lol: )
"If Origin not in center it be not in center." --Buggie
User avatar
Letylove49
Masterful
Posts: 537
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: AK admin
Location: suisse

Re: increase size of the text

Post by Letylove49 »

ok thanks for the text in the left i have fund the solution thanks,

for the text at the right that doesnt change the size of the title but the size of the player liste.

here my fonction for that :

Code: Select all

 simulated function DrawPlayerLists (Canvas C)
{
    local float XL, YL, YOffSetP, YOffSetS;
	local PlayerReplicationInfo PRI;
	local int PlayerCount, i;
    local string playerString;

    if (PlayerOwner.PlayerReplicationInfo == none || C == none) return;

        C.Font=C.SmallFont;
	//C.Font=C.MedFont;
	C.DrawColor=BlueColor;

	C.StrLen("[Player(LOCATION)] ", XL, YL);
	C.SetPos(C.ClipX - XL, C.ClipY / 4);
	C.DrawText("[Player(LOCATION)]",False);

	C.StrLen("[Spectators] ",XL,YL);
	C.SetPos(C.ClipX - XL,C.ClipY / 1.5);
	C.DrawText("[Spectators] ",False);

	// Wipe everything.
	for ( i=0; i<ArrayCount(Ordered); i++ )
		Ordered[i] = None;
	for ( i=0; i<32; i++ )
	{
		if (PlayerPawn(Owner).GameReplicationInfo.PRIArray[i] != None)
		{
			PRI = PlayerPawn(Owner).GameReplicationInfo.PRIArray[i];
			if ( !PRI.bWaitingPlayer )
			{
				Ordered[PlayerCount] = PRI;
				PlayerCount++;
				if ( PlayerCount == ArrayCount(Ordered) )
					break;
			}
		}
	}

with this : //C.Font=C.MedFont; i got this :
med fond size result.png
is would like to increse the title and the player list.
You do not have the required permissions to view the files attached to this post.
Image
Image
Letylove49 aka Alicia