From 838115b61b9951f8d1014c1032366d1bde8156be Mon Sep 17 00:00:00 2001 From: hguy Date: Sun, 20 Aug 2023 14:33:46 +0200 Subject: [PATCH] FIx items red background on secondary vault display --- src/TQVaultAE.GUI/Components/EquipmentPanel.cs | 7 +++++-- src/TQVaultAE.GUI/Components/SackPanel.cs | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/TQVaultAE.GUI/Components/EquipmentPanel.cs b/src/TQVaultAE.GUI/Components/EquipmentPanel.cs index f3851a21..93be3380 100644 --- a/src/TQVaultAE.GUI/Components/EquipmentPanel.cs +++ b/src/TQVaultAE.GUI/Components/EquipmentPanel.cs @@ -763,8 +763,11 @@ protected override void PaintAreaUnderItem(PaintEventArgs e) // If we are showing the cannot equip background then // change to invalid color and adjust the alpha. else if ( - (Config.UserSettings.Default.EnableItemRequirementRestriction && !this.PlayerMeetRequierements(item)) - || !IsSuitableForCurrentPlayer(item) + !this.SecondaryVaultShown + && ( + (Config.UserSettings.Default.EnableItemRequirementRestriction && !this.PlayerMeetRequierements(item)) + || !IsSuitableForCurrentPlayer(item) + ) ) { backgroundColor = this.HighlightInvalidItemColor; diff --git a/src/TQVaultAE.GUI/Components/SackPanel.cs b/src/TQVaultAE.GUI/Components/SackPanel.cs index ed54dcf2..aae3c8b3 100644 --- a/src/TQVaultAE.GUI/Components/SackPanel.cs +++ b/src/TQVaultAE.GUI/Components/SackPanel.cs @@ -2544,8 +2544,11 @@ protected virtual void PaintAreaUnderItem(PaintEventArgs e) // If we are showing the cannot equip background then // change to invalid color and adjust the alpha. else if ( - (Config.UserSettings.Default.EnableItemRequirementRestriction && !this.PlayerMeetRequierements(item)) - || !IsSuitableForCurrentPlayer(item) + !this.SecondaryVaultShown + && ( + (Config.UserSettings.Default.EnableItemRequirementRestriction && !this.PlayerMeetRequierements(item)) + || !IsSuitableForCurrentPlayer(item) + ) ) { backgroundColor = this.HighlightInvalidItemColor;