From 72809ac09f612a7f772893b3dc5614644b096842 Mon Sep 17 00:00:00 2001 From: Flugente Date: Mon, 5 Jan 2015 00:33:38 +0000 Subject: [PATCH] Merged revision(s) 7698 from branches/ja2_source_official_2014: Merged revision(s) 7685 from branches/Flugente/BaseTable: no need for each dropdown to have its own image library git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7702 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Laptop/DropDown.cpp | 10 ++++++---- Laptop/DropDown.h | 4 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Laptop/DropDown.cpp b/Laptop/DropDown.cpp index 82d187ef..72fc7f35 100644 --- a/Laptop/DropDown.cpp +++ b/Laptop/DropDown.cpp @@ -20,6 +20,8 @@ #define CITY_NAME_OFFSET 6 #define STATIC_TEXT_COLOR 145 +UINT32 guGoldArrowImages = 0; + // helpful draw functions, as adding sti objects to paint boundaries is... lets say, inefficient void DisplaySmallLine( UINT16 usStartX, UINT16 usStartY, UINT16 EndX, UINT16 EndY, UINT16 usColor ) { @@ -138,7 +140,7 @@ DropDownBase::Create(UINT16 sX, UINT16 sY) // Gold Arrow for the scroll area VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; FilenameForBPP( "LAPTOP\\GoldArrows.sti", VObjectDesc.ImageFile ); - if ( !AddVideoObject( &VObjectDesc, &muiGoldArrowImages ) ) + if ( !AddVideoObject( &VObjectDesc, &guGoldArrowImages ) ) return; gDropObj = (void*) this; @@ -240,7 +242,7 @@ DropDownBase::Destroy() MSYS_RemoveRegion( &mSelectedCloseDropDownRegion); MSYS_RemoveRegion( &mBubbleHelpRegion); - DeleteVideoObjectFromIndex(muiGoldArrowImages); + DeleteVideoObjectFromIndex( guGoldArrowImages ); SetRefresh(); } @@ -304,7 +306,7 @@ DropDownBase::Display() DrawTopEntry(); //get and display the up and down arrows - GetVideoObject(&hArrowHandle, muiGoldArrowImages); + GetVideoObject( &hArrowHandle, guGoldArrowImages ); //top arrow BltVideoObject(FRAME_BUFFER, hArrowHandle, 0, musUpArrowX, musUpArrowY, VO_BLT_SRCTRANSPARENCY,NULL); @@ -351,7 +353,7 @@ DropDownBase::Display_Drop() DrawSelectedCity(); //get and display the up and down arrows - GetVideoObject(&hArrowHandle, muiGoldArrowImages); + GetVideoObject( &hArrowHandle, guGoldArrowImages ); // top arrow BltVideoObject(FRAME_BUFFER, hArrowHandle, 1, musUpArrowX, musUpArrowY, VO_BLT_SRCTRANSPARENCY,NULL); diff --git a/Laptop/DropDown.h b/Laptop/DropDown.h index adbe1d26..ac5a53cf 100644 --- a/Laptop/DropDown.h +++ b/Laptop/DropDown.h @@ -326,9 +326,7 @@ private: MOUSE_REGION mDropDownRegion[DROPDOWN_REGIONS]; MOUSE_REGION mgSelectedUpDownArrowOnScrollAreaRegion[2]; MOUSE_REGION mSelectedScrollAreaDropDownRegion[DROPDOWN_REGIONS]; - - UINT32 muiGoldArrowImages; - + std::vector > mEntryVector; CHAR16 mHelpText[200];