speaking dialogs

Started by shaungaryevans, Mon 25/05/2009 16:11:54

Previous topic - Next topic

shaungaryevans

Hi,

When you create a speaking dialog and you talk to somebody. It comes up with a black box at the bottom of your screen with red text. Do anybody know how to change the style of that box or do you have to make your own GUI?

Khris

You can create a custom text window GUI and use that as dialog GUI (set the option "Use GUI for dialog options" in General settings to the GUI's ID number).

Alternatively, there's the possibility to render your own dialog GUI:
http://www.adventuregamestudio.co.uk/manual/CustomDialogOptions.htm
http://www.adventuregamestudio.co.uk/manual/DialogOptionsRenderingInfoFunctions.htm

Please, read through the manual at least once and try to find those answers by yourself. It's not that hard.

shaungaryevans

I have nearly done it, thank you. Just one more question. How do you put a red line around the dialog? the code is this?

// Clear the area organge
  info.Surface.Clear(64512);
   int i = 1,  ypos = 0;
  // Render all the options that are enabled
  while (i <= info.DialogToRender.OptionCount)
  {
    if (info.DialogToRender.GetOptionState(i) == eOptionOn)
    {
      if (info.ActiveOptionID == i) info.Surface.DrawingColor = 63488;
      else info.Surface.DrawingColor =1;
      info.Surface.DrawStringWrapped(5, ypos, info.Width - 10,
                         eFontNormal, eAlignLeft, info.DialogToRender.GetOptionText(i));
      ypos += GetTextHeight(info.DialogToRender.GetOptionText(i), eFontNormal, info.Width - 10);
    }
    i++;
  }
}

SMF spam blocked by CleanTalk