Ammo colour in AmmoTypes.xml is now set using <red>/<green>/<blue> tags instead of <fontColour>/<grayed>/<offNormal>/<onNormal>.

For more information, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=355255&#msg_355255

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8627 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-10-06 17:51:25 +00:00
parent 50d7b679c1
commit 7a49e4921a
8 changed files with 108 additions and 83 deletions
+11 -1
View File
@@ -2141,7 +2141,7 @@ INT32 CreateIconAndTextButton( INT32 Image, const STR16 string, UINT32 uiFont,
}
// Strip off any extraneous bits from button type
BType = Type & ( BUTTON_TYPE_MASK | BUTTON_NEWTOGGLE );
BType = Type & ( BUTTON_TYPE_MASK | BUTTON_NEWTOGGLE | BUTTON_16BPPCOLOURTEXT );
// Is there a QuickButton image in the given image slot?
if(ButtonPictures[Image].vobj == NULL)
@@ -3521,6 +3521,7 @@ void DrawTextOnButton(GUI_BUTTON *b)
SetFontBackground( FONT_MCOLOR_BLACK );
SetFontForeground( (UINT8)b->sForeColor );
sForeColor = b->sForeColor;
if( b->sShadowColor != -1 )
SetFontShadow( (UINT8)b->sShadowColor );
//Override the colors if necessary.
@@ -3534,6 +3535,7 @@ void DrawTextOnButton(GUI_BUTTON *b)
SetFontForeground( (UINT8)b->sForeColorDown );
sForeColor = b->sForeColorDown;
}
if( b->uiFlags & BUTTON_ENABLED && b->Area.uiFlags & MSYS_MOUSE_IN_AREA && b->sShadowColorHilited != -1 )
{
SetFontShadow( (UINT8)b->sShadowColorHilited );
@@ -3542,6 +3544,14 @@ void DrawTextOnButton(GUI_BUTTON *b)
{
SetFontShadow( (UINT8)b->sShadowColorDown );
}
else if ( b->uiFlags & BUTTON_16BPPCOLOURTEXT )
{
SetRGBFontForeground( sForeColor );
if ( b->sShadowColor < 1 )
SetRGBFontShadow( 1 );
}
if( b->uiFlags & BUTTON_CLICKED_ON && b->fShiftText )
{ // Was the button clicked on? if so, move the text slightly for the illusion
// that the text moved into the screen.
+1
View File
@@ -70,6 +70,7 @@
#define BUTTON_NEWTOGGLE 0x00002000
#define BUTTON_FORCE_UNDIRTY 0x00004000 // no matter what happens this buttons does NOT get marked dirty
#define BUTTON_IGNORE_CLICKS 0x00008000 // Ignore any clicks on this button
#define BUTTON_16BPPCOLOURTEXT 0x00010000 // Use 16 bit colours for the text of this button
#define BUTTON_DISABLED_CALLBACK 0x80000000
#define BUTTON_SOUND_NONE 0x00
+11
View File
@@ -241,6 +241,17 @@ void SetRGBFontShadow( UINT32 uiRed, UINT32 uiGreen, UINT32 uiBlue )
}
//end Kris
// Flugente: set 16 bit colour directly
void SetRGBFontForeground( UINT16 usFontForeground16 )
{
FontForeground16 = usFontForeground16;
}
void SetRGBFontShadow( UINT16 usFontShadow16 )
{
FontShadow16 = usFontShadow16;
}
//*****************************************************************************
// ResetFontObjectPalette
//
+4
View File
@@ -118,6 +118,10 @@ void SetRGBFontForeground( UINT32 uiRed, UINT32 uiGreen, UINT32 uiBlue );
void SetRGBFontBackground( UINT32 uiRed, UINT32 uiGreen, UINT32 uiBlue );
void SetRGBFontShadow( UINT32 uiRed, UINT32 uiGreen, UINT32 uiBlue );
// Flugente: set 16 bit colour directly
void SetRGBFontForeground( UINT16 usFontForeground16 );
void SetRGBFontShadow( UINT16 usFontShadow16 );
BOOLEAN ResetFontObjectPalette(INT32 iFont);
UINT16 *SetFontObjectPalette8BPP(INT32 iFont, SGPPaletteEntry *pPal8);
UINT16 *SetFontObjectPalette16BPP(INT32 iFont, UINT16 *pPal16);