New feature for UDB

It is now possible to see secondary attributes on the general tab for weapons. Just click on the tab a second time.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6428 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2013-09-21 16:03:47 +00:00
parent 6f2c3bc833
commit f3a36ee7c6
13 changed files with 57 additions and 22 deletions
+28 -5
View File
@@ -6288,7 +6288,7 @@ INT8 DetermineShowBox( )
{
if (UsingEDBSystem() > 0)
{
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_PUNCH))
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_PUNCH) && gubDescGenPage == 0)
{
switch (gubDescBoxPage)
{
@@ -6332,7 +6332,7 @@ INT8 DetermineShowBox( )
}
else if(UsingNewInventorySystem() == true) //NIV
{
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_PUNCH) && UsingEDBSystem() > 0 )
if (Item[gpItemDescObject->usItem].usItemClass & (IC_WEAPON|IC_PUNCH) && UsingEDBSystem() > 0 && gubDescGenPage == 0 )
{
if (guiCurrentItemDescriptionScreen == MAP_SCREEN)
{
@@ -6769,10 +6769,14 @@ void RenderItemDescriptionBox( )
//HEADROCK/CHRISL: This condition needs to run differently depending on whether EDB is active of not
if(UsingEDBSystem() > 0)
{
if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH )
if ( (Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) && gubDescGenPage == 0)
{
DrawWeaponStats(gpItemDescObject);
}
else if ( (Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) && gubDescGenPage == 1)
{
DrawMiscStats(gpItemDescObject);
}
else if ( Item[ gpItemDescObject->usItem ].usItemClass == IC_AMMO )
{
DrawAmmoStats(gpItemDescObject);
@@ -7169,8 +7173,19 @@ void RenderItemDescriptionBox( )
{
if(UsingEDBSystem() > 0)
{
SetFontShadow( ITEMDESC_FONTSHADOW3 );
DrawWeaponValues(gpItemDescObject);
if ( gubDescGenPage == 0)
{
SetFontShadow( ITEMDESC_FONTSHADOW3 );
DrawWeaponValues(gpItemDescObject);
}
else
{
//Labels
SetFont( BLOCKFONT2 );
SetFontForeground( 6 );
SetFontShadow( DEFAULT_SHADOW );
DrawMiscValues(gpItemDescObject);
}
}
else
{
@@ -12538,6 +12553,14 @@ void DeletePool(ITEM_POOL *pItemPool)
void ItemDescTabButtonCallback( GUI_BUTTON *btn, INT32 reason )
{
// silversurfer: We clicked on the general tab a second time. Make it toggle between first and second page.
// This is only used for weapons at the moment because there was no space for the secondary attributes.
if ( gubDescBoxPage == 1 && btn->UserData[0] == 1 && gfLeftButtonState )
if ( gubDescGenPage == 0 )
gubDescGenPage = 1;
else
gubDescGenPage = 0;
gubDescBoxPage = btn->UserData[0];
HandleItemDescTabButton( );
}