|
Replies:
4
-
Last Post:
Aug 20, 2008 11:51 AM
by: chihiro_saito
|
Threads:
[
Previous
|
Next
]
|
|
|
|
|
|
net/java/bd/tools/logger rendering with bookmenu?
Posted:
Aug 19, 2008 1:18 PM
|
|
|
Hi all,
I'm doing a test integration of the logger tool, into the bookmenu example. When bookmenu first starts up, I do see the logger flash quickly by before the bookmenu content begins rendering, but I cannot "bring back" the logger screen focus with the VKs (tried assigning HRcEvent.VK_LEFT and HRcEvent.VK_1) (testing with PowerDVD in this case).
Is this because GRIN renders over the top of what the logger draws, and if so is there a practical way to have the logger pause the GRIN render thread, or otherwise have the logger post-draw over each frame GRIN is outputting?
For reference, I'm init'g the logger in MenuXlet.initXlet, after engine.initialize(this);:
XletLogger.setXletContainer(scene); XletLogger.setToggleKey(HRcEvent.VK_1); XletLogger.log("Starting the xlet..."); XletLogger.setVisible(true);
|
|
|
|
|
|
|
Re: net/java/bd/tools/logger rendering with bookmenu?
Posted:
Aug 19, 2008 4:46 PM
in response to: ken2006
|
|
|
Hi,
XletLogger assumes that it's in control of the HScene, which is the xlet's root container. So it's a problem if the xlet starts drawing on HScene directly. I ported this tool from another project which this model made sense, but for various hdcookbook work where an xlet needs to have access to HScene, we're ending up using LwText component in logger instead of XletLogger itself.
Anyhow, in MenuXlet.animationInitialize()'s engine.initContainer() call, you can try passing in a new Container that's added to HScene instead of passing in the hscene itself. By doing so, the Animation Engine should draw on that Container instead of drawing on hscene and overwriting logger. Also pass in the same Container to XletLogger.setContainer() instead of hscene. I haven't tried this myself and would be interested to know if you succeed!
On a minor note, if the player is profile 2, I like to write logs on a socket so that the log can be viewed on another machine and saved.
Thanks, Chihiro
|
|
|
|
|
|
|
|
Re: net/java/bd/tools/logger rendering with bookmenu?
Posted:
Aug 20, 2008 9:58 AM
in response to: chihiro_saito
|
|
|
Chihiro,
I'm a little unclear if your advise was to add a new (Component)LwText to the new Container (or possibly add to HScene), or, not use LwText but just use XletLogger. (to keep its methods, visible, key etc). I guess I see a few way this can be done but my awt + grin knowledge is limited.
I've tried the following and get no animation at all (could be a NPE for all I know.. I'm lost without a console).
1) Declaring a new Container field in MenuXlet: public Container root;
2) animationInitialize(): root = new Container(); scene.add(root); engine.initContainer(root, bounds);
3) initXlet(): ... engine.initialize(this); XletLogger.setXletContainer(root); XletLogger.setToggleKey(HRcEvent.VK_1); XletLogger.log("Starting the xlet..."); XletLogger.setVisible(true);
Thank you, ken
|
|
|
|
|
|
|
|
Re: net/java/bd/tools/logger rendering with bookmenu?
Posted:
Aug 20, 2008 10:41 AM
in response to: ken2006
|
|
|
I just needed to:
root.setVisible(true);
after the engine.initContainer(root, bounds); call.
Thank you Chihiro!!!
Ken
|
|
|
|
|
|
|
|
Re: net/java/bd/tools/logger rendering with bookmenu?
Posted:
Aug 20, 2008 11:51 AM
in response to: ken2006
|
|
|
Cool, glad that it worked.
Best, Chihiro
|
|
|
|
|