*** empty log message ***

This commit is contained in:
David Rose 2000-10-25 04:30:26 +00:00
parent b77489818e
commit 28c07298d5
4 changed files with 127 additions and 89 deletions

View File

@ -40,9 +40,15 @@ queue_event(CPT_Event event) {
<< "Ignoring event " << *event << "; event queue full.\n";
} else {
_queue.insert(event);
if (event_cat.is_debug()) {
event_cat.debug()
<< "Throwing event " << *event << "\n";
if (event_cat.is_spam() || event_cat.is_debug()) {
if (event->get_name() == "NewFrame") {
// Don't bother us with this particularly spammy event.
event_cat.spam()
<< "Throwing event " << *event << "\n";
} else {
event_cat.debug()
<< "Throwing event " << *event << "\n";
}
}
}
}

View File

@ -118,7 +118,7 @@ get_current_position() {
////////////////////////////////////////////////////////////////////
// Function: LineSegs::create
// Access: Public
// Description: Appends to an existing GeomNode a new pfGeoSet that
// Description: Appends to an existing GeomNode a new Geom that
// will render the series of line segments and points
// described via calls to move_to() and draw_to(). The
// lines and points are created with the color and

View File

@ -86,40 +86,56 @@ HRESULT CALLBACK EnumZBufFmtsCallback( LPDDPIXELFORMAT pddpf, VOID* param )
ButtonHandle wdxGraphicsWindow::
lookup_key(WPARAM wparam) const {
switch (wparam) {
case VK_BACK: return KeyboardButton::backspace();
case VK_TAB: return KeyboardButton::tab();
case VK_ESCAPE: return KeyboardButton::escape();
case VK_SPACE: return KeyboardButton::space();
case VK_UP: return KeyboardButton::up();
case VK_DOWN: return KeyboardButton::down();
case VK_LEFT: return KeyboardButton::left();
case VK_RIGHT: return KeyboardButton::right();
case VK_PRIOR: return KeyboardButton::page_up();
case VK_NEXT: return KeyboardButton::page_down();
case VK_HOME: return KeyboardButton::home();
case VK_END: return KeyboardButton::end();
case VK_F1: return KeyboardButton::f1();
case VK_F2: return KeyboardButton::f2();
case VK_F3: return KeyboardButton::f3();
case VK_F4: return KeyboardButton::f4();
case VK_F5: return KeyboardButton::f5();
case VK_F6: return KeyboardButton::f6();
case VK_F7: return KeyboardButton::f7();
case VK_F8: return KeyboardButton::f8();
case VK_F9: return KeyboardButton::f9();
case VK_F10: return KeyboardButton::f10();
case VK_F11: return KeyboardButton::f11();
case VK_F12: return KeyboardButton::f12();
case VK_INSERT: return KeyboardButton::insert();
case VK_DELETE: return KeyboardButton::del();
default:
int key = MapVirtualKey(wparam, 2);
if (isascii(key) && key != 0) {
if (GetKeyState(VK_SHIFT) >= 0)
key = tolower(key);
return KeyboardButton::ascii_key((uchar)key);
}
break;
case VK_BACK: return KeyboardButton::backspace();
case VK_TAB: return KeyboardButton::tab();
case VK_ESCAPE: return KeyboardButton::escape();
case VK_SPACE: return KeyboardButton::space();
case VK_UP: return KeyboardButton::up();
case VK_DOWN: return KeyboardButton::down();
case VK_LEFT: return KeyboardButton::left();
case VK_RIGHT: return KeyboardButton::right();
case VK_PRIOR: return KeyboardButton::page_up();
case VK_NEXT: return KeyboardButton::page_down();
case VK_HOME: return KeyboardButton::home();
case VK_END: return KeyboardButton::end();
case VK_F1: return KeyboardButton::f1();
case VK_F2: return KeyboardButton::f2();
case VK_F3: return KeyboardButton::f3();
case VK_F4: return KeyboardButton::f4();
case VK_F5: return KeyboardButton::f5();
case VK_F6: return KeyboardButton::f6();
case VK_F7: return KeyboardButton::f7();
case VK_F8: return KeyboardButton::f8();
case VK_F9: return KeyboardButton::f9();
case VK_F10: return KeyboardButton::f10();
case VK_F11: return KeyboardButton::f11();
case VK_F12: return KeyboardButton::f12();
case VK_INSERT: return KeyboardButton::insert();
case VK_DELETE: return KeyboardButton::del();
case VK_SHIFT:
case VK_LSHIFT:
case VK_RSHIFT:
return KeyboardButton::shift();
case VK_CONTROL:
case VK_LCONTROL:
case VK_RCONTROL:
return KeyboardButton::control();
case VK_MENU:
case VK_LMENU:
case VK_RMENU:
return KeyboardButton::alt();
default:
int key = MapVirtualKey(wparam, 2);
if (isascii(key) && key != 0) {
if (GetKeyState(VK_SHIFT) >= 0)
key = tolower(key);
return KeyboardButton::ascii_key((uchar)key);
}
break;
}
return ButtonHandle::none();
}

View File

@ -317,58 +317,74 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
ButtonHandle
wglGraphicsPipe::lookup_key(WPARAM wparam) const {
switch (wparam) {
case VK_BACK: return KeyboardButton::backspace();
case VK_TAB: return KeyboardButton::tab();
case VK_ESCAPE: return KeyboardButton::escape();
case VK_SPACE: return KeyboardButton::space();
case VK_UP: return KeyboardButton::up();
case VK_DOWN: return KeyboardButton::down();
case VK_LEFT: return KeyboardButton::left();
case VK_RIGHT: return KeyboardButton::right();
case VK_PRIOR: return KeyboardButton::page_up();
case VK_NEXT: return KeyboardButton::page_down();
case VK_HOME: return KeyboardButton::home();
case VK_END: return KeyboardButton::end();
case VK_F1: return KeyboardButton::f1();
case VK_F2: return KeyboardButton::f2();
case VK_F3: return KeyboardButton::f3();
case VK_F4: return KeyboardButton::f4();
case VK_F5: return KeyboardButton::f5();
case VK_F6: return KeyboardButton::f6();
case VK_F7: return KeyboardButton::f7();
case VK_F8: return KeyboardButton::f8();
case VK_F9: return KeyboardButton::f9();
case VK_F10: return KeyboardButton::f10();
case VK_F11: return KeyboardButton::f11();
case VK_F12: return KeyboardButton::f12();
case VK_INSERT: return KeyboardButton::insert();
case VK_DELETE: return KeyboardButton::del();
default:
int key = MapVirtualKey(wparam, 2);
if (isascii(key) && key != 0) {
if (GetKeyState(VK_SHIFT) >= 0)
key = tolower(key);
else {
switch (key) {
case '1': key = '!'; break;
case '2': key = '@'; break;
case '3': key = '#'; break;
case '4': key = '$'; break;
case '5': key = '%'; break;
case '6': key = '^'; break;
case '7': key = '&'; break;
case '8': key = '*'; break;
case '9': key = '('; break;
case '0': key = ')'; break;
case '=': key = '+'; break;
case '/': key = '?'; break;
case ';': key = ':'; break;
case '`': key = '~'; break;
}
}
return KeyboardButton::ascii_key((uchar)key);
case VK_BACK: return KeyboardButton::backspace();
case VK_TAB: return KeyboardButton::tab();
case VK_ESCAPE: return KeyboardButton::escape();
case VK_SPACE: return KeyboardButton::space();
case VK_UP: return KeyboardButton::up();
case VK_DOWN: return KeyboardButton::down();
case VK_LEFT: return KeyboardButton::left();
case VK_RIGHT: return KeyboardButton::right();
case VK_PRIOR: return KeyboardButton::page_up();
case VK_NEXT: return KeyboardButton::page_down();
case VK_HOME: return KeyboardButton::home();
case VK_END: return KeyboardButton::end();
case VK_F1: return KeyboardButton::f1();
case VK_F2: return KeyboardButton::f2();
case VK_F3: return KeyboardButton::f3();
case VK_F4: return KeyboardButton::f4();
case VK_F5: return KeyboardButton::f5();
case VK_F6: return KeyboardButton::f6();
case VK_F7: return KeyboardButton::f7();
case VK_F8: return KeyboardButton::f8();
case VK_F9: return KeyboardButton::f9();
case VK_F10: return KeyboardButton::f10();
case VK_F11: return KeyboardButton::f11();
case VK_F12: return KeyboardButton::f12();
case VK_INSERT: return KeyboardButton::insert();
case VK_DELETE: return KeyboardButton::del();
case VK_SHIFT:
case VK_LSHIFT:
case VK_RSHIFT:
return KeyboardButton::shift();
case VK_CONTROL:
case VK_LCONTROL:
case VK_RCONTROL:
return KeyboardButton::control();
case VK_MENU:
case VK_LMENU:
case VK_RMENU:
return KeyboardButton::alt();
default:
int key = MapVirtualKey(wparam, 2);
if (isascii(key) && key != 0) {
if (GetKeyState(VK_SHIFT) >= 0)
key = tolower(key);
else {
switch (key) {
case '1': key = '!'; break;
case '2': key = '@'; break;
case '3': key = '#'; break;
case '4': key = '$'; break;
case '5': key = '%'; break;
case '6': key = '^'; break;
case '7': key = '&'; break;
case '8': key = '*'; break;
case '9': key = '('; break;
case '0': key = ')'; break;
case '=': key = '+'; break;
case '/': key = '?'; break;
case ';': key = ':'; break;
case '`': key = '~'; break;
}
}
break;
return KeyboardButton::ascii_key((uchar)key);
}
break;
}
return ButtonHandle::none();
}