diff --git a/Tactical/Interface Enhanced.cpp b/Tactical/Interface Enhanced.cpp index 7da3864f1..c021d28dc 100644 --- a/Tactical/Interface Enhanced.cpp +++ b/Tactical/Interface Enhanced.cpp @@ -1401,7 +1401,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr ///////////////////////////////////////////////////////////////////////////////// // WEAPONS ///////////////////////////////////////////////////////////////////////////////// - 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 ) { if (gubDescBoxPage == 1) { @@ -2281,6 +2281,8 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr } //////////////////// REPAIR EASE + // not for weapons. They have this one their primary page + if ( !(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) ) { swprintf( pStr, L"%s%s", szUDBGenCommonStatsTooltipText[ 0 ], szUDBGenCommonStatsExplanationsTooltipText[ 0 ]); SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + 0 ]), pStr ); @@ -2295,7 +2297,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr // UDB page. They appear only for non-weapon items (no room in the weapon page). if (gubDescBoxPage == 1 && - !(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH ) ) + ( !(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH ) || gubDescGenPage == 1 ) ) { iFirstDataRegion = iRegionsCreated; CHAR16 pStr[1000]; @@ -5592,13 +5594,17 @@ void DrawMiscStats( OBJECTTYPE * gpItemDescObject ) if (gubDescBoxPage == 1) { ////////////////// REPAIR EASE - if ( !Item[gpItemDescObject->usItem].repairable ) + // not for weapons. They have this one their primary page + if ( !(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) ) { - BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 35, gItemDescGenRegions[0][0].sLeft + sOffsetX, gItemDescGenRegions[0][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); - } - else - { - BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 10, gItemDescGenRegions[0][0].sLeft + sOffsetX, gItemDescGenRegions[0][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); + if ( !Item[gpItemDescObject->usItem].repairable ) + { + BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 35, gItemDescGenRegions[0][0].sLeft + sOffsetX, gItemDescGenRegions[0][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); + } + else + { + BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 10, gItemDescGenRegions[0][0].sLeft + sOffsetX, gItemDescGenRegions[0][0].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); + } } DrawSecondaryStats( gpItemDescObject ); @@ -12426,6 +12432,8 @@ void DrawMiscValues( OBJECTTYPE * gpItemDescObject ) SetFontForeground( 6 ); //////////////////// REPAIR EASE + // not for weapons. They have this one their primary page + if ( !(Item[ gpItemDescObject->usItem ].usItemClass & IC_WEAPON || Item[ gpItemDescObject->usItem ].usItemClass & IC_PUNCH) ) { // Set line to draw into ubNumLine = 0; diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 5e1c07163..a1c1d8d99 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -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( ); } diff --git a/Tactical/Interface Panels.cpp b/Tactical/Interface Panels.cpp index 796d926fc..ec8314eca 100644 --- a/Tactical/Interface Panels.cpp +++ b/Tactical/Interface Panels.cpp @@ -438,6 +438,8 @@ BOOLEAN gfDeductPoints; // By saving this in memory, we tell the DescBox which background and values to draw, and make sure that we end up // on the same page every time we open the description box. UDB buttons allow switching between pages. UINT8 gubDescBoxPage; +// silversurfer: Now we also have a secondary page on the general tab for weapons so we can look at their secondary attributes. +UINT8 gubDescGenPage; // Record which line we're looking at. This only applied to the Advanced tab in description boxes. UINT8 gubDescBoxLine; // Record how many lines this item has to display. This only applies to the Advanced tab. diff --git a/Tactical/Interface Panels.h b/Tactical/Interface Panels.h index f002eb65d..1254b0f66 100644 --- a/Tactical/Interface Panels.h +++ b/Tactical/Interface Panels.h @@ -161,6 +161,8 @@ BOOLEAN ChangeDropPackStatus(SOLDIERTYPE *pSoldier, BOOLEAN newStatus); // By saving this in memory, we tell the DescBox which background and values to draw, and make sure that we end up // on the same page every time we open the description box. UDB buttons allow switching between pages. extern UINT8 gubDescBoxPage; +// silversurfer: Now we also have a secondary page on the general tab for weapons so we can look at their secondary attributes. +extern UINT8 gubDescGenPage; // Record which line we're looking at. This only applied to the Advanced tab in description boxes. extern UINT8 gubDescBoxLine; // Record how many lines there are for the current item in the Advanced tab. diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 1941aac7f..17a4ac897 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -6957,7 +6957,7 @@ STR16 gzItemDescGenIndexes[] = STR16 gzUDBButtonTooltipText[]= { L"|说|明|页|面:\n \n显示该物品基本的文字描述。", - L"|常|规|性|能|页|面:\n \n显示该物品的详细性能数据。", + L"|常|规|性|能|页|面:\n \n显示该物品的详细性能数据。\n \nWeapons: Click again to see second page.", // TODO.Translate L"|进|阶|性|能|页|面:\n \n显示使用该物品的额外效果。", }; diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index d0b23f273..c005ff095 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -6954,7 +6954,7 @@ STR16 gzItemDescGenIndexes[] = STR16 gzUDBButtonTooltipText[]= { L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.", - L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.", + L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.", L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.", }; diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 4a3eec39f..a3247f0b2 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -6942,7 +6942,7 @@ STR16 gzItemDescGenIndexes[] = STR16 gzUDBButtonTooltipText[]= { L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.", - L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.", + L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.", L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.", }; diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index dbc61cee5..b10c5aea0 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -6932,7 +6932,7 @@ STR16 gzItemDescGenIndexes[] = STR16 gzUDBButtonTooltipText[]= { L"|P|a|g|e |d|e |d|e|s|c|r|i|p|t|i|o|n :\n \nMontre des informations textuelles de base sur cet objet.", - L"|P|r|o|p|r|i|é|t|é|s |g|é|n|é|r|a|l|e|s :\n \nMontre des données spécifiques de cet objet.", + L"|P|r|o|p|r|i|é|t|é|s |g|é|n|é|r|a|l|e|s :\n \nMontre des données spécifiques de cet objet.\n \nWeapons: Click again to see second page.", // TODO.Translate L"|P|r|o|p|r|i|é|t|é|s |a|v|a|n|c|é|e|s :\n \nMontre des bonus donnés par cet objet.", }; diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 5eee5d744..4f090776c 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -6767,7 +6767,7 @@ STR16 gzItemDescGenIndexes[] = STR16 gzUDBButtonTooltipText[]= { L"|B|e|s|c|h|r|e|i|b|u|n|g:\n \nZeigt allgemeine Informationen über den Gegenstand.", - L"|A|l|l|g|e|m|e|i|n|e |E|i|g|e|n|s|c|h|a|f|t|e|n:\n \nZeigt typische Daten über den Gegenstand.", + L"|A|l|l|g|e|m|e|i|n|e |E|i|g|e|n|s|c|h|a|f|t|e|n:\n \nZeigt typische Daten über den Gegenstand.\n \nWaffen: Nochmals klicken um zweite Seite anzuzeigen.", L"|E|r|w|e|i|t|e|r|t|e |E|i|g|e|n|s|c|h|a|f|t|e|n:\n \nZeigt Vor-/Nachteile des Gegenstandes.", }; diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index baeb78120..d3fd3c81e 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -6940,7 +6940,7 @@ STR16 gzItemDescGenIndexes[] = STR16 gzUDBButtonTooltipText[]= { L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.", - L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.", + L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.", L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.", }; diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 65666c90f..ce8d01245 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -6958,7 +6958,7 @@ STR16 gzItemDescGenIndexes[] = STR16 gzUDBButtonTooltipText[]= { L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.", - L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.", + L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.", L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.", }; diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index f3bab2823..fdeab35ae 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -6942,7 +6942,7 @@ STR16 gzItemDescGenIndexes[] = STR16 gzUDBButtonTooltipText[]= { L"|И|н|ф|о|р|м|а|ц|и|о|н|н|а|я |ч|а|с|т|ь:\n \nЗдесь вы сможете ознакомиться \nс общим описанием предмета.", - L"|П|а|р|а|м|е|т|р|ы:\n \nЗдесь вы сможете ознакомиться \nс индивидуальными свойствами и параметрами предмета.", + L"|П|а|р|а|м|е|т|р|ы:\n \nЗдесь вы сможете ознакомиться \nс индивидуальными свойствами и параметрами предмета.\n \nWeapons: Click again to see second page.", // TODO.Translate L"|Д|о|п|о|л|н|и|т|е|л|ь|н|а|я| |и|н|ф|о|р|м|а|ц|и|я:\n \nЗдесь вы сможете ознакомиться \nс бонусами, дающимися данным предметом.", }; diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index bda2ebdeb..aace58af1 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -6958,7 +6958,7 @@ STR16 gzItemDescGenIndexes[] = STR16 gzUDBButtonTooltipText[]= { L"|D|e|s|c|r|i|p|t|i|o|n |P|a|g|e:\n \nShows basic textual information about this item.", - L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.", + L"|G|e|n|e|r|a|l |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows specific data about this item.\n \nWeapons: Click again to see second page.", L"|A|d|v|a|n|c|e|d| |P|r|o|p|e|r|t|i|e|s |P|a|g|e:\n \nShows bonuses given by this item.", };