help with HUD

Discussions about Coding and Scripting
Post Reply
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

help with HUD

Post by Rakiayn »

is it possible to change the size of a text on the HUD?
besides changing its fonttype
if so how can i do this?

its a hud mutator btw
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: help with HUD

Post by Shadow »

there's no other way than changing with the current font, except for rendering a texture that holds that text -> normal texture with that text or scripted texture with dynamic text
Image
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: help with HUD

Post by Rakiayn »

ok.
how can I get the script to know what the player has as a resolution. so i can base the hud on that?
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: help with HUD

Post by Shadow »

when you deal with hud/mutator coding you'll come across functions that have pointers (my c++ influence) or references, as it is called in unreal script, to the canvas object :

Like in PostRender(Canvas C), RenderOverlays(Canvas C) etc.

with reading c.*Function / c.*Variable you access functions and variables of the drawing canvas

So the canvas has the variables SizeX and SizeY which stand for the Width (SizeX) and Height (SizeY) of the current screen resolution.
When you have 1024x768 both variables return:

SizeX = 1024
SizeY = 768
Image
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: help with HUD

Post by Rakiayn »

thnx
Post Reply