Fixed dropdown menu glitches

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6774 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-01-19 14:06:50 +00:00
parent 27db170b39
commit e1b1712205
3 changed files with 29 additions and 28 deletions
+4 -4
View File
@@ -348,9 +348,9 @@ DropDownBase::Display_Drop()
void
DropDownBase::DrawTopEntry()
{
if ( mSelectedEntry >= mEntryVector.size() )
return;
// make sure we don't get bogus values
mSelectedEntry = min(mSelectedEntry, mEntryVector.size() - 1);
//display the name in the list
ColorFillVideoSurfaceArea( FRAME_BUFFER, musStartX+4, musStartY+4, musStartX+musWidth-4, musStartY+musFontHeight+8, mColorMarked );
@@ -450,7 +450,7 @@ DropDownBase::SelectDropDownMovementCallBack(MOUSE_REGION * pRegion, INT32 reaso
pRegion->uiFlags |= BUTTON_CLICKED_ON ;
mSelectedEntry = (UINT8)MSYS_GetRegionUserData( pRegion, 0 ) + mFirstShownEntry;
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
DrawTopEntry();