| 78 | return lString16(getKeyName(key, flags)); |
| 79 | } |
| 80 | CRMenu * createCommandsMenu(int key, int flags) |
| 81 | { |
| 82 | lString16 label = getSettingLabel( key, flags ) + L" - " + lString16(_("choose command")); |
| 83 | lString16 keyid = getSettingKey( key, flags ); |
| 84 | CRMenu * menu = new CRMenu(_wm, this, _id, label, LVImageSourceRef(), LVFontRef(), LVFontRef(), _props, LCSTR(keyid), 8); |
| 85 | for ( int i=0; i<_overrideCommands->length(); i++ ) { |
| 86 | const CRGUIAccelerator * acc = _overrideCommands->get(i); |
| 87 | lString16 cmdLabel = lString16( getCommandName(acc->commandId, acc->commandParam) ); |
| 88 | lString16 cmdValue = lString16::itoa(acc->commandId) + L"," + lString16::itoa(acc->commandParam); |
| 89 | CRMenuItem * item = new CRMenuItem( menu, i, cmdLabel, LVImageSourceRef(), LVFontRef(), cmdValue.c_str()); |
| 90 | menu->addItem(item); |
| 91 | } |
| 92 | menu->setAccelerators( getAccelerators() ); |
| 93 | menu->setSkinName(lString16(L"#settings")); |
| 94 | menu->setValueFont(_valueFont); |
| 95 | menu->setFullscreen(true); |
| 96 | menu->reconfigure( 0 ); |
| 97 | return menu; |
| 98 | } |
| 99 | CRControlsMenu(CRMenu * baseMenu, int id, CRPropRef props, lString16 accelTableId, int numItems, lvRect & rc) |
| 100 | : CRFullScreenMenu( baseMenu->getWindowManager(), id, lString16(_("Controls")), numItems, rc ) |
| 101 | { |
no test coverage detected