Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: abstauber on Wed 16/12/2009 10:14:55

Title: Custom Dialogs: Refreshing the surface
Post by: abstauber on Wed 16/12/2009 10:14:55
Hey,

I'd like to add some gimmicks to my module, such as scroll button highlighting and push images.
But now I'm facing the problem that I don't know how to convince AGS to refresh the special drawing surface.

I've already found out that AGS refreshes the dialog surface, after:
* a mouse click occured
* a dialog option is selected, or better: if ActiveOptionID changes

Right now, I'm doing it this way:
In "dialog_options_get_active" I check for the highlighting. If there's a valid highlight for a scroll button, I set a dummy dialog option to active so "dialog_options_render" is being called AND the surface is being released afterwards.
In "dialog_options_render" I set the dummy option to inactive again and draw the highlighted scroll button.

But the drawback is that if you click faster enough, the dialog option is being processed before "dialog_options_render" chips in and deactivates it.

Do you have any other ideas to refresh this special dialog surface?

Thanks!  :)
Title: Re: Custom Dialogs: Refreshing the surface
Post by: monkey0506 on Wed 16/12/2009 12:30:41
I'm actually interested in this myself. I couldn't really find/think of a viable workaround.
Title: Re: Custom Dialogs: Refreshing the surface
Post by: Pumaman on Tue 05/01/2010 22:25:22
Interesting point, I'll look into a solution for this.