// //////////////////////////////////////////////////////////////////////////// bool runKeyMapEditor(void) { UDWORD id; id = widgRunScreen(psWScreen); // Run the current set of widgets if(id == KM_RETURN) // return { saveKeyMap(); changeTitleMode(OPTIONS); } if(id == KM_DEFAULT) { keyClearMappings(); keyInitMappings(true); widgDelete(psWScreen,FRONTEND_BACKDROP);// readd the widgets startKeyMapEditor(false); } else if( id>=KM_START && id<=KM_END) { pushedKeyMap(id); } if(selectedKeyMap) { KEY_CODE kc = scanKeyBoardForBinding(); if (kc) { pushedKeyCombo(kc); } } widgDisplayScreen(psWScreen); // show the widgets currently running if (CancelPressed()) { changeTitleMode(OPTIONS); } return true; }
// //////////////////////////////////////////////////////////////////////////// bool runKeyMapEditor(void) { WidgetTriggers const &triggers = widgRunScreen(psWScreen); unsigned id = triggers.empty()? 0 : triggers.front().widget->id; // Just use first click here, since the next click could be on another menu. if(id == KM_RETURN) // return { saveKeyMap(); changeTitleMode(OPTIONS); } if(id == KM_DEFAULT) { keyClearMappings(); keyInitMappings(true); widgDelete(psWScreen,FRONTEND_BACKDROP);// readd the widgets startKeyMapEditor(false); } else if( id>=KM_START && id<=KM_END) { pushedKeyMap(id); } if(selectedKeyMap) { KEY_CODE kc = scanKeyBoardForBinding(); if (kc) { pushedKeyCombo(kc); } } widgDisplayScreen(psWScreen); // show the widgets currently running if (CancelPressed()) { changeTitleMode(OPTIONS); } return true; }
// //////////////////////////////////////////////////////////////////////////// BOOL runKeyMapEditor(void) { UDWORD id; id = widgRunScreen(psWScreen); // Run the current set of widgets if(id == KM_RETURN) // return { saveKeyMap(); changeTitleMode(TITLE); } if(id == KM_DEFAULT) { keyClearMappings(); keyInitMappings(TRUE); widgDelete(psWScreen,FRONTEND_BACKDROP);// readd the widgets startKeyMapEditor(FALSE); } else if( id>=KM_START && id<=KM_END) { pushedKeyMap(id); } if(selectedKeyMap) { id = scanKeyBoardForBinding(); if(id) { pushedKeyCombo(id); } } DrawBegin(); StartCursorSnap(&InterfaceSnap); widgDisplayScreen(psWScreen); // show the widgets currently running DrawEnd(); return TRUE; }