Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: StillInThe90s on Tue 07/10/2014 01:42:04

Title: custom, right aligned speech
Post by: StillInThe90s on Tue 07/10/2014 01:42:04
I'm looking for a way of aligning a standard (or custom) text/message window with a given right end* x-coordinate? (I.e. custom right side aligned speech with portraits)
Aligning from the left is handled automatically but right aligning is a mess. I have tried using "DisplayAt" and "DisplayAtY", combined with calculations based on "GetTextWidth" to make a function for this, but it always ends up with short strings far away from the portrait or long strings hiding behind it. At best.

If that made no sense: What I'm after is something like the "BasedOnCharacterPosition" -speech display method, but controlled from a custom "Say"-function.



* "Right end" = right side of the text window.