This is awesome ! Absolutely awesome !
However I didn't find the interface to parent the GUI items to use with pixel2d.
I have a running RocketContext with a loaded document, but I just don't know how to display it with Panda.
Also, I investigated pixel2d but it seems I didn't get it right, here is my code :
- Code: Select all
Texture* texture = TexturePool::load_texture("textures/ingame-ui/main-bar.png");
PT(PGVirtualFrame) _mainBar = new PGVirtualFrame("GameUi MainBar");
style = _mainBar->get_frame_style(0);
//NodePath defButNp = window->get_aspect_2d().attach_new_node(_mainBar);
I tried all the commented approach and more : if I only use aspect_2d, the Frame is displayed at the coord 0,0,0, but in normal coordinates.
When I parent it to the pixel_2d node, it doesn't get displayed at all, even if I try to reparent the pixel_2d node to render_2d or aspect2d.
I also try to setup the Frame size like with aspect_2d, or using pixel size. But I can't get it to be displayed (or maybe it's out of the screen).