mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Merged from revision: 6989
Bugfix (by Buggler) - Fixed incorrect shipping costs in BobbyR Shipment page - Duplicate laptop webpage hotkeys (e -> Enter, q -> BACKSPACE) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6990 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -3760,6 +3760,7 @@ void HandleBobbyRGunsKeyBoardInput()
|
||||
fPausedReDrawScreenFlag = TRUE;
|
||||
break;
|
||||
case ENTER:
|
||||
case 'e':
|
||||
// order form
|
||||
guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R_MAILORDER;
|
||||
break;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "strategicmap.h"
|
||||
#include "isometric utils.h"
|
||||
#include "postalservice.h"
|
||||
#include "english.h"
|
||||
#include <list>
|
||||
#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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<PShipmentStruct> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1281,6 +1281,7 @@ void HandleFloristOrderKeyBoardInput()
|
||||
switch (InputEvent.usParam)
|
||||
{
|
||||
case ENTER:
|
||||
case 'e':
|
||||
|
||||
ubTextFieldID = (UINT8) GetActiveFieldID();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user