Slider/button for dialog options

Started by kaputtnik, Sat 06/09/2008 20:01:39

Previous topic - Next topic

kaputtnik

Good evening.

I'd love to know if any of you know if the newest version of AGS has made it possible to implement scrolling dialogs via sliders or buttons. I realize that monkey05_06 has released a module for this, "ScollingDialogs", but I fear it is slightly outdated, having been released a good two years ago.

In a certain situation, the game I am working on will feature way too many dialog options for a normal GUI to handle, so I will have to find a way out of this. Now, while I was browsing the manual, I found the new commands Dialog.OptionCount and Dialog.DisplayOptions. I've got the feeling that it might be possible to implement scrolling/sliding dialog options on a GUI with these; I can't, however, come up with an idea how this could be done.

Any suggestions how or if this can be implemented?
I, object.

monkey0506

I've actually, since the implementation of those options, been working off and on to provide an updated version of my module.

Basically the idea is that you'll need two arrows, one for scrolling up, one for scrolling down. You initialize the list by turning say, the first six or seven items on, and everything else off. You'll need to keep track of the top item and how many items you're using. You'll also need to make sure in the Game Settings pane under Dialogs that "Run game loops while dialog options are displayed" is set to True.

The next step is that in the Click functions for your buttons, if you're scrolling up then as long as the top item isn't zero, check that there are any items turned off (they might be off-forever), and if there is one, turn it on and the last item (top item + item count) off. Make sure to set your new top item; scrolling down is similar except you're testing that the last item (again top item + item count) is not the same as Dialog.OptionCount, if it is different, then you can check all the items from that one to the end of the dialog's options to find an option that is turned off, turn it back on, the top item off, and set your top item.

It gets more complex if you want to still be able to have some options disabled temporarily. If you're interested I might be able to take another crack at that module though.

kaputtnik

Thanks for the fast reply!

Disabling some dialog options temporarily would be a must for what I am doing. I also suppose that it will not be possible to implement this just that easily, because the switching of the dialog options is called by another (pretty complex) module - perhaps I'll just go with a nicely designed screen-wide GUI for that part of the game and hope it won't break the immersion too much.

I, object.

SMF spam blocked by CleanTalk