mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
add shift-L to pview
This commit is contained in:
parent
ca07e15ec9
commit
cccf0f02cc
@ -488,6 +488,7 @@ do_enable_default_keys() {
|
|||||||
_event_handler.add_hook("b", event_b, this);
|
_event_handler.add_hook("b", event_b, this);
|
||||||
_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-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);
|
||||||
_event_handler.add_hook("arrow_down", event_arrow_down, this);
|
_event_handler.add_hook("arrow_down", event_arrow_down, this);
|
||||||
@ -576,18 +577,36 @@ void PandaFramework::
|
|||||||
event_c(CPT_Event, void *data) {
|
event_c(CPT_Event, void *data) {
|
||||||
PandaFramework *self = (PandaFramework *)data;
|
PandaFramework *self = (PandaFramework *)data;
|
||||||
|
|
||||||
NodePath center_around = self->get_highlight();
|
NodePath node = self->get_highlight();
|
||||||
if (center_around.is_empty()) {
|
if (node.is_empty()) {
|
||||||
center_around = self->get_models();
|
node = self->get_models();
|
||||||
}
|
}
|
||||||
|
|
||||||
Windows::iterator wi;
|
Windows::iterator wi;
|
||||||
for (wi = self->_windows.begin(); wi != self->_windows.end(); ++wi) {
|
for (wi = self->_windows.begin(); wi != self->_windows.end(); ++wi) {
|
||||||
WindowFramework *wf = (*wi);
|
WindowFramework *wf = (*wi);
|
||||||
wf->center_trackball(center_around);
|
wf->center_trackball(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: PandaFramework::event_L
|
||||||
|
// Access: Protected, Static
|
||||||
|
// Description: Default handler for shift-L key: list the contents of
|
||||||
|
// the scene graph, or the highlighted node.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
void PandaFramework::
|
||||||
|
event_L(CPT_Event, void *data) {
|
||||||
|
PandaFramework *self = (PandaFramework *)data;
|
||||||
|
|
||||||
|
NodePath node = self->get_highlight();
|
||||||
|
if (node.is_empty()) {
|
||||||
|
node = self->get_models();
|
||||||
|
}
|
||||||
|
|
||||||
|
node.ls();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: PandaFramework::event_h
|
// Function: PandaFramework::event_h
|
||||||
// Access: Protected, Static
|
// Access: Protected, Static
|
||||||
|
@ -102,6 +102,7 @@ protected:
|
|||||||
static void event_b(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_c(CPT_Event, void *data);
|
static void event_c(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);
|
||||||
static void event_arrow_down(CPT_Event, void *data);
|
static void event_arrow_down(CPT_Event, void *data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user