Page 1 of 1

hudprint position and RGB

Posted: Wed Dec 31, 2014 3:45 am
by TheStoryteller01
I've worked with several editors and usually it's possible to give hud texts x/y coordinates and RGB values .

But whatever I try to script, it doesn't work - is there even a way to customise hudprint?

Re: hudprint position and RGB

Posted: Wed Dec 31, 2014 3:57 am
by minmay
Use the PartyComponent.onDrawGui method for this. You can see fields of the "context" object here and the asset definition reference for Grimrock 1 explains the methods that aren't new to Grimrock 2. The ones that are should be self-explanatory from the prototypes, except for one very useful piece of information: drawParagraph returns the height of the paragraph that was just drawn.
I doubt you can change anything about an hudPrint other than the string that gets printed. It's there so that you can print quick messages that match up with "Secret Found", "Discovered new spell...", "Steve gained a level!", and so on, not for making your own HUD.