mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
add get_button_thrower()
This commit is contained in:
parent
b594cb7dbd
commit
6415d2cc0b
@ -376,6 +376,17 @@ get_mouse() {
|
|||||||
return _mouse;
|
return _mouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: WindowFramework::get_button_thrower
|
||||||
|
// Access: Public
|
||||||
|
// Description: Returns the node in the data graph corresponding to
|
||||||
|
// the ButtonThrower object associated with this window.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
NodePath WindowFramework::
|
||||||
|
get_button_thrower() {
|
||||||
|
return _button_thrower;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: WindowFramework::enable_keyboard
|
// Function: WindowFramework::enable_keyboard
|
||||||
// Access: Public
|
// Access: Public
|
||||||
@ -402,7 +413,7 @@ enable_keyboard() {
|
|||||||
mods.add_button(KeyboardButton::alt());
|
mods.add_button(KeyboardButton::alt());
|
||||||
mods.add_button(KeyboardButton::meta());
|
mods.add_button(KeyboardButton::meta());
|
||||||
bt->set_modifier_buttons(mods);
|
bt->set_modifier_buttons(mods);
|
||||||
mouse.attach_new_node(bt);
|
_button_thrower = mouse.attach_new_node(bt);
|
||||||
}
|
}
|
||||||
|
|
||||||
_got_keyboard = true;
|
_got_keyboard = true;
|
||||||
|
@ -82,6 +82,7 @@ public:
|
|||||||
NodePath get_render_2d();
|
NodePath get_render_2d();
|
||||||
NodePath get_aspect_2d();
|
NodePath get_aspect_2d();
|
||||||
NodePath get_mouse();
|
NodePath get_mouse();
|
||||||
|
NodePath get_button_thrower();
|
||||||
|
|
||||||
void enable_keyboard();
|
void enable_keyboard();
|
||||||
void setup_trackball();
|
void setup_trackball();
|
||||||
@ -184,6 +185,7 @@ private:
|
|||||||
PT(GenericAsyncTask) _update_anim_controls_task;
|
PT(GenericAsyncTask) _update_anim_controls_task;
|
||||||
|
|
||||||
NodePath _mouse;
|
NodePath _mouse;
|
||||||
|
NodePath _button_thrower;
|
||||||
PT(Trackball) _trackball;
|
PT(Trackball) _trackball;
|
||||||
|
|
||||||
NodePath _alight;
|
NodePath _alight;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user