mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
- colour TestTable scrollbar
- militia website sector filter uses longer names - prisoner surrender dialogue explains how many prisoners were captured, and allows selecting prison via dropdown selection - explain soldier relation boundaries on Melody website git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8228 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -657,12 +657,19 @@ TestTable::Display( )
|
||||
UINT32 scrollareaheigth = (scrollbarheigth * shownentries) / totalentries;
|
||||
UINT32 areabegin = (scrollbarheigth * mFirstEntryShown) / totalentries;
|
||||
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER,
|
||||
GetX( ) + GetWidth( ) - SCROLLARROW_WIDTH - 2,
|
||||
GetY( ) + SCROLLARROW_HEIGTH,
|
||||
GetX( ) + GetWidth( ) - 2,
|
||||
GetY( ) + SCROLLARROW_HEIGTH + GetHeight( ) - SCROLLARROW_HEIGTH,
|
||||
GetColorLineShadow( ) );
|
||||
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER,
|
||||
GetX( ) + GetWidth( ) - SCROLLARROW_WIDTH - 2,
|
||||
GetY( ) + SCROLLARROW_HEIGTH + areabegin,
|
||||
GetX( ) + GetWidth( ) - 2,
|
||||
GetY( ) + SCROLLARROW_HEIGTH + areabegin + scrollareaheigth,
|
||||
Get16BPPColor( FROMRGB( 20, 250, 50 ) ) );
|
||||
GetColorLine() );
|
||||
|
||||
CreateScrollAreaButtons( );
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ enum InidivualMilitiaOriginState
|
||||
IMOS_DEFECTOR
|
||||
};
|
||||
|
||||
CHAR16 gInidividualMilitiaWebsiteSectorNamesstr[256][10];
|
||||
CHAR16 gInidividualMilitiaWebsiteSectorNamesstr[256][128];
|
||||
|
||||
std::vector<std::pair<INT16, STR16> > GetMilitiaSectorDropVector( )
|
||||
{
|
||||
@@ -256,7 +256,7 @@ std::vector<std::pair<INT16, STR16> > GetMilitiaSectorDropVector( )
|
||||
|
||||
for ( std::set<UINT8>::iterator it = sectorset.begin( ); it != sectorset.end(); ++it )
|
||||
{
|
||||
GetShortSectorString( SECTORX( (*it) ), SECTORY( (*it) ), gInidividualMilitiaWebsiteSectorNamesstr[(*it)] );
|
||||
GetSectorIDString( SECTORX( (*it) ), SECTORY( (*it) ), 0, gInidividualMilitiaWebsiteSectorNamesstr[(*it)], FALSE );
|
||||
|
||||
sectorvector.push_back( std::make_pair( (INT16)(*it), gInidividualMilitiaWebsiteSectorNamesstr[(*it)] ) );
|
||||
}
|
||||
|
||||
+17
-2
@@ -921,21 +921,36 @@ BOOLEAN DisplayMercData( UINT8 usProfileA, UINT8 usProfileB )
|
||||
|
||||
// draw the final verdict
|
||||
val = SoldierRelation( pSoldierA, pSoldierB );
|
||||
BOOLEAN addhint1 = ( val >= BUDDY_OPINION || val <= HATED_OPINION );
|
||||
|
||||
swprintf( sText, gzMercCompare[15] );
|
||||
DisplayWrappedString( usPosX + MCA_NUMBEROFFSET - 10, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
usPosY += 12;
|
||||
swprintf( sText, L"%d", val );
|
||||
if ( addhint1 )
|
||||
swprintf( sText, L"%d * ", val );
|
||||
else
|
||||
swprintf( sText, L"%d", val );
|
||||
usPosY += DisplayWrappedString( usPosX + MCA_NUMBEROFFSET, usPosY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, (val > 0) ? FONT_MCOLOR_LTGREEN : (val < 0) ? FONT_MCOLOR_LTRED : MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
|
||||
val = SoldierRelation( pSoldierB, pSoldierA );
|
||||
BOOLEAN addhint2 = (val >= BUDDY_OPINION || val <= HATED_OPINION);
|
||||
|
||||
swprintf( sText, gzMercCompare[15] );
|
||||
DisplayWrappedString( usPosX + MCA_SIDEOFFSET + MCA_NUMBEROFFSET - 10, usPosY2, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
usPosY2 += 12;
|
||||
swprintf( sText, L"%d", val );
|
||||
if ( addhint2 )
|
||||
swprintf( sText, L"%d * ", val );
|
||||
else
|
||||
swprintf( sText, L"%d", val );
|
||||
usPosY2 += DisplayWrappedString( usPosX + MCA_SIDEOFFSET + MCA_NUMBEROFFSET, usPosY2, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, CAMPHIS_FONT_MED, (val > 0) ? FONT_MCOLOR_LTGREEN : (val < 0) ? FONT_MCOLOR_LTRED : MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
|
||||
// add a note that opinion is always between HATED_OPINION and BUDDY_OPINION otherwise players will shout 'bug!'
|
||||
if ( addhint1 || addhint2 )
|
||||
{
|
||||
swprintf( sText, gzMercCompare[17], HATED_OPINION, BUDDY_OPINION );
|
||||
DisplayWrappedString( usPosX, LAPTOP_SCREEN_LR_Y, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 2, FONT10ARIAL, MERCOMP_FONT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user