Dialog boxes

Started by Superman95, Sun 21/12/2003 04:30:30

Previous topic - Next topic

Superman95

Okay, I have another question that seems like it should be simple.

I set up some dialog, assigned talking views to my characters and in the game options set dialog to a specific GUI and set the style to Sierra-style/wbackground.  It works, but it displays it in the top left corner.

How can I center it in the screen?

Pumaman

By default, Sierra style speech always displays at the top of the screen.

You can use DisplaySpeechAt to display it elsewhere.

Superman95

So, If I use the dialog engine built into AGS, I can't center the dialog?  Or do I just need to call the topic differently.

If not, I'd like to add this as a feature request.

Thanks.

Pumaman

Okey, sounds reasonable enough, I'll add it to my list.

However, I think the reason people don't generally want this is that it looks a bit odd having the dialog picture and text in the centre of the screen when doing it Sierra-style.

Try it out with DisplaySpeechAt and see what you think.

Superman95

Speaking of this, I have one other request.

when you want to call a script from the dialog you would say:
 run-script 1 // or whatever number
and then it's handled in the script like this:
 function dialog_request(int parameter)
 {
   if(parameter == 1)
     // do something
   else if(patameter == 2)
     // do something else
   // and on and on.
   ...
   ...
 }

I think it would be very helpful to also pass the topic number...then you have fewer numbers to keep straight.  You could say instead:

function dialog_request(int topic, int parameter)
{
  if(topic == 0)
  {  // option list
     if(parameter==1) {}
     if(parameter==2) {}
     if(parameter==3) {}
  }
  else if(topic == 2)
  {  // option list
     if(parameter==1) {}
     if(parameter==2) {}
     if(parameter==3) {}
  }
}

I realize this is difficute for backward compatiblity.  But one option would be, if the user was passing the topic call
dialog_requestex() instead of dialog_request()
I realize this could be done with global varibles, but this seemed cleaner.


And one last thought, you can't pass a 0 as the parameter, you get an error, which is just a bit of an annoyance.

You know, for an American, my English sucks.  I hope this made sense.

Pumaman

Yeah, that sounds reasonable to me, and it could well help the script look a bit cleaner. Good idea, I'll add it to me list.

Superman95

There's one other thought.  How about giving the room a chance to run the dialog before the global.  This would help clean up the global script, expecially for characters that never change rooms.

Just use the same ClaimEvent() function.  If you pass the topic number, it would be really useful.  Just a thought.

GarageGothic

#7
CJ, I just though this was a good time to remind you of something I brought up a while ago: custom location and size of text windows (http://www.agsforums.com/yabb/index.php?board=2;action=display;threadid=8945;start=msg108839#msg108839)

There are a lot of speech/text window related suggestions in the future.txt file, and I hope you'll take this into consideration the next time you make changes to the text display code. I think that a more customizable system would solve many of the problems that have been mentioned. There are a LOT of great adventures that use non-standard display modes, which are currently rather difficult to emulate in AGS  (TLJ and GK1 spring to mind).

Thanks for your time,
GG

Rui 'Trovatore' Pires

While I'm at it, I'd like to remind you of my suggestion some weeks ago, about an X/Y offset for the text windows in games which have "frames", like Phantasmagoria 1 or Darkseed. I think that'd settle everything satisfactorily for everyone.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

GarageGothic: ah yes, that would indeed solve this problem. I'll bump that suggestion up my list.

QuoteThere's one other thought. How about giving the room a chance to run the dialog before the global. This would help clean up the global script, expecially for characters that never change rooms.

That sounds reasonable enough to me - I don't know why I didn't add that originally with on_key_press room script support, actually.

QuoteWhile I'm at it, I'd like to remind you of my suggestion some weeks ago, about an X/Y offset for the text windows in games which have "frames", like Phantasmagoria 1 or Darkseed. I think that'd settle everything satisfactorily for everyone.

Do you mean for speech (which would be covered by GarageGothic's suggestion) or for normal Display commands?

Rui 'Trovatore' Pires

I meant it for speech, but the more flexibility the merrier. Sure, we can DisplayAt, but we also have to specify the witdh, which can be a variable, which is not always handy. Or am I missing something?

Speaking of which - I noticed one can't DisplaySpeechAt over a GUI, the text is drawn behind. I suppose this happens to all text. Could that be costumizable, too? In the instance I need, it's fairly easy to work around that, but, you know...   ::)
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

Well, if you're specifying the X/Y, then it's reasonable to specify the width as well - otherwise, what should AGS assume? Should it just stretch the text box all the way over to the right hand side of the screen? But yes, GarageGothic's suggestion, if properly implemented, would I think cover your request.

As for the Z-order - currently GUIs are always in front of overlays (of which speech is one). However, it's on my to-do list to allow setting the z-order for that too.

Ginny

Yes, I second that, it would be very helpful to make text display above GUIs such as inventory. I encountered this problem when I was displaying descriptions for inventory items. I solved it at the time by displaying messages instead of speech, because DisplaySpeechAt was too problematic in my case.
Anyway just mentioning that it's a good idea :)
Try Not to Breathe - coming sooner or later!

We may have years, we may have hours, but sooner or later, we push up flowers. - Membrillo, Grim Fandango coroner

SMF spam blocked by CleanTalk