Features (by Buggler)

- More AIM sorting options. Default: Sort by Name
Laptop\AIM Homepage Screen
- Hotkeys 'm': Members Sorting page
- Hotkeys 'l': Links page
- Hotkeys 'h': History page
- Hotkeys 'p': Policies page
Laptop\AIM Sorting Screen
- Hotkeys BACKSPACE: Back to AIM Homepage Screen
- Hotkeys 'm': Mug Shot Index page
- Hotkeys 'f': Member page
- Hotkeys 'a': Alumni page
Laptop\AIM Mug Shot Index Screen
- Hotkeys BACKSPACE: Back to AIM Sorting Screen
- Hotkeys LEFT ARROW: Previous Page
- Hotkeys RIGHT ARROW: Next Page

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5636 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-10-21 16:10:49 +00:00
parent 5957af60aa
commit 38bcb34702
13 changed files with 810 additions and 169 deletions
+122 -21
View File
@@ -14,6 +14,8 @@
#include "aimsort.h"
#include "Assignments.h"
#include "GameSettings.h"
#include "english.h"
#include "sysutil.h"
#endif
@@ -78,6 +80,9 @@ void BtnNewProfilesButtonCallback(GUI_BUTTON *btn,INT32 reason);
INT32 PAGE_BUTTON;
//Hotkey Assignment
void HandleAimFacialIndexKeyBoardInput();
void GameInitAimFacialIndex()
{
@@ -113,31 +118,51 @@ static STR16 GetPageButtonText()
void BtnNewProfilesButtonCallback(GUI_BUTTON *btn,INT32 reason)
{
UINT32 i;
for(i=0; i<MAX_NUMBER_MERCS; i++)
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
{
gAimProfiles[i] = TRUE;
btn->uiFlags |= BUTTON_CLICKED_ON;
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
}
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
UINT32 i;
btn->uiFlags &= (~BUTTON_CLICKED_ON );
if ( START_MERC == 0 )
{
START_MERC = 40;
}
else if ( START_MERC == 40 )
{
if ( MAX_NUMBER_MERCS > 80 )
START_MERC = 80;
else
START_MERC = 0;
}
else
{
START_MERC = 0;
}
for(i=0; i<MAX_NUMBER_MERCS; i++)
{
gAimProfiles[i] = TRUE;
}
ExitAimFacialIndex();
EnterAimFacialIndex();
if ( START_MERC == 0 )
{
START_MERC = 40;
}
else if ( START_MERC == 40 )
{
if ( MAX_NUMBER_MERCS > 80 )
START_MERC = 80;
else
START_MERC = 0;
}
else
{
START_MERC = 0;
}
ExitAimFacialIndex();
EnterAimFacialIndex();
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
}
}
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
{
btn->uiFlags &= (~BUTTON_CLICKED_ON );
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
}
}
BOOLEAN EnterAimFacialIndex()
@@ -259,6 +284,7 @@ void HandleAimFacialIndex()
// if( fShowBookmarkInfo )
// fPausedReDrawScreenFlag = TRUE;
HandleAimFacialIndexKeyBoardInput();
}
BOOLEAN RenderAimFacialIndex()
@@ -474,9 +500,84 @@ BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT
void HandleAimFacialIndexKeyBoardInput()
{
InputAtom InputEvent;
UINT32 i;
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
#else
while (DequeueEvent(&InputEvent) == TRUE)
#endif
{//!HandleTextInput( &InputEvent ) &&
if( InputEvent.usEvent == KEY_DOWN )
{
switch (InputEvent.usParam)
{
case BACKSPACE:
// back to AIM sorting screen
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES;
break;
case LEFTARROW:
// previous page
for(i=0; i<MAX_NUMBER_MERCS; i++)
{
gAimProfiles[i] = TRUE;
}
if ( START_MERC == 40 )
{
START_MERC = 0;
}
else if ( START_MERC == 0 )
{
if ( MAX_NUMBER_MERCS > 80 )
START_MERC = 80;
else
START_MERC = 40;
}
else
{
START_MERC = 40;
}
ExitAimFacialIndex();
EnterAimFacialIndex();
break;
case RIGHTARROW:
// next page
for(i=0; i<MAX_NUMBER_MERCS; i++)
{
gAimProfiles[i] = TRUE;
}
if ( START_MERC == 0 )
{
START_MERC = 40;
}
else if ( START_MERC == 40 )
{
if ( MAX_NUMBER_MERCS > 80 )
START_MERC = 80;
else
START_MERC = 0;
}
else
{
START_MERC = 0;
}
ExitAimFacialIndex();
EnterAimFacialIndex();
break;
default:
HandleKeyBoardShortCutsForLapTop( InputEvent.usEvent, InputEvent.usParam, InputEvent.usKeyState );
break;
}
}
}
}
+464 -90
View File
@@ -12,40 +12,42 @@
#include "Game Clock.h"
#include "Text.h"
#include "Multi Language Graphic Utils.h"
#include "english.h"
#include "sysutil.h"
#endif
//#define
#define AIM_SORT_FONT_TITLE FONT14ARIAL
#define AIM_SORT_FONT_TITLE FONT14ARIAL
#define AIM_SORT_FONT_SORT_TEXT FONT10ARIAL
#define AIM_SORT_COLOR_SORT_TEXT AIM_FONT_MCOLOR_WHITE
#define AIM_SORT_SORT_BY_COLOR 146
#define AIM_SORT_LINK_TEXT_COLOR 146
#define AIM_SORT_GAP_BN_ICONS 60
#define AIM_SORT_CHECKBOX_SIZE 10
#define AIM_SORT_GAP_BN_ICONS 60
#define AIM_SORT_CHECKBOX_SIZE 10
#define AIM_SORT_ON 0
#define AIM_SORT_OFF 1
#define AIM_SORT_TO_MUGSHOTS_X IMAGE_OFFSET_X + 89
#define AIM_SORT_TO_MUGSHOTS_Y IMAGE_OFFSET_Y + 184
#define AIM_SORT_TO_MUGSHOTS_SIZE 54
#define AIM_SORT_TO_MUGSHOTS_X IMAGE_OFFSET_X + 89
#define AIM_SORT_TO_MUGSHOTS_Y IMAGE_OFFSET_Y + 184
#define AIM_SORT_TO_MUGSHOTS_SIZE 54
#define AIM_SORT_TO_STATS_X AIM_SORT_TO_MUGSHOTS_X
#define AIM_SORT_TO_STATS_Y AIM_SORT_TO_MUGSHOTS_Y + AIM_SORT_GAP_BN_ICONS
#define AIM_SORT_TO_STATS_SIZE AIM_SORT_TO_MUGSHOTS_SIZE
#define AIM_SORT_TO_STATS_SIZE AIM_SORT_TO_MUGSHOTS_SIZE
#define AIM_SORT_TO_ALUMNI_X AIM_SORT_TO_MUGSHOTS_X
#define AIM_SORT_TO_ALUMNI_Y AIM_SORT_TO_STATS_Y + AIM_SORT_GAP_BN_ICONS
#define AIM_SORT_TO_ALUMNI_SIZE AIM_SORT_TO_MUGSHOTS_SIZE
#define AIM_SORT_TO_ALUMNI_SIZE AIM_SORT_TO_MUGSHOTS_SIZE
#define AIM_SORT_AIM_MEMBER_X AIM_SORT_SORT_BY_X
#define AIM_SORT_AIM_MEMBER_Y iScreenHeightOffset + 105 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_AIM_MEMBER_WIDTH AIM_SORT_SORT_BY_WIDTH
#define AIM_SORT_AIM_MEMBER_Y iScreenHeightOffset + 105 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_AIM_MEMBER_WIDTH AIM_SORT_SORT_BY_WIDTH
#define AIM_SORT_SORT_BY_TEXT_X AIM_SORT_SORT_BY_X + 9
#define AIM_SORT_SORT_BY_TEXT_Y AIM_SORT_SORT_BY_Y + 8
#define AIM_SORT_SORT_BY_TEXT_X AIM_SORT_SORT_BY_X + 9
#define AIM_SORT_SORT_BY_TEXT_Y AIM_SORT_SORT_BY_Y + 8
#define AIM_SORT_PRICE_TEXT_X AIM_SORT_SORT_BY_X + 22
#define AIM_SORT_PRICE_TEXT_Y AIM_SORT_SORT_BY_Y + 36
@@ -53,52 +55,79 @@
#define AIM_SORT_EXP_TEXT_X AIM_SORT_PRICE_TEXT_X
#define AIM_SORT_EXP_TEXT_Y AIM_SORT_PRICE_TEXT_Y + 13
#define AIM_SORT_MARKMNSHP_TEXT_X AIM_SORT_PRICE_TEXT_X
#define AIM_SORT_MARKMNSHP_TEXT_Y AIM_SORT_EXP_TEXT_Y + 13
#define AIM_SORT_MARKMNSHP_TEXT_X AIM_SORT_PRICE_TEXT_X
#define AIM_SORT_MARKMNSHP_TEXT_Y AIM_SORT_EXP_TEXT_Y + 13
#define AIM_SORT_MEDICAL_X AIM_SORT_SORT_BY_X + 125
#define AIM_SORT_MEDICAL_Y AIM_SORT_PRICE_TEXT_Y
#define AIM_SORT_MECHANICAL_X AIM_SORT_SORT_BY_X + 118
#define AIM_SORT_MECHANICAL_Y AIM_SORT_PRICE_TEXT_Y
#define AIM_SORT_EXPLOSIVES_X AIM_SORT_MEDICAL_X
#define AIM_SORT_EXPLOSIVES_X AIM_SORT_MECHANICAL_X
#define AIM_SORT_EXPLOSIVES_Y AIM_SORT_EXP_TEXT_Y
#define AIM_SORT_MECHANICAL_X AIM_SORT_MEDICAL_X
#define AIM_SORT_MECHANICAL_Y AIM_SORT_MARKMNSHP_TEXT_Y
#define AIM_SORT_MEDICAL_X AIM_SORT_MECHANICAL_X
#define AIM_SORT_MEDICAL_Y AIM_SORT_MARKMNSHP_TEXT_Y
#define AIM_SORT_ASC_DESC_WIDTH 100
#define AIM_SORT_ASCEND_TEXT_X AIM_SORT_SORT_BY_X + 154 - AIM_SORT_ASC_DESC_WIDTH - 4 + 18
#define AIM_SORT_ASCEND_TEXT_Y iScreenHeightOffset + 128 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_HEALTH_X AIM_SORT_SORT_BY_X + 214
#define AIM_SORT_HEALTH_Y AIM_SORT_PRICE_TEXT_Y
#define AIM_SORT_DESCEND_TEXT_X AIM_SORT_ASCEND_TEXT_X
#define AIM_SORT_DESCEND_TEXT_Y iScreenHeightOffset + 141 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_AGILITY_X AIM_SORT_HEALTH_X
#define AIM_SORT_AGILITY_Y AIM_SORT_EXP_TEXT_Y
#define AIM_SORT_DEXTERITY_X AIM_SORT_HEALTH_X
#define AIM_SORT_DEXTERITY_Y AIM_SORT_MARKMNSHP_TEXT_Y
#define AIM_SORT_STRENGTH_X AIM_SORT_SORT_BY_X + 310
#define AIM_SORT_STRENGTH_Y AIM_SORT_PRICE_TEXT_Y
#define AIM_SORT_LEADERSHP_X AIM_SORT_STRENGTH_X
#define AIM_SORT_LEADERSHP_Y AIM_SORT_EXP_TEXT_Y
#define AIM_SORT_WISDOM_X AIM_SORT_STRENGTH_X
#define AIM_SORT_WISDOM_Y AIM_SORT_MARKMNSHP_TEXT_Y
#define AIM_SORT_NAME_X AIM_SORT_PRICE_TEXT_X
#define AIM_SORT_NAME_Y AIM_SORT_PRICE_TEXT_Y - 13
#define AIM_SORT_ASC_DESC_WIDTH 100
#define AIM_SORT_ASCEND_TEXT_X AIM_SORT_SORT_BY_X + 354 - AIM_SORT_ASC_DESC_WIDTH - 4 + 18
#define AIM_SORT_ASCEND_TEXT_Y iScreenHeightOffset + 128 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_DESCEND_TEXT_X AIM_SORT_ASCEND_TEXT_X
#define AIM_SORT_DESCEND_TEXT_Y iScreenHeightOffset + 141 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_MUGSHOT_TEXT_X iScreenWidthOffset + 266
#define AIM_SORT_MUGSHOT_TEXT_Y iScreenHeightOffset + 230 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_MUGSHOT_TEXT_X iScreenWidthOffset + 266
#define AIM_SORT_MUGSHOT_TEXT_Y iScreenHeightOffset + 230 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_MERC_STATS_TEXT_X AIM_SORT_MUGSHOT_TEXT_X
#define AIM_SORT_MERC_STATS_TEXT_Y iScreenHeightOffset + 293 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_MERC_STATS_TEXT_X AIM_SORT_MUGSHOT_TEXT_X
#define AIM_SORT_MERC_STATS_TEXT_Y iScreenHeightOffset + 293 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_ALUMNI_TEXT_X AIM_SORT_MUGSHOT_TEXT_X
#define AIM_SORT_ALUMNI_TEXT_Y iScreenHeightOffset + 351 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_ALUMNI_TEXT_X AIM_SORT_MUGSHOT_TEXT_X
#define AIM_SORT_ALUMNI_TEXT_Y iScreenHeightOffset + 351 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_SORT_FIRST_SORT_CLOUMN_GAP 22
//#define AIM_SORT_FIRST_SORT_COLUMN_GAP 22 //unused
#define AIM_SORT_SORT_BY_X IMAGE_OFFSET_X + 155
#define AIM_SORT_SORT_BY_Y IMAGE_OFFSET_Y + 96
#define AIM_SORT_SORT_BY_WIDTH 190
#define AIM_SORT_SORT_BY_HEIGHT 81
#define AIM_SORT_SORT_BY_X IMAGE_OFFSET_X + 53
#define AIM_SORT_SORT_BY_Y IMAGE_OFFSET_Y + 96
#define AIM_SORT_SORT_BY_WIDTH 394
#define AIM_SORT_SORT_BY_HEIGHT 81
UINT16 AimSortCheckBoxLoc[]={
(AIM_SORT_SORT_BY_X + 9), (AIM_SORT_SORT_BY_Y + 34),
(AIM_SORT_SORT_BY_X + 9), (AIM_SORT_SORT_BY_Y + 47),
(AIM_SORT_SORT_BY_X + 9), (AIM_SORT_SORT_BY_Y + 60),
(AIM_SORT_SORT_BY_X + 111), (AIM_SORT_SORT_BY_Y + 34),
(AIM_SORT_SORT_BY_X + 111), (AIM_SORT_SORT_BY_Y + 47),
(AIM_SORT_SORT_BY_X + 111), (AIM_SORT_SORT_BY_Y + 60),
(AIM_SORT_SORT_BY_X + 172), (AIM_SORT_SORT_BY_Y + 4),
(AIM_SORT_SORT_BY_X + 172), (AIM_SORT_SORT_BY_Y + 17)};
(AIM_SORT_SORT_BY_X + 105), (AIM_SORT_SORT_BY_Y + 34),
(AIM_SORT_SORT_BY_X + 105), (AIM_SORT_SORT_BY_Y + 47),
(AIM_SORT_SORT_BY_X + 105), (AIM_SORT_SORT_BY_Y + 60),
(AIM_SORT_SORT_BY_X + 201), (AIM_SORT_SORT_BY_Y + 34),
(AIM_SORT_SORT_BY_X + 201), (AIM_SORT_SORT_BY_Y + 47),
(AIM_SORT_SORT_BY_X + 201), (AIM_SORT_SORT_BY_Y + 60),
(AIM_SORT_SORT_BY_X + 297), (AIM_SORT_SORT_BY_Y + 34),
(AIM_SORT_SORT_BY_X + 297), (AIM_SORT_SORT_BY_Y + 47),
(AIM_SORT_SORT_BY_X + 297), (AIM_SORT_SORT_BY_Y + 60),
(AIM_SORT_SORT_BY_X + 9), (AIM_SORT_SORT_BY_Y + 21),
(AIM_SORT_SORT_BY_X + 372), (AIM_SORT_SORT_BY_Y + 4),
(AIM_SORT_SORT_BY_X + 372), (AIM_SORT_SORT_BY_Y + 17)};
UINT8 gubCurrentSortMode;
UINT8 gubOldSortMode;
@@ -110,11 +139,11 @@ UINT8 gubOldListMode;
MOUSE_REGION gSelectedToMugShotRegion;
void SelectToMugShotRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on ToStats
//Clicking on To Stats
MOUSE_REGION gSelectedToStatsRegion;
void SelectToStatsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on ToStats
//Clicking on To Archive
MOUSE_REGION gSelectedToArchiveRegion;
void SelectToArchiveRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
@@ -127,15 +156,36 @@ void SelectExpBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Markmanship Check Box
MOUSE_REGION gSelectedMarkBoxRegion;
void SelectMarkBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Medical Check box
MOUSE_REGION gSelectedMedicalBoxRegion;
void SelectMedicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Explosive Check Box
MOUSE_REGION gSelectedExplosiveBoxRegion;
void SelectExplosiveBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Mechanical Check Box
MOUSE_REGION gSelectedMechanicalBoxRegion;
void SelectMechanicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Explosive Check Box
MOUSE_REGION gSelectedExplosiveBoxRegion;
void SelectExplosiveBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Medical Check box
MOUSE_REGION gSelectedMedicalBoxRegion;
void SelectMedicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Health Check box
MOUSE_REGION gSelectedHealthBoxRegion;
void SelectHealthBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Agility Check box
MOUSE_REGION gSelectedAgilityBoxRegion;
void SelectAgilityBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Dexterity Check box
MOUSE_REGION gSelectedDexterityBoxRegion;
void SelectDexterityBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Strength Check box
MOUSE_REGION gSelectedStrengthBoxRegion;
void SelectStrengthBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Leadership Check box
MOUSE_REGION gSelectedLeadershipBoxRegion;
void SelectLeadershipBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Wisdom Check box
MOUSE_REGION gSelectedWisdomBoxRegion;
void SelectWisdomBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Name Check box
MOUSE_REGION gSelectedNameBoxRegion;
void SelectNameBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Clicking on Ascending Check Box
MOUSE_REGION gSelectedAscendBoxRegion;
void SelectAscendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
@@ -158,13 +208,14 @@ UINT32 guiToStats;
UINT32 guiSelectLight;
//Hotkey Assignment
void HandleAimSortKeyBoardInput();
void GameInitAimSort()
{
gubCurrentSortMode=0;
gubOldSortMode=0;
gubCurrentSortMode=12;
gubOldSortMode=12;
gubCurrentListMode=AIM_DESCEND;
gubOldListMode=AIM_DESCEND;
}
@@ -181,16 +232,31 @@ BOOLEAN EnterAimSort()
AimSortCheckBoxLoc[3] = AIM_SORT_SORT_BY_Y + 47;
AimSortCheckBoxLoc[4] = AIM_SORT_SORT_BY_X + 9;
AimSortCheckBoxLoc[5] = AIM_SORT_SORT_BY_Y + 60;
AimSortCheckBoxLoc[6] = AIM_SORT_SORT_BY_X + 111;
AimSortCheckBoxLoc[6] = AIM_SORT_SORT_BY_X + 105;
AimSortCheckBoxLoc[7] = AIM_SORT_SORT_BY_Y + 34;
AimSortCheckBoxLoc[8] = AIM_SORT_SORT_BY_X + 111;
AimSortCheckBoxLoc[8] = AIM_SORT_SORT_BY_X + 105;
AimSortCheckBoxLoc[9] = AIM_SORT_SORT_BY_Y + 47;
AimSortCheckBoxLoc[10] = AIM_SORT_SORT_BY_X + 111;
AimSortCheckBoxLoc[10] = AIM_SORT_SORT_BY_X + 105;
AimSortCheckBoxLoc[11] = AIM_SORT_SORT_BY_Y + 60;
AimSortCheckBoxLoc[12] = AIM_SORT_SORT_BY_X + 172;
AimSortCheckBoxLoc[13] = AIM_SORT_SORT_BY_Y + 4;
AimSortCheckBoxLoc[14] = AIM_SORT_SORT_BY_X + 172;
AimSortCheckBoxLoc[15] = AIM_SORT_SORT_BY_Y + 17;
AimSortCheckBoxLoc[12] = AIM_SORT_SORT_BY_X + 201;
AimSortCheckBoxLoc[13] = AIM_SORT_SORT_BY_Y + 34;
AimSortCheckBoxLoc[14] = AIM_SORT_SORT_BY_X + 201;
AimSortCheckBoxLoc[15] = AIM_SORT_SORT_BY_Y + 47;
AimSortCheckBoxLoc[16] = AIM_SORT_SORT_BY_X + 201;
AimSortCheckBoxLoc[17] = AIM_SORT_SORT_BY_Y + 60;
AimSortCheckBoxLoc[18] = AIM_SORT_SORT_BY_X + 297;
AimSortCheckBoxLoc[19] = AIM_SORT_SORT_BY_Y + 34;
AimSortCheckBoxLoc[20] = AIM_SORT_SORT_BY_X + 297;
AimSortCheckBoxLoc[21] = AIM_SORT_SORT_BY_Y + 47;
AimSortCheckBoxLoc[22] = AIM_SORT_SORT_BY_X + 297;
AimSortCheckBoxLoc[23] = AIM_SORT_SORT_BY_Y + 60;
AimSortCheckBoxLoc[24] = AIM_SORT_SORT_BY_X + 9;
AimSortCheckBoxLoc[25] = AIM_SORT_SORT_BY_Y + 21;
//Ascending & Descending Check Box
AimSortCheckBoxLoc[26] = AIM_SORT_SORT_BY_X + 372;
AimSortCheckBoxLoc[27] = AIM_SORT_SORT_BY_Y + 4;
AimSortCheckBoxLoc[28] = AIM_SORT_SORT_BY_X + 372;
AimSortCheckBoxLoc[29] = AIM_SORT_SORT_BY_Y + 17;
InitAimDefaults();
@@ -233,7 +299,7 @@ BOOLEAN EnterAimSort()
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToStatsRegionCallBack );
MSYS_AddRegion(&gSelectedToStatsRegion);
//Mouse region for the ToArhciveRegion
//Mouse region for the ToArchiveRegion
MSYS_DefineRegion( &gSelectedToArchiveRegion, AIM_SORT_TO_ALUMNI_X, AIM_SORT_TO_ALUMNI_Y, (AIM_SORT_TO_ALUMNI_X + AIM_SORT_TO_ALUMNI_SIZE), (AIM_SORT_TO_ALUMNI_Y + AIM_SORT_TO_ALUMNI_SIZE), MSYS_PRIORITY_HIGH,
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToArchiveRegionCallBack );
MSYS_AddRegion(&gSelectedToArchiveRegion);
@@ -263,29 +329,76 @@ BOOLEAN EnterAimSort()
MSYS_AddRegion(&gSelectedMarkBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMMEDICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Medical Check Box
MSYS_DefineRegion( &gSelectedMedicalBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMedicalBoxRegionCallBack );
MSYS_AddRegion(&gSelectedMedicalBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[EXPLOSIVES], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Explosive Check Box
MSYS_DefineRegion( &gSelectedExplosiveBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectExplosiveBoxRegionCallBack );
MSYS_AddRegion(&gSelectedExplosiveBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMMECHANICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
ubWidth = StringPixLength( AimSortText[AIMMECHANICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MECHANICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Mechanical Check Box
MSYS_DefineRegion( &gSelectedMechanicalBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMechanicalBoxRegionCallBack );
MSYS_AddRegion(&gSelectedMechanicalBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMEXPLOSIVES], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MECHANICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Explosive Check Box
MSYS_DefineRegion( &gSelectedExplosiveBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectExplosiveBoxRegionCallBack );
MSYS_AddRegion(&gSelectedExplosiveBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMMEDICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MECHANICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Medical Check Box
MSYS_DefineRegion( &gSelectedMedicalBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMedicalBoxRegionCallBack );
MSYS_AddRegion(&gSelectedMedicalBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMHEALTH], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_HEALTH_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Health Check Box
MSYS_DefineRegion( &gSelectedHealthBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectHealthBoxRegionCallBack );
MSYS_AddRegion(&gSelectedHealthBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMAGILITY], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_HEALTH_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Agility Check Box
MSYS_DefineRegion( &gSelectedAgilityBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectAgilityBoxRegionCallBack );
MSYS_AddRegion(&gSelectedAgilityBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMDEXTERITY], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_HEALTH_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Dexterity Check Box
MSYS_DefineRegion( &gSelectedDexterityBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectDexterityBoxRegionCallBack );
MSYS_AddRegion(&gSelectedDexterityBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMSTRENGTH], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_STRENGTH_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Strength Check Box
MSYS_DefineRegion( &gSelectedStrengthBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectStrengthBoxRegionCallBack );
MSYS_AddRegion(&gSelectedStrengthBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMLEADERSHIP], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_STRENGTH_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Leadership Check Box
MSYS_DefineRegion( &gSelectedLeadershipBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectLeadershipBoxRegionCallBack );
MSYS_AddRegion(&gSelectedLeadershipBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[AIMWISDOM], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_STRENGTH_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Wisdom Check Box
MSYS_DefineRegion( &gSelectedWisdomBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectWisdomBoxRegionCallBack );
MSYS_AddRegion(&gSelectedWisdomBoxRegion);
ubCurNumber+=2;
ubWidth = StringPixLength( AimSortText[NAME], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_NAME_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
//Mouse region for the Name Check Box
MSYS_DefineRegion( &gSelectedNameBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectNameBoxRegionCallBack );
MSYS_AddRegion(&gSelectedNameBoxRegion);
ubCurNumber+=2;
ubWidth = AimSortCheckBoxLoc[ ubCurNumber ] - StringPixLength( AimSortText[ASCENDING], AIM_SORT_FONT_SORT_TEXT) - 6;
//Mouse region for the Ascend Check Box
MSYS_DefineRegion( &gSelectedAscendBoxRegion, ubWidth , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)(AimSortCheckBoxLoc[ ubCurNumber ] + AIM_SORT_CHECKBOX_SIZE), (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
@@ -328,9 +441,16 @@ void ExitAimSort()
MSYS_RemoveRegion( &gSelectedPriceBoxRegion);
MSYS_RemoveRegion( &gSelectedExpBoxRegion);
MSYS_RemoveRegion( &gSelectedMarkBoxRegion);
MSYS_RemoveRegion( &gSelectedMedicalBoxRegion);
MSYS_RemoveRegion( &gSelectedExplosiveBoxRegion);
MSYS_RemoveRegion( &gSelectedMechanicalBoxRegion);
MSYS_RemoveRegion( &gSelectedExplosiveBoxRegion);
MSYS_RemoveRegion( &gSelectedMedicalBoxRegion);
MSYS_RemoveRegion( &gSelectedHealthBoxRegion);
MSYS_RemoveRegion( &gSelectedAgilityBoxRegion);
MSYS_RemoveRegion( &gSelectedDexterityBoxRegion);
MSYS_RemoveRegion( &gSelectedStrengthBoxRegion);
MSYS_RemoveRegion( &gSelectedLeadershipBoxRegion);
MSYS_RemoveRegion( &gSelectedWisdomBoxRegion);
MSYS_RemoveRegion( &gSelectedNameBoxRegion);
MSYS_RemoveRegion( &gSelectedAscendBoxRegion);
MSYS_RemoveRegion( &gSelectedDescendBoxRegion);
ExitAimMenuBar();
@@ -339,7 +459,7 @@ void ExitAimSort()
void HandleAimSort()
{
HandleAimSortKeyBoardInput();
}
void RenderAimSort()
@@ -380,9 +500,16 @@ void RenderAimSort()
DrawTextToScreen(AimSortText[PRICE], AIM_SORT_PRICE_TEXT_X, AIM_SORT_PRICE_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[EXPERIENCE], AIM_SORT_EXP_TEXT_X, AIM_SORT_EXP_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMMARKSMANSHIP], AIM_SORT_MARKMNSHP_TEXT_X, AIM_SORT_MARKMNSHP_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMMEDICAL], AIM_SORT_MEDICAL_X, AIM_SORT_MEDICAL_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[EXPLOSIVES], AIM_SORT_EXPLOSIVES_X, AIM_SORT_EXPLOSIVES_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMMECHANICAL], AIM_SORT_MECHANICAL_X, AIM_SORT_MECHANICAL_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMEXPLOSIVES], AIM_SORT_EXPLOSIVES_X, AIM_SORT_EXPLOSIVES_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMMEDICAL], AIM_SORT_MEDICAL_X, AIM_SORT_MEDICAL_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMHEALTH], AIM_SORT_HEALTH_X, AIM_SORT_HEALTH_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMAGILITY], AIM_SORT_AGILITY_X, AIM_SORT_AGILITY_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMDEXTERITY], AIM_SORT_DEXTERITY_X, AIM_SORT_DEXTERITY_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMSTRENGTH], AIM_SORT_STRENGTH_X, AIM_SORT_STRENGTH_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMLEADERSHIP], AIM_SORT_LEADERSHP_X, AIM_SORT_LEADERSHP_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[AIMWISDOM], AIM_SORT_WISDOM_X, AIM_SORT_WISDOM_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[NAME], AIM_SORT_NAME_X, AIM_SORT_NAME_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[ASCENDING], AIM_SORT_ASCEND_TEXT_X, AIM_SORT_ASCEND_TEXT_Y, AIM_SORT_ASC_DESC_WIDTH, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
DrawTextToScreen(AimSortText[DESCENDING], AIM_SORT_DESCEND_TEXT_X, AIM_SORT_DESCEND_TEXT_Y, AIM_SORT_ASC_DESC_WIDTH, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_COLOR_SORT_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
@@ -393,6 +520,24 @@ void RenderAimSort()
DrawTextToScreen(AimSortText[MERCENARY_FILES], AIM_SORT_MERC_STATS_TEXT_X, AIM_SORT_MERC_STATS_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_LINK_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(AimSortText[ALUMNI_GALLERY], AIM_SORT_ALUMNI_TEXT_X, AIM_SORT_ALUMNI_TEXT_Y, 0, AIM_SORT_FONT_SORT_TEXT, AIM_SORT_LINK_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
// pre-render unchecked box
DrawSelectLight(0, AIM_SORT_OFF);
DrawSelectLight(1, AIM_SORT_OFF);
DrawSelectLight(2, AIM_SORT_OFF);
DrawSelectLight(3, AIM_SORT_OFF);
DrawSelectLight(4, AIM_SORT_OFF);
DrawSelectLight(5, AIM_SORT_OFF);
DrawSelectLight(6, AIM_SORT_OFF);
DrawSelectLight(7, AIM_SORT_OFF);
DrawSelectLight(8, AIM_SORT_OFF);
DrawSelectLight(9, AIM_SORT_OFF);
DrawSelectLight(10, AIM_SORT_OFF);
DrawSelectLight(11, AIM_SORT_OFF);
DrawSelectLight(12, AIM_SORT_OFF);
DrawSelectLight(AIM_ASCEND, AIM_SORT_OFF);
DrawSelectLight(AIM_DESCEND, AIM_SORT_OFF);
// highlight checked box
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
DrawSelectLight(gubCurrentListMode, AIM_SORT_ON);
@@ -526,7 +671,7 @@ void SelectMarkBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
void SelectMedicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
void SelectMechanicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
@@ -572,7 +717,7 @@ void SelectExplosiveBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
void SelectMechanicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
void SelectMedicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
@@ -595,6 +740,176 @@ void SelectMechanicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
void SelectHealthBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
}
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if(gubCurrentSortMode != 6)
{
gubCurrentSortMode = 6;
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
gubOldSortMode = gubCurrentSortMode;
}
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
}
}
void SelectAgilityBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
}
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if(gubCurrentSortMode != 7)
{
gubCurrentSortMode = 7;
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
gubOldSortMode = gubCurrentSortMode;
}
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
}
}
void SelectDexterityBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
}
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if(gubCurrentSortMode != 8)
{
gubCurrentSortMode = 8;
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
gubOldSortMode = gubCurrentSortMode;
}
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
}
}
void SelectStrengthBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
}
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if(gubCurrentSortMode != 9)
{
gubCurrentSortMode = 9;
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
gubOldSortMode = gubCurrentSortMode;
}
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
}
}
void SelectLeadershipBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
}
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if(gubCurrentSortMode != 10)
{
gubCurrentSortMode = 10;
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
gubOldSortMode = gubCurrentSortMode;
}
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
}
}
void SelectWisdomBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
}
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if(gubCurrentSortMode != 11)
{
gubCurrentSortMode = 11;
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
gubOldSortMode = gubCurrentSortMode;
}
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
}
}
void SelectNameBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
}
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if(gubCurrentSortMode != 12)
{
gubCurrentSortMode = 12;
DrawSelectLight(gubCurrentSortMode, AIM_SORT_ON);
DrawSelectLight(gubOldSortMode, AIM_SORT_OFF);
gubOldSortMode = gubCurrentSortMode;
// Name sort in descending order only
if(gubCurrentListMode != AIM_DESCEND)
{
gubCurrentListMode = AIM_DESCEND;
DrawSelectLight(gubCurrentListMode, AIM_SORT_ON);
DrawSelectLight(gubOldListMode, AIM_SORT_OFF);
gubOldListMode = gubCurrentListMode;
}
}
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
}
}
void SelectAscendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
@@ -603,7 +918,8 @@ void SelectAscendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
}
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if(gubCurrentListMode != AIM_ASCEND)
// Name sort in descending order only
if(gubCurrentListMode != AIM_ASCEND && (gubCurrentSortMode != 12))
{
gubCurrentListMode = AIM_ASCEND;
DrawSelectLight(gubCurrentListMode, AIM_SORT_ON);
@@ -626,7 +942,7 @@ void SelectDescendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
}
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
if(gubCurrentListMode != AIM_DESCEND )
if(gubCurrentListMode != AIM_DESCEND)
{
gubCurrentListMode = AIM_DESCEND;
DrawSelectLight(gubCurrentListMode, AIM_SORT_ON);
@@ -688,17 +1004,45 @@ INT32 QsortCompare( const void *pNum1, const void *pNum2)
case 2:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMarksmanship, (INT32)gMercProfiles[Num2].bMarksmanship ) );
break;
//Medical INT16 bMedical
//Mechanical INT16 bMechanical
case 3:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMedical, (INT32)gMercProfiles[Num2].bMedical ) );
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMechanical, (INT32)gMercProfiles[Num2].bMechanical ) );
break;
//Explosives INT16 bExplosive
case 4:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bExplosive, (INT32)gMercProfiles[Num2].bExplosive ) );
break;
//Mechanical INT16 bMechanical
//Medical INT16 bMedical
case 5:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMechanical, (INT32)gMercProfiles[Num2].bMechanical ) );
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMedical, (INT32)gMercProfiles[Num2].bMedical ) );
break;
//Health INT16 bLifeMax
case 6:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bLifeMax, (INT32)gMercProfiles[Num2].bLifeMax ) );
break;
//Agility INT16 bAgility
case 7:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bAgility, (INT32)gMercProfiles[Num2].bAgility ) );
break;
//Dexterity INT16 bDexterity
case 8:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bDexterity, (INT32)gMercProfiles[Num2].bDexterity ) );
break;
//Strength INT16 bStrength
case 9:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bStrength, (INT32)gMercProfiles[Num2].bStrength ) );
break;
//Leadership INT16 bLeadership
case 10:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bLeadership, (INT32)gMercProfiles[Num2].bLeadership ) );
break;
//Wisdom INT16 bWisdom
case 11:
return( CompareValue((INT32)gMercProfiles[ Num1 ].bWisdom, (INT32)gMercProfiles[Num2].bWisdom ) );
break;
//Name CHAR16 zNickname
case 12:
return( wcscmp(gMercProfiles[ Num1 ].zNickname, gMercProfiles[Num2].zNickname ) );
break;
default:
@@ -740,7 +1084,37 @@ INT32 CompareValue(const INT32 Num1, const INT32 Num2)
void HandleAimSortKeyBoardInput()
{
InputAtom InputEvent;
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
#else
while (DequeueEvent(&InputEvent) == TRUE)
#endif
{//!HandleTextInput( &InputEvent ) &&
if( InputEvent.usEvent == KEY_DOWN )
{
switch (InputEvent.usParam)
{
case BACKSPACE:
guiCurrentLaptopMode = LAPTOP_MODE_AIM;
break;
case 'a':
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_ARCHIVES;
break;
case 'f':
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS;
break;
case 'm':
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_FACIAL_INDEX;
break;
default:
HandleKeyBoardShortCutsForLapTop( InputEvent.usEvent, InputEvent.usParam, InputEvent.usKeyState );
break;
}
}
}
}
+2 -2
View File
@@ -6,8 +6,8 @@ extern UINT8 gubCurrentListMode;
#define AIM_ASCEND 6
#define AIM_DESCEND 7
#define AIM_ASCEND 13
#define AIM_DESCEND 14
void GameInitAimSort();
+41 -1
View File
@@ -15,6 +15,8 @@
#include "LaptopSave.h"
#include "Multi Language Graphic Utils.h"
#include "GameSettings.h"
#include "english.h"
#include "sysutil.h"
#endif
#include "LocalizedStrings.h"
@@ -205,6 +207,10 @@ UINT8 GetNextAimAd( UINT8 ubCurrentAd );
BOOLEAN fFirstTimeIn=TRUE;
//Hotkey Assignment
void HandleAimKeyBoardInput();
//
// *********************** Functions *************************
//
@@ -349,6 +355,8 @@ void HandleAIM()
{
HandleAdAndWarningArea( gfInitAdArea, FALSE );
gfInitAdArea = FALSE;
HandleAimKeyBoardInput();
}
void RenderAIM()
@@ -1303,8 +1311,40 @@ UINT8 GetNextAimAd( UINT8 ubCurrentAd )
void HandleAimKeyBoardInput()
{
InputAtom InputEvent;
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
#else
while (DequeueEvent(&InputEvent) == TRUE)
#endif
{//!HandleTextInput( &InputEvent ) &&
if( InputEvent.usEvent == KEY_DOWN )
{
switch (InputEvent.usParam)
{
case 'h':
guiCurrentLaptopMode = LAPTOP_MODE_AIM_HISTORY;
break;
case 'l':
guiCurrentLaptopMode = LAPTOP_MODE_AIM_LINKS;
break;
case 'm':
if(!fFirstTimeIn)
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES;
break;
case 'p':
guiCurrentLaptopMode = LAPTOP_MODE_AIM_POLICIES;
break;
default:
HandleKeyBoardShortCutsForLapTop( InputEvent.usEvent, InputEvent.usParam, InputEvent.usKeyState );
break;
}
}
}
}
+18 -4
View File
@@ -1280,9 +1280,16 @@ enum
PRICE,
EXPERIENCE,
AIMMARKSMANSHIP,
AIMMEDICAL,
EXPLOSIVES,
AIMMECHANICAL,
AIMEXPLOSIVES,
AIMMEDICAL,
AIMHEALTH,
AIMAGILITY,
AIMDEXTERITY,
AIMSTRENGTH,
AIMLEADERSHIP,
AIMWISDOM,
NAME,
MUGSHOT_INDEX,
MERCENARY_FILES,
ALUMNI_GALLERY,
@@ -1426,9 +1433,16 @@ enum
AIM_FI_PRICE,
AIM_FI_EXP,
AIM_FI_MARKSMANSHIP,
AIM_FI_MEDICAL,
AIM_FI_MECHANICAL,
AIM_FI_EXPLOSIVES,
AIM_FI_MECHANICAL,
AIM_FI_MEDICAL,
AIM_FI_HEALTH,
AIM_FI_AGILITY,
AIM_FI_DEXTERITY,
AIM_FI_STRENGTH,
AIM_FI_LEADERSHIP,
AIM_FI_WISDOM,
AIM_FI_NAME,
AIM_FI_AIM_MEMBERS_SORTED_ASCENDING,
AIM_FI_AIM_MEMBERS_SORTED_DESCENDING,
AIM_FI_LEFT_CLICK,
+18 -4
View File
@@ -4529,9 +4529,16 @@ STR16 AimSortText[] =
L"薪金", //"Price",
L"级别", //"Experience",
L"枪法", //"Marksmanship",
L"医疗", //"Medical",
L"爆破", //"Explosives",
L"机械", //"Mechanical",
L"爆破", //"Explosives",
L"医疗", //"Medical",
L"生命", //"Health",
L"敏捷", //"Agility",
L"灵巧", //"Dexterity",
L"力量", //"Strength",
L"领导", //"Leadership",
L"智慧", //"Wisdom",
L"姓名", //"Name",
//Text of the links to other AIM pages
@@ -4725,9 +4732,16 @@ STR16 AimFiText[] =
L"薪金", //"Price",
L"级别", //"Experience",
L"枪法", //"Marksmanship",
L"医疗", //"Medical",
L"爆破", //"Explosives",
L"机械", //"Mechanical",
L"爆破", //"Explosives",
L"医疗", //"Medical",
L"生命", //"Health",
L"敏捷", //"Agility",
L"灵巧", //"Dexterity",
L"力量", //"Strength",
L"领导", //"Leadership",
L"智慧", //"Wisdom",
L"姓名", //"Name",
// The title of the page, the above text gets added at the end of this text
+19 -5
View File
@@ -4528,12 +4528,19 @@ STR16 AimSortText[] =
// sort by...
L"Prijs",
L"Prijs",
L"Ervaring",
L"Trefzekerheid",
L"Medisch",
L"Explosieven",
L"Technisch",
L"Explosieven",
L"Medisch",
L"Gezondheid",
L"Beweeglijkheid",
L"Handigheid",
L"Kracht",
L"Leiderschap",
L"Wijsheid",
L"Naam",
//Text of the links to other AIM pages
@@ -4727,9 +4734,16 @@ STR16 AimFiText[] =
L"Prijs",
L"Ervaring",
L"Trefzekerheid",
L"Medisch",
L"Explosieven",
L"Technisch",
L"Explosieven",
L"Medisch",
L"Gezondheid",
L"Beweeglijkheid",
L"Handigheid",
L"Kracht",
L"Leiderschap",
L"Wijsheid",
L"Naam",
// The title of the page, the above text gets added at the end of this text
+18 -4
View File
@@ -4528,9 +4528,16 @@ STR16 AimSortText[] =
L"Price",
L"Experience",
L"Marksmanship",
L"Medical",
L"Explosives",
L"Mechanical",
L"Explosives",
L"Medical",
L"Health",
L"Agility",
L"Dexterity",
L"Strength",
L"Leadership",
L"Wisdom",
L"Name",
//Text of the links to other AIM pages
@@ -4724,9 +4731,16 @@ STR16 AimFiText[] =
L"Price",
L"Experience",
L"Marksmanship",
L"Medical",
L"Explosives",
L"Mechanical",
L"Explosives",
L"Medical",
L"Health",
L"Agility",
L"Dexterity",
L"Strength",
L"Leadership",
L"Wisdom",
L"Name",
// The title of the page, the above text gets added at the end of this text
+22 -8
View File
@@ -4518,12 +4518,19 @@ STR16 AimSortText[] =
// sort by...
L"Prix",
L"Prix",
L"Expérience",
L"Tir",
L"Médecine",
L"Explosifs",
L"Mécanique",
L"Explosifs",
L"Médecine",
L"Santé",
L"Agilité",
L"Dextérité",
L"Force",
L"Commandement",
L"Sagesse",
L"Nom",
//Text of the links to other AIM pages
@@ -4575,9 +4582,9 @@ STR16 CharacterInfo[] =
{
// The various attributes of the merc
L"Santé",
L"Agilité",
L"Dextérité",
L"Santé",
L"Agilité",
L"Dextérité",
L"Force",
L"Commandement",
L"Sagesse",
@@ -4717,9 +4724,16 @@ STR16 AimFiText[] =
L"Prix",
L"Expérience",
L"Tir",
L"Médecine",
L"Explosifs",
L"Mécanique",
L"Explosifs",
L"Médecine",
L"Santé",
L"Agilité",
L"Dextérité",
L"Force",
L"Commandement",
L"Sagesse",
L"Nom",
// The title of the page, the above text gets added at the end of this text
+22 -8
View File
@@ -4418,12 +4418,19 @@ STR16 AimSortText[] =
// sort by...
L"Preis",
L"Preis",
L"Erfahrung",
L"Treffsicherheit",
L"Medizin",
L"Sprengstoff",
L"Technik",
L"Sprengstoff",
L"Medizin",
L"Gesundheit",
L"Beweglichkeit",
L"Geschicklichkeit",
L"Kraft",
L"Führungsqualität",
L"Weisheit",
L"Name",
//Text of the links to other AIM pages
@@ -4469,9 +4476,9 @@ STR16 CharacterInfo[] =
{
// The various attributes of the merc
L"Gesundheit",
L"Beweglichkeit",
L"Geschicklichkeit",
L"Gesundheit",
L"Beweglichkeit",
L"Geschicklichkeit",
L"Kraft",
L"Führungsqualität",
L"Weisheit",
@@ -4596,9 +4603,16 @@ STR16 AimFiText[] =
L"Preis",
L"Erfahrung",
L"Treffsicherheit",
L"Medizin",
L"Sprengstoff",
L"Technik",
L"Sprengstoff",
L"Medizin",
L"Gesundheit",
L"Beweglichkeit",
L"Geschicklichkeit",
L"Kraft",
L"Führungsqualität",
L"Weisheit",
L"Name",
// The title of the page, the above text gets added at the end of this text
L"A.I.M.-Mitglieder ansteigend sortiert nach %s",
+23 -9
View File
@@ -4515,12 +4515,19 @@ STR16 AimSortText[] =
// sort by...
L"Prezzo",
L"Prezzo",
L"Esperienza",
L"Mira",
L"Pronto socc.",
L"Esplosivi",
L"Meccanica",
L"Esplosivi",
L"Pronto socc.",
L"Salute",
L"Agilità",
L"Destrezza",
L"Forza",
L"Comando",
L"Saggezza",
L"Nome",
//Text of the links to other AIM pages
@@ -4572,9 +4579,9 @@ STR16 CharacterInfo[] =
{
// The various attributes of the merc
L"Salute",
L"Agilità",
L"Destrezza",
L"Salute",
L"Agilità",
L"Destrezza",
L"Forza",
L"Comando",
L"Saggezza",
@@ -4711,12 +4718,19 @@ STR16 AimFiText[] =
{
// displays the way in which the mercs were sorted
L"Prezzo ",
L"Prezzo",
L"Esperienza",
L"Mira",
L"Pronto socc.",
L"Esplosivi",
L"Meccanica",
L"Esplosivi",
L"Pronto socc.",
L"Salute",
L"Agilità",
L"Destrezza",
L"Forza",
L"Comando",
L"Saggezza",
L"Nome",
// The title of the page, the above text gets added at the end of this text
+23 -9
View File
@@ -4524,12 +4524,19 @@ STR16 AimSortText[] =
// sort by...
L"Ceny",
L"Ceny",
L"DoŚwiadczenia",
L"Um. strzeleckich",
L"Um. med.",
L"Zn. mat. wyb.",
L"Zn. mechaniki",
L"Zn. mat. wyb.",
L"Um. med.",
L"Zdrowie",
L"ZwinnoŚć",
L"SprawnoŚć",
L"Siła",
L"Um. dowodzenia",
L"Inteligencja",
L"Nazwisko",
//Text of the links to other AIM pages
@@ -4720,12 +4727,19 @@ STR16 AimFiText[] =
{
// displays the way in which the mercs were sorted
L"ceny",
L"doŚwiadczenia",
L"um. strzeleckich",
L"um. medycznych",
L"zn. materiałów wyb.",
L"zn. mechaniki",
L"Ceny",
L"DoŚwiadczenia",
L"Um. strzeleckich",
L"Zn. mechaniki",
L"Zn. mat. wyb.",
L"Um. med.",
L"Zdrowie",
L"ZwinnoŚć",
L"SprawnoŚć",
L"Siła",
L"Um. dowodzenia",
L"Inteligencja",
L"Nazwisko",
// The title of the page, the above text gets added at the end of this text
+18 -4
View File
@@ -4532,9 +4532,16 @@ STR16 AimSortText[] =
L"Price",
L"Experience",
L"Marksmanship",
L"Medical",
L"Explosives",
L"Mechanical",
L"Explosives",
L"Medical",
L"Health",
L"Agility",
L"Dexterity",
L"Strength",
L"Leadership",
L"Wisdom",
L"Name",
//Text of the links to other AIM pages
@@ -4728,9 +4735,16 @@ STR16 AimFiText[] =
L"Price",
L"Experience",
L"Marksmanship",
L"Medical",
L"Explosives",
L"Mechanical",
L"Explosives",
L"Medical",
L"Health",
L"Agility",
L"Dexterity",
L"Strength",
L"Leadership",
L"Wisdom",
L"Name",
// The title of the page, the above text gets added at the end of this text