add get_button_thrower()

This commit is contained in:
David Rose 2009-10-28 19:18:34 +00:00
parent b594cb7dbd
commit 6415d2cc0b
2 changed files with 14 additions and 1 deletions

View File

@ -376,6 +376,17 @@ get_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
// Access: Public
@ -402,7 +413,7 @@ enable_keyboard() {
mods.add_button(KeyboardButton::alt());
mods.add_button(KeyboardButton::meta());
bt->set_modifier_buttons(mods);
mouse.attach_new_node(bt);
_button_thrower = mouse.attach_new_node(bt);
}
_got_keyboard = true;

View File

@ -82,6 +82,7 @@ public:
NodePath get_render_2d();
NodePath get_aspect_2d();
NodePath get_mouse();
NodePath get_button_thrower();
void enable_keyboard();
void setup_trackball();
@ -184,6 +185,7 @@ private:
PT(GenericAsyncTask) _update_anim_controls_task;
NodePath _mouse;
NodePath _button_thrower;
PT(Trackball) _trackball;
NodePath _alight;