mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +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)
|
switch (InputEvent.usParam)
|
||||||
{
|
{
|
||||||
case BACKSPACE:
|
case BACKSPACE:
|
||||||
|
case 'q':
|
||||||
// back to AIM sorting screen
|
// back to AIM sorting screen
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES;
|
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES;
|
||||||
break;
|
break;
|
||||||
case ENTER:
|
case ENTER:
|
||||||
|
case 'e':
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS;
|
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS;
|
||||||
break;
|
break;
|
||||||
case LEFTARROW:
|
case LEFTARROW:
|
||||||
|
|||||||
@@ -5198,6 +5198,7 @@ void HandleAimMemberKeyBoardInput()
|
|||||||
gfRedrawScreen = TRUE;
|
gfRedrawScreen = TRUE;
|
||||||
break;
|
break;
|
||||||
case ENTER:
|
case ENTER:
|
||||||
|
case 'e':
|
||||||
// contact only if merc alive & no popup box
|
// contact only if merc alive & no popup box
|
||||||
if( !IsMercDead( gbCurrentSoldier ) && gubPopUpBoxAction != AIM_POPUP_DISPLAY )
|
if( !IsMercDead( gbCurrentSoldier ) && gubPopUpBoxAction != AIM_POPUP_DISPLAY )
|
||||||
{
|
{
|
||||||
@@ -5211,6 +5212,7 @@ void HandleAimMemberKeyBoardInput()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BACKSPACE:
|
case BACKSPACE:
|
||||||
|
case 'q':
|
||||||
if( gubPopUpBoxAction != AIM_POPUP_DISPLAY )
|
if( gubPopUpBoxAction != AIM_POPUP_DISPLAY )
|
||||||
{
|
{
|
||||||
if( gubVideoConferencingMode != AIM_VIDEO_NOT_DISPLAYED_MODE )
|
if( gubVideoConferencingMode != AIM_VIDEO_NOT_DISPLAYED_MODE )
|
||||||
|
|||||||
@@ -1094,6 +1094,7 @@ void HandleAimSortKeyBoardInput()
|
|||||||
switch (InputEvent.usParam)
|
switch (InputEvent.usParam)
|
||||||
{
|
{
|
||||||
case BACKSPACE:
|
case BACKSPACE:
|
||||||
|
case 'q':
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM;
|
guiCurrentLaptopMode = LAPTOP_MODE_AIM;
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
@@ -1103,6 +1104,7 @@ void HandleAimSortKeyBoardInput()
|
|||||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS;
|
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS;
|
||||||
break;
|
break;
|
||||||
case ENTER:
|
case ENTER:
|
||||||
|
case 'e':
|
||||||
case 'm':
|
case 'm':
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_FACIAL_INDEX;
|
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_FACIAL_INDEX;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -3760,6 +3760,7 @@ void HandleBobbyRGunsKeyBoardInput()
|
|||||||
fPausedReDrawScreenFlag = TRUE;
|
fPausedReDrawScreenFlag = TRUE;
|
||||||
break;
|
break;
|
||||||
case ENTER:
|
case ENTER:
|
||||||
|
case 'e':
|
||||||
// order form
|
// order form
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R_MAILORDER;
|
guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R_MAILORDER;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "isometric utils.h"
|
#include "isometric utils.h"
|
||||||
#include "postalservice.h"
|
#include "postalservice.h"
|
||||||
|
#include "english.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -399,6 +400,7 @@ void SortBobbyRayPurchases();
|
|||||||
//ppp
|
//ppp
|
||||||
|
|
||||||
void DrawOrderGoldRectangle(UINT16 usGridX, UINT16 usGridY);
|
void DrawOrderGoldRectangle(UINT16 usGridX, UINT16 usGridY);
|
||||||
|
void HandleBobbyRMailOrderKeyBoardInput();
|
||||||
|
|
||||||
void GameInitBobbyRMailOrder()
|
void GameInitBobbyRMailOrder()
|
||||||
{
|
{
|
||||||
@@ -711,6 +713,7 @@ void HandleBobbyRMailOrder()
|
|||||||
gubDropDownAction = BR_DROP_DOWN_NO_ACTION;
|
gubDropDownAction = BR_DROP_DOWN_NO_ACTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HandleBobbyRMailOrderKeyBoardInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderBobbyRMailOrder()
|
void RenderBobbyRMailOrder()
|
||||||
@@ -1314,7 +1317,7 @@ void DisplayShippingCosts( BOOLEAN fCalledFromOrderPage, INT32 iSubTotal, UINT16
|
|||||||
|
|
||||||
while(spi != gShipmentTable[iOrderNum]->ShipmentPackages.end())
|
while(spi != gShipmentTable[iOrderNum]->ShipmentPackages.end())
|
||||||
{
|
{
|
||||||
uiPackageWeight += Item[((ShipmentPackageStruct&)*spi).usItemIndex].ubWeight;
|
uiPackageWeight += Item[((ShipmentPackageStruct&)*spi).usItemIndex].ubWeight * ((ShipmentPackageStruct&)*spi).ubNumber;
|
||||||
++spi;
|
++spi;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2948,9 +2951,44 @@ BOOLEAN NewWayOfLoadingBobbyRMailOrdersToSaveGameFile( HWFILE hFile )
|
|||||||
return( TRUE );
|
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 "strategic.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "PostalService.h"
|
#include "PostalService.h"
|
||||||
|
#include "input.h"
|
||||||
|
#include "english.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -116,6 +118,7 @@ extern CPostalService gPostalService;
|
|||||||
extern vector<PShipmentStruct> gShipmentTable;
|
extern vector<PShipmentStruct> gShipmentTable;
|
||||||
extern UINT32 guiGoldArrowImages;
|
extern UINT32 guiGoldArrowImages;
|
||||||
extern UINT32 guiBobbyROrderGrid;
|
extern UINT32 guiBobbyROrderGrid;
|
||||||
|
void HandleBobbyRShipmentsKeyBoardInput();
|
||||||
//
|
//
|
||||||
// Function
|
// Function
|
||||||
//
|
//
|
||||||
@@ -275,6 +278,8 @@ void HandleBobbyRShipments()
|
|||||||
|
|
||||||
RenderBobbyRShipments();
|
RenderBobbyRShipments();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HandleBobbyRShipmentsKeyBoardInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderBobbyRShipments()
|
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;
|
guiCurrentLaptopMode = LAPTOP_MODE_AIM_LINKS;
|
||||||
break;
|
break;
|
||||||
case ENTER:
|
case ENTER:
|
||||||
|
case 'e':
|
||||||
case 'm':
|
case 'm':
|
||||||
if(!fFirstTimeIn)
|
if(!fFirstTimeIn)
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES;
|
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES;
|
||||||
|
|||||||
@@ -1281,6 +1281,7 @@ void HandleFloristOrderKeyBoardInput()
|
|||||||
switch (InputEvent.usParam)
|
switch (InputEvent.usParam)
|
||||||
{
|
{
|
||||||
case ENTER:
|
case ENTER:
|
||||||
|
case 'e':
|
||||||
|
|
||||||
ubTextFieldID = (UINT8) GetActiveFieldID();
|
ubTextFieldID = (UINT8) GetActiveFieldID();
|
||||||
|
|
||||||
|
|||||||
@@ -1383,6 +1383,7 @@ void HandleMercsFilesKeyBoardInput( )
|
|||||||
EnableDisableMercFilesNextPreviousButton( );
|
EnableDisableMercFilesNextPreviousButton( );
|
||||||
break;
|
break;
|
||||||
case ENTER:
|
case ENTER:
|
||||||
|
case 'e':
|
||||||
//for no or invalid merc account, do nothing
|
//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 ) )
|
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;
|
break;
|
||||||
case BACKSPACE:
|
case BACKSPACE:
|
||||||
|
case 'q':
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_MERC;
|
guiCurrentLaptopMode = LAPTOP_MODE_MERC;
|
||||||
gubArrivedFromMercSubSite = MERC_CAME_FROM_HIRE_PAGE;
|
gubArrivedFromMercSubSite = MERC_CAME_FROM_HIRE_PAGE;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user