mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
framework: Support GUI under pixel2d by default (for C++ users)
Fixes #1222
This commit is contained in:
parent
b53895aa3d
commit
e9c97535f7
@ -340,6 +340,13 @@ get_pixel_2d() {
|
||||
_pixel_2d = get_render_2d().attach_new_node(top);
|
||||
_pixel_2d.set_pos(-1, 0, 1);
|
||||
|
||||
// Tell the PGTop about our MouseWatcher object, so the PGui system can
|
||||
// operate.
|
||||
PandaNode *mouse_node = get_mouse().node();
|
||||
if (mouse_node->is_of_type(MouseWatcher::get_class_type())) {
|
||||
top->set_mouse_watcher(DCAST(MouseWatcher, mouse_node));
|
||||
}
|
||||
|
||||
if (_window->has_size()) {
|
||||
int x_size = _window->get_sbs_left_x_size();
|
||||
int y_size = _window->get_sbs_left_y_size();
|
||||
|
Loading…
x
Reference in New Issue
Block a user