- Externalized Florist Delivery Locations by tagging to externalized BobbyR locations (by Buggler)

- Flower shipment now costs half of BobbyR's shipping rate (by Buggler)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5867 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-02-23 09:45:27 +00:00
parent 5d141e0746
commit de71a58bc4
2 changed files with 112 additions and 66 deletions
+6 -4
View File
@@ -77,8 +77,8 @@ enum
BR_DROP_DOWN_DISPLAY, BR_DROP_DOWN_DISPLAY,
}; };
#define BOBBYR_ORDER_NUM_SHIPPING_CITIES 17 //#define BOBBYR_ORDER_NUM_SHIPPING_CITIES 17
#define BOBBYR_NUM_DISPLAYED_CITIES 10 //#define BOBBYR_NUM_DISPLAYED_CITIES 10
#define BOBBYR_NUM_DISPLAYED_ITEMS 10 #define BOBBYR_NUM_DISPLAYED_ITEMS 10
@@ -1504,7 +1504,8 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
usPosX = BOBBYR_CITY_START_LOCATION_X; usPosX = BOBBYR_CITY_START_LOCATION_X;
usPosY = BOBBYR_CITY_START_LOCATION_Y; usPosY = BOBBYR_CITY_START_LOCATION_Y;
for( i=0; i< BOBBYR_NUM_DISPLAYED_CITIES; i++) //for( i=0; i< BOBBYR_NUM_DISPLAYED_CITIES; i++)
for( i=0; i< guiNumOfDisplayedCities; i++)
{ {
MSYS_DefineRegion( &gSelectedDropDownRegion[i], usPosX, (UINT16)(usPosY+4), (UINT16)(usPosX+BOBBYR_DROP_DOWN_WIDTH-6), (UINT16)(usPosY+usFontHeight+7), MSYS_PRIORITY_HIGH, MSYS_DefineRegion( &gSelectedDropDownRegion[i], usPosX, (UINT16)(usPosY+4), (UINT16)(usPosX+BOBBYR_DROP_DOWN_WIDTH-6), (UINT16)(usPosY+usFontHeight+7), MSYS_PRIORITY_HIGH,
CURSOR_WWW, SelectDropDownMovementCallBack, SelectDropDownRegionCallBack); CURSOR_WWW, SelectDropDownMovementCallBack, SelectDropDownRegionCallBack);
@@ -2112,7 +2113,8 @@ void DrawGoldRectangle( INT8 bCityNum )
//usHeight = usTempHeight / (BOBBYR_ORDER_NUM_SHIPPING_CITIES+1); //usHeight = usTempHeight / (BOBBYR_ORDER_NUM_SHIPPING_CITIES+1);
usHeight = usTempHeight / (gPostalService.LookupDestinationList().size()+1); usHeight = usTempHeight / (gPostalService.LookupDestinationList().size()+1);
usPosY = usTempPosY + (UINT16)( ( ( BOBBYR_SCROLL_AREA_HEIGHT - 2 * BOBBYR_SCROLL_ARROW_HEIGHT ) / (FLOAT)(BOBBYR_ORDER_NUM_SHIPPING_CITIES +1) ) * bCityNum ); //usPosY = usTempPosY + (UINT16)( ( ( BOBBYR_SCROLL_AREA_HEIGHT - 2 * BOBBYR_SCROLL_ARROW_HEIGHT ) / (FLOAT)(BOBBYR_ORDER_NUM_SHIPPING_CITIES +1) ) * bCityNum );
usPosY = usTempPosY + (UINT16)( ( ( BOBBYR_SCROLL_AREA_HEIGHT - 2 * BOBBYR_SCROLL_ARROW_HEIGHT ) / (FLOAT)(gPostalService.LookupDestinationList().size()+1) ) * bCityNum );
temp = BOBBYR_SCROLL_AREA_Y + BOBBYR_SCROLL_AREA_HEIGHT - BOBBYR_SCROLL_ARROW_HEIGHT - usHeight - 1; temp = BOBBYR_SCROLL_AREA_Y + BOBBYR_SCROLL_AREA_HEIGHT - BOBBYR_SCROLL_ARROW_HEIGHT - usHeight - 1;
+106 -62
View File
@@ -19,24 +19,25 @@
#include "Text.h" #include "Text.h"
#include "LaptopSave.h" #include "LaptopSave.h"
#include "Random.h" #include "Random.h"
#include "postalservice.h"
#endif #endif
#include "meanwhile.h" #include "meanwhile.h"
#define FLOWER_ORDEER_TINY_FONT FONT10ARIAL #define FLOWER_ORDER_TINY_FONT FONT10ARIAL
#define FLOWER_ORDEER_SMALL_FONT FONT12ARIAL #define FLOWER_ORDER_SMALL_FONT FONT12ARIAL
#define FLOWER_ORDEER_BIG_FONT FONT12ARIAL #define FLOWER_ORDER_BIG_FONT FONT12ARIAL
#define FLOWER_ORDEER_SMALL_COLOR FONT_MCOLOR_WHITE #define FLOWER_ORDER_SMALL_COLOR FONT_MCOLOR_WHITE
#define FLOWER_ORDEER_LINK_COLOR FONT_MCOLOR_LTYELLOW #define FLOWER_ORDER_LINK_COLOR FONT_MCOLOR_LTYELLOW
#define FLOWER_ORDEER_DROP_DOWN_FONT FONT12ARIAL #define FLOWER_ORDER_DROP_DOWN_FONT FONT12ARIAL
#define FLOWER_ORDEER_DROP_DOWN_COLOR FONT_MCOLOR_WHITE #define FLOWER_ORDER_DROP_DOWN_COLOR FONT_MCOLOR_WHITE
#define FLOWER_ORDER_STATIC_TEXT_COLOR 76 #define FLOWER_ORDER_STATIC_TEXT_COLOR 76
#define FLOWER_ORDER_FLOWER_BOX_X LAPTOP_SCREEN_UL_X + 7 #define FLOWER_ORDER_FLOWER_BOX_X LAPTOP_SCREEN_UL_X + 7
#define FLOWER_ORDER_FLOWER_BOX_Y LAPTOP_SCREEN_WEB_UL_Y + 63 #define FLOWER_ORDER_FLOWER_BOX_Y LAPTOP_SCREEN_WEB_UL_Y + 63
#define FLOWER_ORDER_FLOWER_BOX_WIDTH 75 #define FLOWER_ORDER_FLOWER_BOX_WIDTH 75
#define FLOWER_ORDER_FLOWER_BOX_HEIGHT 100 #define FLOWER_ORDER_FLOWER_BOX_HEIGHT 100
@@ -92,7 +93,7 @@
#define FLOWER_ORDER_PERSONAL_SENT_BOX_X FLOWER_ORDER_SENTIMENT_BOX_X + 5 #define FLOWER_ORDER_PERSONAL_SENT_BOX_X FLOWER_ORDER_SENTIMENT_BOX_X + 5
#define FLOWER_ORDER_PERSONAL_SENT_BOX_Y FLOWER_ORDER_SENTIMENT_BOX_Y + 5 #define FLOWER_ORDER_PERSONAL_SENT_BOX_Y FLOWER_ORDER_SENTIMENT_BOX_Y + 5
#define FLOWER_ORDER_PERSONAL_SENT_TEXT_WIDTH 457 #define FLOWER_ORDER_PERSONAL_SENT_TEXT_WIDTH 457
#define FLOWER_ORDER_PERSONAL_SENT_TEXT_HEIGHT 17//44 #define FLOWER_ORDER_PERSONAL_SENT_TEXT_HEIGHT 17//44
#define FLOWER_ORDER_BILLING_INFO_X FLOWER_ORDER_ADDITIONAL_SERVICES_X #define FLOWER_ORDER_BILLING_INFO_X FLOWER_ORDER_ADDITIONAL_SERVICES_X
#define FLOWER_ORDER_BILLING_INFO_Y LAPTOP_SCREEN_WEB_UL_Y + 296 - FLOWER_ORDER_SMALLER_PS_OFFSET_Y #define FLOWER_ORDER_BILLING_INFO_Y LAPTOP_SCREEN_WEB_UL_Y + 296 - FLOWER_ORDER_SMALLER_PS_OFFSET_Y
@@ -140,7 +141,7 @@
#define FLOWER_ORDER_PERSONEL_SENTIMENT_NUM_CHARS 75 #define FLOWER_ORDER_PERSONEL_SENTIMENT_NUM_CHARS 75
#define FLOWER_ORDER_NAME_FIELD_NUM_CHARS 35 #define FLOWER_ORDER_NAME_FIELD_NUM_CHARS 35
/* // Buggler: Externalized by tagging to BobbyR locations & shipping costs
typedef struct typedef struct
{ {
STR16 *psCityLoc; STR16 *psCityLoc;
@@ -148,8 +149,10 @@ typedef struct
UINT8 ubWhenItGetsThereCost; UINT8 ubWhenItGetsThereCost;
} FlowerOrderLocationStruct; } FlowerOrderLocationStruct;
#define FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS 17 #define FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS 17
///*
FlowerOrderLocationStruct FlowerOrderLocations[FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS]={ FlowerOrderLocationStruct FlowerOrderLocations[FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS]={
{ &pDeliveryLocationStrings[0], 20, 15}, { &pDeliveryLocationStrings[0], 20, 15},
{ &pDeliveryLocationStrings[1], 95, 70}, { &pDeliveryLocationStrings[1], 95, 70},
@@ -169,6 +172,7 @@ FlowerOrderLocationStruct FlowerOrderLocations[FLOWER_ORDER_NUMBER_OF_DROP_DOWN_
{ &pDeliveryLocationStrings[15], 50, 40}, { &pDeliveryLocationStrings[15], 50, 40},
{ &pDeliveryLocationStrings[16], 40, 30} { &pDeliveryLocationStrings[16], 40, 30}
}; };
*/
UINT32 guiDeliveryLocation; UINT32 guiDeliveryLocation;
UINT32 guiFlowerFrame; UINT32 guiFlowerFrame;
@@ -246,10 +250,16 @@ void SelectFloristDisableDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iR
//mouse region for the drop down city location area //mouse region for the drop down city location area
MOUSE_REGION gSelectedFlowerDropDownRegion[ FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS ]; //MOUSE_REGION gSelectedFlowerDropDownRegion[ FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS ];
MOUSE_REGION *gSelectedFlowerDropDownRegion;
void SelectFlowerDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason ); void SelectFlowerDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
void SelectFlowerDropDownMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason ); void SelectFlowerDropDownMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
//Dealtar's Airport Externalization.
BOOLEAN gfFlowerInitialized = 0;
extern UINT8 guiNumOfDisplayedCities;
extern vector < PDestinationStruct > gDestinationTable;
extern CPostalService gPostalService;
//to select typing in the personal sentiment box //to select typing in the personal sentiment box
//MOUSE_REGION gSelectedFloristPersonalSentimentBoxRegion; //MOUSE_REGION gSelectedFloristPersonalSentimentBoxRegion;
@@ -397,9 +407,9 @@ BOOLEAN EnterFloristOrderForm()
MSYS_SetRegionUserData( &gSelectedFloristCheckBoxRegion[i], 0, i ); MSYS_SetRegionUserData( &gSelectedFloristCheckBoxRegion[i], 0, i );
i++; i++;
usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_SELECT_FROM_OURS], FLOWER_ORDEER_SMALL_FONT) + 2 + FLOWER_ORDER_LINK_TO_CARD_GALLERY_X; usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_SELECT_FROM_OURS], FLOWER_ORDER_SMALL_FONT) + 2 + FLOWER_ORDER_LINK_TO_CARD_GALLERY_X;
usWidth = StringPixLength( sOrderFormText[FLORIST_ORDER_STANDARDIZED_CARDS], FLOWER_ORDEER_SMALL_FONT); usWidth = StringPixLength( sOrderFormText[FLORIST_ORDER_STANDARDIZED_CARDS], FLOWER_ORDER_SMALL_FONT);
usHeight = GetFontHeight(FLOWER_ORDEER_SMALL_FONT); usHeight = GetFontHeight(FLOWER_ORDER_SMALL_FONT);
MSYS_DefineRegion( &gSelectedFloristCardGalleryLinkRegion, usPosX, FLOWER_ORDER_LINK_TO_CARD_GALLERY_Y, (UINT16)(usPosX + usWidth), (UINT16)(FLOWER_ORDER_LINK_TO_CARD_GALLERY_Y + usHeight), MSYS_PRIORITY_HIGH, MSYS_DefineRegion( &gSelectedFloristCardGalleryLinkRegion, usPosX, FLOWER_ORDER_LINK_TO_CARD_GALLERY_Y, (UINT16)(usPosX + usWidth), (UINT16)(FLOWER_ORDER_LINK_TO_CARD_GALLERY_Y + usHeight), MSYS_PRIORITY_HIGH,
CURSOR_WWW, MSYS_NO_CALLBACK, SelectFloristCardGalleryLinkRegionCallBack ); CURSOR_WWW, MSYS_NO_CALLBACK, SelectFloristCardGalleryLinkRegionCallBack );
MSYS_AddRegion(&gSelectedFloristCardGalleryLinkRegion); MSYS_AddRegion(&gSelectedFloristCardGalleryLinkRegion);
@@ -537,62 +547,59 @@ void RenderFloristOrderForm()
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,FLOWER_ORDER_SENTIMENT_BOX_X, FLOWER_ORDER_SENTIMENT_BOX_Y, VO_BLT_SRCTRANSPARENCY,NULL); BltVideoObject(FRAME_BUFFER, hPixHandle, 0,FLOWER_ORDER_SENTIMENT_BOX_X, FLOWER_ORDER_SENTIMENT_BOX_Y, VO_BLT_SRCTRANSPARENCY,NULL);
//Bouquet name, price and order number,text //Bouquet name, price and order number,text
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_NAME_BOUQUET], FLOWER_ORDER_FLOWER_NAME_X, FLOWER_ORDER_FLOWER_NAME_Y, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_NAME_BOUQUET], FLOWER_ORDER_FLOWER_NAME_X, FLOWER_ORDER_FLOWER_NAME_Y, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_PRICE], FLOWER_ORDER_BOUQUET_NAME_X, FLOWER_ORDER_BOUQUET_NAME_Y, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_PRICE], FLOWER_ORDER_BOUQUET_NAME_X, FLOWER_ORDER_BOUQUET_NAME_Y, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_ORDER_NUMBER], FLOWER_ORDER_ORDER_NUM_NAME_X, FLOWER_ORDER_ORDER_NUM_NAME_Y, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_ORDER_NUMBER], FLOWER_ORDER_ORDER_NUM_NAME_X, FLOWER_ORDER_ORDER_NUM_NAME_Y, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//The flower name //The flower name
usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_NAME_BOUQUET], FLOWER_ORDEER_SMALL_FONT) + 5 + FLOWER_ORDER_FLOWER_NAME_X; usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_NAME_BOUQUET], FLOWER_ORDER_SMALL_FONT) + 5 + FLOWER_ORDER_FLOWER_NAME_X;
uiStartLoc = FLOR_GALLERY_TEXT_TOTAL_SIZE * guiCurrentlySelectedFlower; uiStartLoc = FLOR_GALLERY_TEXT_TOTAL_SIZE * guiCurrentlySelectedFlower;
LoadEncryptedDataFromFile(FLOR_GALLERY_TEXT_FILE, sTemp, uiStartLoc, FLOR_GALLERY_TEXT_TITLE_SIZE); LoadEncryptedDataFromFile(FLOR_GALLERY_TEXT_FILE, sTemp, uiStartLoc, FLOR_GALLERY_TEXT_TITLE_SIZE);
DrawTextToScreen( sTemp, usPosX, FLOWER_ORDER_FLOWER_NAME_Y, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( sTemp, usPosX, FLOWER_ORDER_FLOWER_NAME_Y, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//Delivery Date
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_DELIVERY_DATE], FLOWER_ORDER_ORDER_NUM_NAME_X, FLOWER_ORDER_DATE_Y, 0, FLOWER_ORDER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//Deliverry Date
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_DELIVERY_DATE], FLOWER_ORDER_ORDER_NUM_NAME_X, FLOWER_ORDER_DATE_Y, 0, FLOWER_ORDEER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//Next day //Next day
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_NEXT_DAY], FLOWER_ORDER_CHECK_BOX_0_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_0_Y+2, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_NEXT_DAY], FLOWER_ORDER_CHECK_BOX_0_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_0_Y+2, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//When it get there //When it get there
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_GETS_THERE], FLOWER_ORDER_CHECK_BOX_1_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_1_Y+2, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_GETS_THERE], FLOWER_ORDER_CHECK_BOX_1_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_1_Y+2, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//Deliverry locatiuon //Deliverry locatiuon
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_DELIVERY_LOCATION], FLOWER_ORDER_ORDER_NUM_NAME_X, FLOWER_ORDER_LOCATION_Y, 0, FLOWER_ORDEER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_DELIVERY_LOCATION], FLOWER_ORDER_ORDER_NUM_NAME_X, FLOWER_ORDER_LOCATION_Y, 0, FLOWER_ORDER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//Additional services //Additional services
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_ADDITIONAL_CHARGES], FLOWER_ORDER_ADDITIONAL_SERVICES_X, FLOWER_ORDER_ADDITIONAL_SERVICES_Y, 0, FLOWER_ORDEER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_ADDITIONAL_CHARGES], FLOWER_ORDER_ADDITIONAL_SERVICES_X, FLOWER_ORDER_ADDITIONAL_SERVICES_Y, 0, FLOWER_ORDER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//crushed bouquet //crushed bouquet
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_CRUSHED], FLOWER_ORDER_CHECK_BOX_2_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_2_Y+2, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_CRUSHED], FLOWER_ORDER_CHECK_BOX_2_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_2_Y+2, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//black roses //black roses
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_BLACK_ROSES], FLOWER_ORDER_CHECK_BOX_3_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_3_Y+2, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_BLACK_ROSES], FLOWER_ORDER_CHECK_BOX_3_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_3_Y+2, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//wilted bouquet //wilted bouquet
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_WILTED], FLOWER_ORDER_CHECK_BOX_4_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_4_Y+2, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_WILTED], FLOWER_ORDER_CHECK_BOX_4_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_4_Y+2, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//fruit cake //fruit cake
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_FRUIT_CAKE], FLOWER_ORDER_CHECK_BOX_5_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_5_Y+2, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_FRUIT_CAKE], FLOWER_ORDER_CHECK_BOX_5_X+FLOWER_ORDER_CHECK_WIDTH+3, FLOWER_ORDER_CHECK_BOX_5_Y+2, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//Personal sentiment //Personal sentiment
usPosX = FLOWER_ORDER_PERSONAL_SENT_TEXT_X + StringPixLength( sOrderFormText[FLORIST_ORDER_PERSONAL_SENTIMENTS], FLOWER_ORDEER_BIG_FONT) + 5; usPosX = FLOWER_ORDER_PERSONAL_SENT_TEXT_X + StringPixLength( sOrderFormText[FLORIST_ORDER_PERSONAL_SENTIMENTS], FLOWER_ORDER_BIG_FONT) + 5;
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_PERSONAL_SENTIMENTS], FLOWER_ORDER_PERSONAL_SENT_TEXT_X, FLOWER_ORDER_PERSONAL_SENT_TEXT_Y, 0, FLOWER_ORDEER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_PERSONAL_SENTIMENTS], FLOWER_ORDER_PERSONAL_SENT_TEXT_X, FLOWER_ORDER_PERSONAL_SENT_TEXT_Y, 0, FLOWER_ORDER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_CARD_LENGTH], usPosX, FLOWER_ORDER_PERSONAL_SENT_TEXT_Y+2, 0, FLOWER_ORDEER_TINY_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_CARD_LENGTH], usPosX, FLOWER_ORDER_PERSONAL_SENT_TEXT_Y+2, 0, FLOWER_ORDER_TINY_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//Billing information //Billing information
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_BILLING_INFO], FLOWER_ORDER_BILLING_INFO_X, FLOWER_ORDER_BILLING_INFO_Y, 0, FLOWER_ORDEER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_BILLING_INFO], FLOWER_ORDER_BILLING_INFO_X, FLOWER_ORDER_BILLING_INFO_Y, 0, FLOWER_ORDER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//Billing Name //Billing Name
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_NAME], FLOWER_ORDER_NAME_TEXT_X, FLOWER_ORDER_NAME_TEXT_Y, FLOWER_ORDER_NAME_TEXT_WIDTH, FLOWER_ORDEER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_NAME], FLOWER_ORDER_NAME_TEXT_X, FLOWER_ORDER_NAME_TEXT_Y, FLOWER_ORDER_NAME_TEXT_WIDTH, FLOWER_ORDER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
//the text to link to the card gallery //the text to link to the card gallery
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_SELECT_FROM_OURS], FLOWER_ORDER_LINK_TO_CARD_GALLERY_X, FLOWER_ORDER_LINK_TO_CARD_GALLERY_Y, 0, FLOWER_ORDEER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_SELECT_FROM_OURS], FLOWER_ORDER_LINK_TO_CARD_GALLERY_X, FLOWER_ORDER_LINK_TO_CARD_GALLERY_Y, 0, FLOWER_ORDER_BIG_FONT, FLOWER_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_SELECT_FROM_OURS], FLOWER_ORDEER_SMALL_FONT) + 5 + FLOWER_ORDER_LINK_TO_CARD_GALLERY_X; usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_SELECT_FROM_OURS], FLOWER_ORDER_SMALL_FONT) + 5 + FLOWER_ORDER_LINK_TO_CARD_GALLERY_X;
DrawTextToScreen(sOrderFormText[FLORIST_ORDER_STANDARDIZED_CARDS], usPosX, FLOWER_ORDER_LINK_TO_CARD_GALLERY_Y, 0, FLOWER_ORDEER_BIG_FONT, FLOWER_ORDEER_LINK_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(sOrderFormText[FLORIST_ORDER_STANDARDIZED_CARDS], usPosX, FLOWER_ORDER_LINK_TO_CARD_GALLERY_Y, 0, FLOWER_ORDER_BIG_FONT, FLOWER_ORDER_LINK_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DisplayFloristCheckBox(); DisplayFloristCheckBox();
@@ -840,7 +847,7 @@ void DisplayFloristCheckBox()
else else
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, FLOWER_ORDER_CHECK_BOX_3_X, FLOWER_ORDER_CHECK_BOX_3_Y, VO_BLT_SRCTRANSPARENCY,NULL); BltVideoObject(FRAME_BUFFER, hPixHandle, 0, FLOWER_ORDER_CHECK_BOX_3_X, FLOWER_ORDER_CHECK_BOX_3_Y, VO_BLT_SRCTRANSPARENCY,NULL);
//Foiurth check box //fourth check box
GetVideoObject(&hPixHandle, guiFlowerOrderCheckBoxButtonImage); GetVideoObject(&hPixHandle, guiFlowerOrderCheckBoxButtonImage);
if( gfFLoristCheckBox4Down ) if( gfFLoristCheckBox4Down )
BltVideoObject(FRAME_BUFFER, hPixHandle, 1, FLOWER_ORDER_CHECK_BOX_4_X, FLOWER_ORDER_CHECK_BOX_4_Y, VO_BLT_SRCTRANSPARENCY,NULL); BltVideoObject(FRAME_BUFFER, hPixHandle, 1, FLOWER_ORDER_CHECK_BOX_4_X, FLOWER_ORDER_CHECK_BOX_4_Y, VO_BLT_SRCTRANSPARENCY,NULL);
@@ -895,13 +902,13 @@ void DisplayFlowerDynamicItems()
CleanOutControlCodesFromString(sTemp, sText); CleanOutControlCodesFromString(sTemp, sText);
DisplayWrappedString( (UINT16)(FLOWER_ORDER_SENTIMENT_BOX_X+10), (UINT16)(FLOWER_ORDER_SENTIMENT_BOX_Y+7), FLOWER_ORDER_PERSONAL_SENT_TEXT_WIDTH, 2, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED); DisplayWrappedString( (UINT16)(FLOWER_ORDER_SENTIMENT_BOX_X+10), (UINT16)(FLOWER_ORDER_SENTIMENT_BOX_Y+7), FLOWER_ORDER_PERSONAL_SENT_TEXT_WIDTH, 2, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
} }
*/ */
//order number //order number
usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_ORDER_NUMBER], FLOWER_ORDEER_SMALL_FONT) + 5 + FLOWER_ORDER_ORDER_NUM_NAME_X; usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_ORDER_NUMBER], FLOWER_ORDER_SMALL_FONT) + 5 + FLOWER_ORDER_ORDER_NUM_NAME_X;
swprintf(sTemp, L"%d", LaptopSaveInfo.uiFlowerOrderNumber ); swprintf(sTemp, L"%d", LaptopSaveInfo.uiFlowerOrderNumber );
DrawTextToScreen( sTemp, usPosX, FLOWER_ORDER_ORDER_NUM_NAME_Y, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( sTemp, usPosX, FLOWER_ORDER_ORDER_NUM_NAME_Y, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
guiFlowerPrice = 0; guiFlowerPrice = 0;
// the user selected crushed bouquet // the user selected crushed bouquet
@@ -921,20 +928,22 @@ void DisplayFlowerDynamicItems()
guiFlowerPrice += gubFlowerOrder_AdditioanalServicePrices[3]; guiFlowerPrice += gubFlowerOrder_AdditioanalServicePrices[3];
//price //price
usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_PRICE], FLOWER_ORDEER_SMALL_FONT) + 5 + FLOWER_ORDER_BOUQUET_NAME_X; usPosX = StringPixLength( sOrderFormText[FLORIST_ORDER_PRICE], FLOWER_ORDER_SMALL_FONT) + 5 + FLOWER_ORDER_BOUQUET_NAME_X;
uiStartLoc = FLOR_GALLERY_TEXT_TOTAL_SIZE * guiCurrentlySelectedFlower + FLOR_GALLERY_TEXT_TITLE_SIZE; uiStartLoc = FLOR_GALLERY_TEXT_TOTAL_SIZE * guiCurrentlySelectedFlower + FLOR_GALLERY_TEXT_TITLE_SIZE;
LoadEncryptedDataFromFile(FLOR_GALLERY_TEXT_FILE, sTemp, uiStartLoc, FLOR_GALLERY_TEXT_PRICE_SIZE); LoadEncryptedDataFromFile(FLOR_GALLERY_TEXT_FILE, sTemp, uiStartLoc, FLOR_GALLERY_TEXT_PRICE_SIZE);
swscanf( sTemp, L"%hu", &usPrice); swscanf( sTemp, L"%hu", &usPrice);
//if its the next day delivery //if its the next day delivery
if( gfFLoristCheckBox0Down ) if( gfFLoristCheckBox0Down )
guiFlowerPrice += usPrice + FlowerOrderLocations[ gubCurrentlySelectedFlowerLocation ].ubNextDayDeliveryCost; //guiFlowerPrice += usPrice + FlowerOrderLocations[ gubCurrentlySelectedFlowerLocation ].ubNextDayDeliveryCost;
guiFlowerPrice += usPrice + gPostalService.GetDestinationFee(0, gDestinationTable[gubCurrentlySelectedFlowerLocation]->usID) / 2;
//else its the 'when it gets there' delivery //else its the 'when it gets there' delivery
else else
guiFlowerPrice += usPrice + FlowerOrderLocations[ gubCurrentlySelectedFlowerLocation ].ubWhenItGetsThereCost; //guiFlowerPrice += usPrice + FlowerOrderLocations[ gubCurrentlySelectedFlowerLocation ].ubWhenItGetsThereCost;
guiFlowerPrice += usPrice + gPostalService.GetDestinationFee(1, gDestinationTable[gubCurrentlySelectedFlowerLocation]->usID) / 2;
swprintf( sTemp, L"$%d.00 %s", guiFlowerPrice, pMessageStrings[ MSG_USDOLLAR_ABBREVIATION ] ); swprintf( sTemp, L"$%d.00 %s", guiFlowerPrice, pMessageStrings[ MSG_USDOLLAR_ABBREVIATION ] );
DrawTextToScreen( sTemp, usPosX, FLOWER_ORDER_BOUQUET_NAME_Y, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( sTemp, usPosX, FLOWER_ORDER_BOUQUET_NAME_Y, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
} }
@@ -1028,7 +1037,7 @@ BOOLEAN CreateDestroyFlowerOrderDestDropDown( UINT8 ubDropDownMode )
UINT8 i; UINT8 i;
UINT16 usPosX, usPosY; UINT16 usPosX, usPosY;
UINT16 usTemp; UINT16 usTemp;
UINT16 usFontHeight = GetFontHeight( FLOWER_ORDEER_DROP_DOWN_FONT ); UINT16 usFontHeight = GetFontHeight( FLOWER_ORDER_DROP_DOWN_FONT );
UINT8 ubTextFieldID; UINT8 ubTextFieldID;
if( fMouseRegionsCreated ) if( fMouseRegionsCreated )
@@ -1059,7 +1068,8 @@ BOOLEAN CreateDestroyFlowerOrderDestDropDown( UINT8 ubDropDownMode )
usPosX = FLOWER_ORDER_DROP_DOWN_CITY_START_X; usPosX = FLOWER_ORDER_DROP_DOWN_CITY_START_X;
usPosY = FLOWER_ORDER_DROP_DOWN_CITY_START_Y; usPosY = FLOWER_ORDER_DROP_DOWN_CITY_START_Y;
for( i=0; i< FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS; i++) //for( i=0; i< FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS; i++)
for( i=0; i< gPostalService.LookupDestinationList().size(); i++)
{ {
MSYS_DefineRegion( &gSelectedFlowerDropDownRegion[i], usPosX, (UINT16)(usPosY+4), (UINT16)(usPosX+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH), (UINT16)(usPosY+usFontHeight), MSYS_PRIORITY_HIGH+3, MSYS_DefineRegion( &gSelectedFlowerDropDownRegion[i], usPosX, (UINT16)(usPosY+4), (UINT16)(usPosX+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH), (UINT16)(usPosY+usFontHeight), MSYS_PRIORITY_HIGH+3,
CURSOR_WWW, SelectFlowerDropDownMovementCallBack, SelectFlowerDropDownRegionCallBack); CURSOR_WWW, SelectFlowerDropDownMovementCallBack, SelectFlowerDropDownRegionCallBack);
@@ -1082,7 +1092,7 @@ BOOLEAN CreateDestroyFlowerOrderDestDropDown( UINT8 ubDropDownMode )
KillTextInputMode(); KillTextInputMode();
//disable the clear order and accept order buttons, (their rendering interferes with the drop down graphics) //disable the clear order and accept order buttons, (their rendering interferes with the drop down graphics)
} }
break; break;
case FLOWER_ORDER_DROP_DOWN_DESTROY: case FLOWER_ORDER_DROP_DOWN_DESTROY:
@@ -1092,12 +1102,14 @@ BOOLEAN CreateDestroyFlowerOrderDestDropDown( UINT8 ubDropDownMode )
if( !fMouseRegionsCreated ) if( !fMouseRegionsCreated )
break; break;
for( i=0; i< FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS; i++) //for( i=0; i< FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS; i++)
for( i=0; i< gPostalService.LookupDestinationList().size(); i++)
MSYS_RemoveRegion( &gSelectedFlowerDropDownRegion[i]); MSYS_RemoveRegion( &gSelectedFlowerDropDownRegion[i]);
//display the name on the title bar //display the name on the title bar
ColorFillVideoSurfaceArea( FRAME_BUFFER, FLOWER_ORDER_DROP_DOWN_LOCATION_X+3, FLOWER_ORDER_DELIVERY_LOCATION_Y+3, FLOWER_ORDER_DROP_DOWN_LOCATION_X+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH, FLOWER_ORDER_DELIVERY_LOCATION_Y+FLOWER_ORDER_DELIVERY_LOCATION_HEIGHT-2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) ); ColorFillVideoSurfaceArea( FRAME_BUFFER, FLOWER_ORDER_DROP_DOWN_LOCATION_X+3, FLOWER_ORDER_DELIVERY_LOCATION_Y+3, FLOWER_ORDER_DROP_DOWN_LOCATION_X+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH, FLOWER_ORDER_DELIVERY_LOCATION_Y+FLOWER_ORDER_DELIVERY_LOCATION_HEIGHT-2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
DrawTextToScreen( *(FlowerOrderLocations[ gubCurrentlySelectedFlowerLocation ].psCityLoc), FLOWER_ORDER_DROP_DOWN_CITY_START_X+6, FLOWER_ORDER_DROP_DOWN_CITY_START_Y+3, 0, FLOWER_ORDEER_DROP_DOWN_FONT, FLOWER_ORDEER_DROP_DOWN_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); //DrawTextToScreen( *(FlowerOrderLocations[ gubCurrentlySelectedFlowerLocation ].psCityLoc), FLOWER_ORDER_DROP_DOWN_CITY_START_X+6, FLOWER_ORDER_DROP_DOWN_CITY_START_Y+3, 0, FLOWER_ORDER_DROP_DOWN_FONT, FLOWER_ORDER_DROP_DOWN_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen( (STR16)gDestinationTable[ gubCurrentlySelectedFlowerLocation ]->wstrName.c_str(), FLOWER_ORDER_DROP_DOWN_CITY_START_X+6, FLOWER_ORDER_DROP_DOWN_CITY_START_Y+3, 0, FLOWER_ORDER_DROP_DOWN_FONT, FLOWER_ORDER_DROP_DOWN_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
//enable the drop down region //enable the drop down region
MSYS_DisableRegion(&gSelectedFloristDisableDropDownRegion); MSYS_DisableRegion(&gSelectedFloristDisableDropDownRegion);
@@ -1108,15 +1120,15 @@ BOOLEAN CreateDestroyFlowerOrderDestDropDown( UINT8 ubDropDownMode )
//enable the text entry fields //enable the text entry fields
InitFlowerOrderTextInputBoxes(); InitFlowerOrderTextInputBoxes();
} }
break; break;
case FLOWER_ORDER_DROP_DOWN_DISPLAY: case FLOWER_ORDER_DROP_DOWN_DISPLAY:
{ {
UINT8 i; UINT8 i;
UINT16 usPosY, usPosX; UINT16 usPosY, usPosX;
UINT16 usFontHeight = GetFontHeight( FLOWER_ORDEER_DROP_DOWN_FONT ); UINT16 usFontHeight = GetFontHeight( FLOWER_ORDER_DROP_DOWN_FONT );
HVOBJECT hImageHandle; HVOBJECT hImageHandle;
//Display the background for the drop down window //Display the background for the drop down window
ColorFillVideoSurfaceArea( FRAME_BUFFER, FLOWER_ORDER_DROP_DOWN_LOCATION_X, FLOWER_ORDER_DROP_DOWN_LOCATION_Y, FLOWER_ORDER_DROP_DOWN_LOCATION_X+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH, FLOWER_ORDER_DROP_DOWN_LOCATION_Y+usHeight, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) ); ColorFillVideoSurfaceArea( FRAME_BUFFER, FLOWER_ORDER_DROP_DOWN_LOCATION_X, FLOWER_ORDER_DROP_DOWN_LOCATION_Y, FLOWER_ORDER_DROP_DOWN_LOCATION_X+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH, FLOWER_ORDER_DROP_DOWN_LOCATION_Y+usHeight, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
@@ -1159,9 +1171,11 @@ BOOLEAN CreateDestroyFlowerOrderDestDropDown( UINT8 ubDropDownMode )
//Display the list of cities //Display the list of cities
usPosY = FLOWER_ORDER_DROP_DOWN_CITY_START_Y + 3; usPosY = FLOWER_ORDER_DROP_DOWN_CITY_START_Y + 3;
for( i=0; i< FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS; i++) //for( i=0; i< FLOWER_ORDER_NUMBER_OF_DROP_DOWN_LOCATIONS; i++)
for( i=0; i< gPostalService.LookupDestinationList().size(); i++)
{ {
DrawTextToScreen( *(FlowerOrderLocations[i].psCityLoc), FLOWER_ORDER_DROP_DOWN_CITY_START_X+6, usPosY, 0, FLOWER_ORDEER_DROP_DOWN_FONT, FLOWER_ORDEER_DROP_DOWN_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); //DrawTextToScreen( *(FlowerOrderLocations[i].psCityLoc), FLOWER_ORDER_DROP_DOWN_CITY_START_X+6, usPosY, 0, FLOWER_ORDER_DROP_DOWN_FONT, FLOWER_ORDER_DROP_DOWN_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen( (STR16)gDestinationTable[i]->wstrName.c_str(), FLOWER_ORDER_DROP_DOWN_CITY_START_X+6, usPosY, 0, FLOWER_ORDER_DROP_DOWN_FONT, FLOWER_ORDER_DROP_DOWN_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
usPosY += usFontHeight + 2; usPosY += usFontHeight + 2;
} }
@@ -1178,7 +1192,7 @@ BOOLEAN CreateDestroyFlowerOrderDestDropDown( UINT8 ubDropDownMode )
void FlowerOrderDrawSelectedCity( UINT8 ubNumber ) void FlowerOrderDrawSelectedCity( UINT8 ubNumber )
{ {
UINT16 usPosY; UINT16 usPosY;
UINT16 usFontHeight = GetFontHeight( FLOWER_ORDEER_DROP_DOWN_FONT ); UINT16 usFontHeight = GetFontHeight( FLOWER_ORDER_DROP_DOWN_FONT );
usPosY = (usFontHeight + 2) * ubNumber + FLOWER_ORDER_DROP_DOWN_CITY_START_Y; usPosY = (usFontHeight + 2) * ubNumber + FLOWER_ORDER_DROP_DOWN_CITY_START_Y;
@@ -1186,7 +1200,8 @@ void FlowerOrderDrawSelectedCity( UINT8 ubNumber )
ColorFillVideoSurfaceArea( FRAME_BUFFER, FLOWER_ORDER_DROP_DOWN_CITY_START_X, usPosY+2, FLOWER_ORDER_DROP_DOWN_CITY_START_X+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH-9, usPosY+usFontHeight+4, Get16BPPColor( FROMRGB( 255, 255, 255 ) ) ); ColorFillVideoSurfaceArea( FRAME_BUFFER, FLOWER_ORDER_DROP_DOWN_CITY_START_X, usPosY+2, FLOWER_ORDER_DROP_DOWN_CITY_START_X+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH-9, usPosY+usFontHeight+4, Get16BPPColor( FROMRGB( 255, 255, 255 ) ) );
SetFontShadow(NO_SHADOW); SetFontShadow(NO_SHADOW);
DrawTextToScreen( *(FlowerOrderLocations[ubNumber].psCityLoc), FLOWER_ORDER_DROP_DOWN_CITY_START_X+6, (UINT16)(usPosY+3), 0, FLOWER_ORDEER_DROP_DOWN_FONT, 2, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); //DrawTextToScreen( *(FlowerOrderLocations[ubNumber].psCityLoc), FLOWER_ORDER_DROP_DOWN_CITY_START_X+6, (UINT16)(usPosY+3), 0, FLOWER_ORDER_DROP_DOWN_FONT, 2, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen( (STR16)gDestinationTable[ubNumber]->wstrName.c_str(), FLOWER_ORDER_DROP_DOWN_CITY_START_X+6, (UINT16)(usPosY+3), 0, FLOWER_ORDER_DROP_DOWN_FONT, 2, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
SetFontShadow(DEFAULT_SHADOW); SetFontShadow(DEFAULT_SHADOW);
FlowerOrderDisplayShippingLocationCity(); FlowerOrderDisplayShippingLocationCity();
@@ -1199,7 +1214,8 @@ void FlowerOrderDisplayShippingLocationCity()
{ {
//display the name on the title bar //display the name on the title bar
ColorFillVideoSurfaceArea( FRAME_BUFFER, FLOWER_ORDER_DROP_DOWN_LOCATION_X+3, FLOWER_ORDER_DELIVERY_LOCATION_Y+3, FLOWER_ORDER_DROP_DOWN_LOCATION_X+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH, FLOWER_ORDER_DELIVERY_LOCATION_Y+FLOWER_ORDER_DELIVERY_LOCATION_HEIGHT-2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) ); ColorFillVideoSurfaceArea( FRAME_BUFFER, FLOWER_ORDER_DROP_DOWN_LOCATION_X+3, FLOWER_ORDER_DELIVERY_LOCATION_Y+3, FLOWER_ORDER_DROP_DOWN_LOCATION_X+FLOWER_ORDER_DROP_DOWN_LOCATION_WIDTH, FLOWER_ORDER_DELIVERY_LOCATION_Y+FLOWER_ORDER_DELIVERY_LOCATION_HEIGHT-2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
DrawTextToScreen( *(FlowerOrderLocations[ gubCurrentlySelectedFlowerLocation ].psCityLoc), FLOWER_ORDER_DELIVERY_LOCATION_X+5, FLOWER_ORDER_DELIVERY_LOCATION_Y+5, 0, FLOWER_ORDEER_SMALL_FONT, FLOWER_ORDEER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); //DrawTextToScreen( *(FlowerOrderLocations[ gubCurrentlySelectedFlowerLocation ].psCityLoc), FLOWER_ORDER_DELIVERY_LOCATION_X+5, FLOWER_ORDER_DELIVERY_LOCATION_Y+5, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen( (STR16)gDestinationTable[ gubCurrentlySelectedFlowerLocation ]->wstrName.c_str(), FLOWER_ORDER_DELIVERY_LOCATION_X+5, FLOWER_ORDER_DELIVERY_LOCATION_Y+5, 0, FLOWER_ORDER_SMALL_FONT, FLOWER_ORDER_SMALL_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
} }
@@ -1282,9 +1298,11 @@ void HandleFloristOrderKeyBoardInput()
SetActiveField(0); SetActiveField(0);
break; break;
/*
case ESC: case ESC:
SetActiveField(0); SetActiveField(0);
break; break;
*/
default: default:
HandleKeyBoardShortCutsForLapTop( InputEvent.usEvent, InputEvent.usParam, InputEvent.usKeyState ); HandleKeyBoardShortCutsForLapTop( InputEvent.usEvent, InputEvent.usParam, InputEvent.usKeyState );
@@ -1325,4 +1343,30 @@ void InitFloristOrderForm()
gsSentimentTextField[0] = 0; gsSentimentTextField[0] = 0;
gsNameTextField[0] = 0; gsNameTextField[0] = 0;
//Dealtar's Airport Externalization.
// Update the destination and shipment tables upon entering Bobby R
if (!gDestinationTable.empty())
{
gDestinationTable.erase(gDestinationTable.begin(), gDestinationTable.end());
}
RefToDestinationListIterator dli = gPostalService.LookupDestinationList().begin();
while (dli != gPostalService.LookupDestinationList().end())
{
gDestinationTable.push_back(&DESTINATION(dli));
dli++;
}
// Dealtar/Buggler: The following code had to be put here, because GameInitFloristOrderForm() is called
// before XML data is read into gPostalService due to the screen order in screens.cpp -> GameScreens[]
if (!gfFlowerInitialized)
{
gfFlowerInitialized = TRUE;
gSelectedFlowerDropDownRegion = new MOUSE_REGION[gPostalService.LookupDestinationList().size()];
int x = gPostalService.LookupDestinationList().size();
guiNumOfDisplayedCities = (x < 10) ? x : 10;
//gDestinationTable.resize(gPostalService.LookupDestinationList().size());
}
} }