Fix text coloring issue for equip items in the blacksmith menu that are not valid for enhancement. Release Build 8113.

This commit is contained in:
sigonasr2 2024-03-10 18:38:02 -05:00
parent e4e2a0c55e
commit 7dc8d19dca
5 changed files with 8 additions and 24 deletions

View File

@ -100,13 +100,16 @@ public:
std::string itemName=itemRef.lock()->DisplayName();
vf2d scaledSize={std::min(1.f,(rect.size.x-6-iconSize.x)/game->GetTextSizeProp(itemName).x),1};
if(!canEnhance&&fadeOutIfMissingRequirements){
itemName="#666666"+itemName;
bool missingRequirements=!canEnhance&&fadeOutIfMissingRequirements;
Pixel itemNameTextCol=WHITE;
if(missingRequirements){
itemNameTextCol=DARK_GREY;
}
if(locked&&hideLabelWhileLocked)std::for_each(itemName.begin(),itemName.end(),[](char&c){if(c>='0'&&c<='z'){c='?';}});
window.DrawShadowStringPropDecal(rect.pos+vf2d{4,4}+vf2d{iconSize.x,iconSize.y/2-4},itemName,WHITE,BLACK,scaledSize);
window.DrawShadowStringPropDecal(rect.pos+vf2d{4,4}+vf2d{iconSize.x,iconSize.y/2-4},itemName,itemNameTextCol,BLACK,scaledSize);
#pragma endregion
if(showQuantity&&itemRef.lock()->Amt()!=INFINITE){

View File

@ -8,6 +8,4 @@ Materials for initial craft seems to be wrong? need to recheck
do we need a minimap? (maybe with fog of war?) Maybe polling that once testing with more people.
should gemstones dropp from boss stages aswell? (Maybe lower droprate?)
Funny text colors with text color override on blacksmith menu
Toggle for displaying error messages

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 5
#define VERSION_PATCH 1
#define VERSION_BUILD 8105
#define VERSION_BUILD 8113
#define stringify(a) stringify_(a)
#define stringify_(a) #a

View File

@ -4594,24 +4594,7 @@ namespace olc
{ bHasMouseFocus = state; }
void PixelGameEngine::olc_UpdateKeyFocus(bool state)
{
bHasInputFocus = state;
if(!state){ //Drop all key and mouse inputs as we have lost input focus.
// Compare hardware input states from previous frame
auto ScanHardware = [&](HWButton* pKeys, bool* pStateOld, bool* pStateNew, uint32_t nKeyCount)
{
for (uint32_t i = 0; i < nKeyCount; i++)
{
if(pKeys==pKeyboardState)olc_UpdateKeyState(i,false);
else if(pKeys==pMouseState)olc_UpdateMouseState(i,false);
}
};
ScanHardware(pKeyboardState, pKeyOldState, pKeyNewState, 256);
ScanHardware(pMouseState, pMouseOldState, pMouseNewState, nMouseButtons);
}
}
{ bHasInputFocus = state; }
void PixelGameEngine::olc_DropFiles(int32_t x, int32_t y, const std::vector<std::string>& vFiles)
{