(solved) "Visited" dialog links

Started by Radiant, Wed 18/09/2013 17:17:59

Previous topic - Next topic

Radiant

I have a feature request for the dialog system that I hope should be fairly easy to implement.

Websites traditionally have three colors for links: normal (default), active (mouseover), and visited (when you've clicked on the link before). Currently, dialogs in AGS use the first two, but not the third. This means that in a large conversation tree, it is possible for the player to lose track of which dialog options he's already seen, and which he hasn't.

Therefore, I suggest to add a boolean to the class for dialog options, that specifies whether this option has been clicked on. It starts at false, and becomes true when the player first clicks on the option. It would be nice to add a function Dialog.SetOptionVisited (int option, bool visited) so that the programmer can do this manually, to 'reset' dialog options when they would generate more text.

Then, within the new class Speech, add a variable Speech.VisitedColor. Dialog options for which the boolean 'visited' is true are displayed in this color rather than the normal text color, and when the mouse is over the option they are shown in the highlit color exactly as they are now. Of course, VisitedColor should default to the normal text color so that programmers that don't use this functionality aren't surprised by it.

monkey0506

Dialog.HasOptionBeenChosen and game.read_option_color. Done! :P

Radiant

#2
.

Radiant

Wow, that was fast! I didn't know you had a time machine! :grin:

(sorry, I completely missed that in the manual)

(edit) nevertheless, Dialog.ResetHasOptionBeenChosen() or something would be nice to have, to clear the boolean.

monkey0506

To be fair, I don't think there's currently a way to manually change the "read"/"chosen" state. And the game.* variables should all eventually be moved into other appropriate places (and they're practically invisible throughout the rest of the manual).

No worries though. :)


Radiant

Hm, I'm not allowed to view that link.

Crimson Wizard

Quote from: Radiant on Wed 18/09/2013 18:30:34
Hm, I'm not allowed to view that link.
Oh no! :(
Cat had same problem... IIRC that was related to "AGS Baker" group rights. AGA should know better.

SMF spam blocked by CleanTalk