Re: Hacking a Win32 UI without knowing jack
Eugene <[email protected]>
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 22 Apr 2004 01:13:33 -0500 [email protected] wrote: >Once my mainloop is running, no write messages go >through. How is "write" >called by Lyntin? Is there some special magic I need to >be doing to get >writes into my GUI after runui is called? Writing to user interface is performed by the engine spamming to "to_user_hook" hook. Usually it is hooked to "write" method of some UI module (you can see it in textui, for example), but, of course, you are free to call it as you like. To be short, your UI module shall catch the "to_user_hook". Furthermore, this hook spamming belongs to another thread, and it is not the same thread which the "runui" method is running. So, you must catch the messages in your hook method and either organize its delivering into the "ui" thread (via some kind of private queue structure or whatever else), or make redrawing of messages right there, if the graphical toolkit is truely reentrant (consult the toolkit documentation whether it is allowed). In the latter case make sure the redrawing is really fast, because if it is not, then it will slow down all the engine work, including action triggering etc. -- Eugene --- Professional hosting for everyone - http://www.host.ru ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click