Custom Dialog questions, highlight text but still use GUI

Started by Moresco, Fri 31/10/2008 03:13:09

Previous topic - Next topic

Moresco

I'm having trouble figuring this all out, maybe someone can help me?

I want a dialog system similar to that of some Sierra games, where the dialogs show choices (much like the built in dialog system) and when you mouse over one, the text highlight changes.  I want to also add scrollbars and be able to limit the displayed amount to say, 7 at a time, but scroll up and down to see the other options.

What I have so far, is all coded manually without using the built-in system.  I've made a GUI and made buttons for the various topics.  Then, depending on whom I'm speaking with in-game, I change the text dynamically on those buttons to reflect dialog choices.  I use the following code, and include a float so it knows which corresponding conversation string I want to display (the float is for state changes, like if you ask the same thing twice etc).
Code: ags

dialogButton1.Text = "Text Choice Here";
conversationString = 59.1;


When you click the choice on my custom GUI Buttons, the text is displayed in the typical Sierra-styled conversation box.  If I use the new custom dialog functions to make use of the Dialog options, then text is displayed Lucas Art style and I don't know how to change this.  I guess I'm just searching for the best approach to this, with the most functionality.

If I use the custom dialog with the new custom functions, I can make most of it work the way I want.  I've got highlights in the color I want, and I've got the options appearing where the GUI buttons would go.  Problem is, buttons won't show up no matter what I try with the custom options.  I read on another post that in the past buttons couldn't be used with the built-in dialog, but that these new custom functions might allow it?

Maybe if I had a way to highlight the button text, I could also manage to figure out a scrollbar rig,  but the built-in dialogs seem so attractive because you can name them, and they're easier to organize.  Any ideas??


UPDATE:
I've managed to include highlighting now with the text buttons without much trouble, don't know where my brain was.  But I still would like to make use of the custom dialogs, it'd make things a lot easier.
Code: ags

if (Button.GetAtScreenXY(mouse.x, mouse.y) == dialogButton1) {
    dialogButton1.TextColor = 59326; }
else {
    dialogButton1.TextColor = 58960; }


Then I just repeated that several times for the other buttons.  I put it in Repeatedly Execute, because I didn't know where else to put it, but I think that's right.
::: Mastodon :::

Trent R

I don't know much about floating point variables, but I do know that they can cause some strange behavior. Perhaps that's the problem, setting which dialog to run based off of a float.

Idk, just a random suggestion.

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Moresco

Quote from: Trent R on Fri 31/10/2008 17:14:07
I don't know much about floating point variables, but I do know that they can cause some strange behavior. Perhaps that's the problem, setting which dialog to run based off of a float.

Idk, just a random suggestion.

~Trent

Nah that's not it, I only use that in the custom one that I created from scratch, and I have no problems there.  My problems occur when I try to use the built-in new custom dialogs, and for that there is no floating point in use since the dialogs are in the editor and called in a different way.  Thanks for the suggestion though! =]
::: Mastodon :::

Trent R

Sorry I didn't read your post more thoroughly, and I haven't used the new dialog functions so I can't help there either.

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

SMF spam blocked by CleanTalk