mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
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:
@@ -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( );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user