*** 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"; << "Ignoring event " << *event << "; event queue full.\n";
} else { } else {
_queue.insert(event); _queue.insert(event);
if (event_cat.is_debug()) { if (event_cat.is_spam() || event_cat.is_debug()) {
event_cat.debug() if (event->get_name() == "NewFrame") {
<< "Throwing event " << *event << "\n"; // 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 // Function: LineSegs::create
// Access: Public // 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 // will render the series of line segments and points
// described via calls to move_to() and draw_to(). The // described via calls to move_to() and draw_to(). The
// lines and points are created with the color and // lines and points are created with the color and

View File

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

View File

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