mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
add shift-B
This commit is contained in:
parent
77302eaf47
commit
cc4ef1f5e0
@ -542,6 +542,7 @@ do_enable_default_keys() {
|
|||||||
_event_handler.add_hook("l", event_l, this);
|
_event_handler.add_hook("l", event_l, this);
|
||||||
_event_handler.add_hook("c", event_c, this);
|
_event_handler.add_hook("c", event_c, this);
|
||||||
_event_handler.add_hook("shift-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("shift-l", event_L, this);
|
||||||
_event_handler.add_hook("h", event_h, this);
|
_event_handler.add_hook("h", event_h, this);
|
||||||
_event_handler.add_hook("arrow_up", event_arrow_up, 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
|
// Function: PandaFramework::event_L
|
||||||
// Access: Protected, Static
|
// Access: Protected, Static
|
||||||
|
@ -106,6 +106,7 @@ protected:
|
|||||||
static void event_l(CPT_Event, void *data);
|
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_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_L(CPT_Event, void *data);
|
||||||
static void event_h(CPT_Event, void *data);
|
static void event_h(CPT_Event, void *data);
|
||||||
static void event_arrow_up(CPT_Event, void *data);
|
static void event_arrow_up(CPT_Event, void *data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user