diff --git a/Laptop/AimFacialIndex.cpp b/Laptop/AimFacialIndex.cpp index 9dadeb55..570bdeb8 100644 --- a/Laptop/AimFacialIndex.cpp +++ b/Laptop/AimFacialIndex.cpp @@ -512,10 +512,12 @@ void HandleAimFacialIndexKeyBoardInput() switch (InputEvent.usParam) { case BACKSPACE: + case 'q': // back to AIM sorting screen guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES; break; case ENTER: + case 'e': guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS; break; case LEFTARROW: diff --git a/Laptop/AimMembers.cpp b/Laptop/AimMembers.cpp index 3a0fe9bc..1583b7ad 100644 --- a/Laptop/AimMembers.cpp +++ b/Laptop/AimMembers.cpp @@ -5198,6 +5198,7 @@ void HandleAimMemberKeyBoardInput() gfRedrawScreen = TRUE; break; case ENTER: + case 'e': // contact only if merc alive & no popup box if( !IsMercDead( gbCurrentSoldier ) && gubPopUpBoxAction != AIM_POPUP_DISPLAY ) { @@ -5211,6 +5212,7 @@ void HandleAimMemberKeyBoardInput() } break; case BACKSPACE: + case 'q': if( gubPopUpBoxAction != AIM_POPUP_DISPLAY ) { if( gubVideoConferencingMode != AIM_VIDEO_NOT_DISPLAYED_MODE ) diff --git a/Laptop/AimSort.cpp b/Laptop/AimSort.cpp index 1431aed1..c52b8e5a 100644 --- a/Laptop/AimSort.cpp +++ b/Laptop/AimSort.cpp @@ -1094,6 +1094,7 @@ void HandleAimSortKeyBoardInput() switch (InputEvent.usParam) { case BACKSPACE: + case 'q': guiCurrentLaptopMode = LAPTOP_MODE_AIM; break; case 'a': @@ -1103,6 +1104,7 @@ void HandleAimSortKeyBoardInput() guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS; break; case ENTER: + case 'e': case 'm': guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_FACIAL_INDEX; break; diff --git a/Laptop/BobbyRGuns.cpp b/Laptop/BobbyRGuns.cpp index 5cf0558a..7357d743 100644 --- a/Laptop/BobbyRGuns.cpp +++ b/Laptop/BobbyRGuns.cpp @@ -3760,6 +3760,7 @@ void HandleBobbyRGunsKeyBoardInput() fPausedReDrawScreenFlag = TRUE; break; case ENTER: + case 'e': // order form guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R_MAILORDER; break; diff --git a/Laptop/BobbyRMailOrder.cpp b/Laptop/BobbyRMailOrder.cpp index 68a76fd7..ad817039 100644 --- a/Laptop/BobbyRMailOrder.cpp +++ b/Laptop/BobbyRMailOrder.cpp @@ -25,6 +25,7 @@ #include "strategicmap.h" #include "isometric utils.h" #include "postalservice.h" + #include "english.h" #include #endif @@ -399,6 +400,7 @@ void SortBobbyRayPurchases(); //ppp void DrawOrderGoldRectangle(UINT16 usGridX, UINT16 usGridY); +void HandleBobbyRMailOrderKeyBoardInput(); void GameInitBobbyRMailOrder() { @@ -711,6 +713,7 @@ void HandleBobbyRMailOrder() gubDropDownAction = BR_DROP_DOWN_NO_ACTION; } + HandleBobbyRMailOrderKeyBoardInput(); } void RenderBobbyRMailOrder() @@ -1314,7 +1317,7 @@ void DisplayShippingCosts( BOOLEAN fCalledFromOrderPage, INT32 iSubTotal, UINT16 while(spi != gShipmentTable[iOrderNum]->ShipmentPackages.end()) { - uiPackageWeight += Item[((ShipmentPackageStruct&)*spi).usItemIndex].ubWeight; + uiPackageWeight += Item[((ShipmentPackageStruct&)*spi).usItemIndex].ubWeight * ((ShipmentPackageStruct&)*spi).ubNumber; ++spi; } @@ -2948,9 +2951,44 @@ BOOLEAN NewWayOfLoadingBobbyRMailOrdersToSaveGameFile( HWFILE hFile ) return( TRUE ); } +void HandleBobbyRMailOrderKeyBoardInput() +{ + InputAtom InputEvent; + BOOLEAN fCtrl, fAlt; + fCtrl = _KeyDown( CTRL ); + fAlt = _KeyDown( ALT ); - - - - + //while (DequeueSpecificEvent(&InputEvent, KEY_DOWN |KEY_REPEAT) == TRUE) + while (DequeueEvent(&InputEvent) == TRUE) + { + if( InputEvent.usEvent == KEY_DOWN ) + { + switch (InputEvent.usParam) + { + case BACKSPACE: + case 'q': + guiCurrentLaptopMode = guiLastBobbyRayPage; + break; + case '1': + gubSelectedLight = 0; + DrawShippingSpeedLights( gubSelectedLight ); + DisplayShippingCosts( TRUE, 0, BOBBYR_ORDERGRID_X, BOBBYR_ORDERGRID_Y, -1 ); + break; + case '2': + gubSelectedLight = 1; + DrawShippingSpeedLights( gubSelectedLight ); + DisplayShippingCosts( TRUE, 0, BOBBYR_ORDERGRID_X, BOBBYR_ORDERGRID_Y, -1 ); + break; + case '3': + gubSelectedLight = 2; + DrawShippingSpeedLights( gubSelectedLight ); + DisplayShippingCosts( TRUE, 0, BOBBYR_ORDERGRID_X, BOBBYR_ORDERGRID_Y, -1 ); + break; + default: + HandleKeyBoardShortCutsForLapTop( InputEvent.usEvent, InputEvent.usParam, InputEvent.usKeyState ); + break; + } + } + } +} diff --git a/Laptop/BobbyRShipments.cpp b/Laptop/BobbyRShipments.cpp index 1dfd53f0..aff5732f 100644 --- a/Laptop/BobbyRShipments.cpp +++ b/Laptop/BobbyRShipments.cpp @@ -15,6 +15,8 @@ #include "strategic.h" #include "strategicmap.h" #include "PostalService.h" + #include "input.h" + #include "english.h" #endif @@ -116,6 +118,7 @@ extern CPostalService gPostalService; extern vector gShipmentTable; extern UINT32 guiGoldArrowImages; extern UINT32 guiBobbyROrderGrid; +void HandleBobbyRShipmentsKeyBoardInput(); // // Function // @@ -275,6 +278,8 @@ void HandleBobbyRShipments() RenderBobbyRShipments(); } + + HandleBobbyRShipmentsKeyBoardInput(); } void RenderBobbyRShipments() @@ -599,3 +604,29 @@ INT32 CountNumberValidShipmentForTheShipmentsPage() } */ +void HandleBobbyRShipmentsKeyBoardInput() +{ + InputAtom InputEvent; + BOOLEAN fCtrl, fAlt; + + fCtrl = _KeyDown( CTRL ); + fAlt = _KeyDown( ALT ); + + //while (DequeueSpecificEvent(&InputEvent, KEY_DOWN |KEY_REPEAT) == TRUE) + while (DequeueEvent(&InputEvent) == TRUE) + { + if( InputEvent.usEvent == KEY_DOWN ) + { + switch (InputEvent.usParam) + { + case BACKSPACE: + case 'q': + guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R_MAILORDER; + break; + default: + HandleKeyBoardShortCutsForLapTop( InputEvent.usEvent, InputEvent.usParam, InputEvent.usKeyState ); + break; + } + } + } +} diff --git a/Laptop/aim.cpp b/Laptop/aim.cpp index f4fa36df..732161f6 100644 --- a/Laptop/aim.cpp +++ b/Laptop/aim.cpp @@ -1328,6 +1328,7 @@ void HandleAimKeyBoardInput() guiCurrentLaptopMode = LAPTOP_MODE_AIM_LINKS; break; case ENTER: + case 'e': case 'm': if(!fFirstTimeIn) guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES; diff --git a/Laptop/florist Order Form.cpp b/Laptop/florist Order Form.cpp index a81b04a5..6a3b64de 100644 --- a/Laptop/florist Order Form.cpp +++ b/Laptop/florist Order Form.cpp @@ -1281,6 +1281,7 @@ void HandleFloristOrderKeyBoardInput() switch (InputEvent.usParam) { case ENTER: + case 'e': ubTextFieldID = (UINT8) GetActiveFieldID(); diff --git a/Laptop/mercs Files.cpp b/Laptop/mercs Files.cpp index d05c1cbe..1386bf49 100644 --- a/Laptop/mercs Files.cpp +++ b/Laptop/mercs Files.cpp @@ -1383,6 +1383,7 @@ void HandleMercsFilesKeyBoardInput( ) EnableDisableMercFilesNextPreviousButton( ); break; case ENTER: + case 'e': //for no or invalid merc account, do nothing if( ( LaptopSaveInfo.gubPlayersMercAccountStatus != MERC_ACCOUNT_VALID ) && ( LaptopSaveInfo.gubPlayersMercAccountStatus != MERC_ACCOUNT_SUSPENDED ) && ( LaptopSaveInfo.gubPlayersMercAccountStatus != MERC_ACCOUNT_VALID_FIRST_WARNING ) ) { @@ -1419,6 +1420,7 @@ void HandleMercsFilesKeyBoardInput( ) } break; case BACKSPACE: + case 'q': guiCurrentLaptopMode = LAPTOP_MODE_MERC; gubArrivedFromMercSubSite = MERC_CAME_FROM_HIRE_PAGE; break;