add shift-B

This commit is contained in:
David Rose 2002-07-03 16:22:02 +00:00
parent 77302eaf47
commit cc4ef1f5e0
2 changed files with 21 additions and 0 deletions

View File

@ -542,6 +542,7 @@ do_enable_default_keys() {
_event_handler.add_hook("l", event_l, this);
_event_handler.add_hook("c", event_c, this);
_event_handler.add_hook("shift-c", event_C, this);
_event_handler.add_hook("shift-b", event_B, this);
_event_handler.add_hook("shift-l", event_L, this);
_event_handler.add_hook("h", event_h, this);
_event_handler.add_hook("arrow_up", event_arrow_up, this);
@ -663,6 +664,25 @@ event_C(CPT_Event, void *data) {
}
}
////////////////////////////////////////////////////////////////////
// Function: PandaFramework::event_B
// Access: Protected, Static
// Description: Default handler for shift-B key: describe the
// bounding volume of the currently selected object, or
// the entire scene.
////////////////////////////////////////////////////////////////////
void PandaFramework::
event_B(CPT_Event, void *data) {
PandaFramework *self = (PandaFramework *)data;
NodePath node = self->get_highlight();
if (node.is_empty()) {
node = self->get_models();
}
node.get_bounds()->write(nout);
}
////////////////////////////////////////////////////////////////////
// Function: PandaFramework::event_L
// Access: Protected, Static

View File

@ -106,6 +106,7 @@ protected:
static void event_l(CPT_Event, void *data);
static void event_c(CPT_Event, void *data);
static void event_C(CPT_Event, void *data);
static void event_B(CPT_Event, void *data);
static void event_L(CPT_Event, void *data);
static void event_h(CPT_Event, void *data);
static void event_arrow_up(CPT_Event, void *data);