Changing portrait position separate from text?

Started by Dave Gilbert, Tue 02/05/2017 17:41:38

Previous topic - Next topic

Dave Gilbert

Hi all. So I am using Sierra style portraits in my game. Here are some examples:





I am trying to readjust the portraits so the characters' faces are level with the text (that way the player's eyes are more drawn to their expressions, which are easy to miss). I tried changing the Speech.PortraitY parameter, but it moves the TEXT along with the portrait. Is there any way to move the portrait by itself? Or a way to move the TEXT by itself? Either will do!

Thanks in advance,

-Dave

CaesarCub

I know it's completely hackerish, and might not work for your project, but what I did to solve it for one game I did was to add transparent padding to the top border parts of the text window UI:



If there is a correct way to solve this, I'd love to know it.

Dave Gilbert

Not a bad idea! I'll try that, failing any other option.

abstauber

I use a custom GUI in connection with my own little extender function:
Code: ags

function Speak(this Character*, String say, int loop, TextSpeed speed,  int timeout, bool append, bool hidePortrait, bool bgspeech)


That way I don't have to worry much about any builtin AGS Speech. On a downside, dialog scripts do not look as nice as before
Code: ags

@1
  player.Speak("Just saying.");

Snarky

Yeah, if there isn't an immediately obvious API for controlling the text box offset (and I don't know of one), I would think either of these methods (building in transparent padding or writing your own dialog system) are the available workarounds.

Dave Gilbert

Righto. Workarounds it is!

@abstauber I actually use my own custom say function anyway, so I can do various things on the fly (like change portrait direction, change expressions, etc) so the dialog script stuff isn't an issue for me. The difficulty is getting the speech window border images to resize correctly depending on the size of the text string, which is something I haven't quite figured out yet.

Crimson Wizard

Quote from: Dave Gilbert on Wed 03/05/2017 13:23:50The difficulty is getting the speech window border images to resize correctly depending on the size of the text string, which is something I haven't quite figured out yet.

BTW, not certain if this is related to your case, but you might check my recent post on this, AGS has certain mistakes in GetTextWidth and GetTextHeight functions:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=54501.0

Dave Gilbert

Ah! That's good to know. Thanks for pointing it out, CW.

SMF spam blocked by CleanTalk