diff --git a/Source/options.cpp b/Source/options.cpp index 17a62b975..a275f1e4c 100644 --- a/Source/options.cpp +++ b/Source/options.cpp @@ -939,6 +939,7 @@ GraphicsOptions::GraphicsOptions() #endif , limitFPS("FPS Limiter", OptionEntryFlags::None, N_("FPS Limiter"), N_("FPS is limited to avoid high CPU load. Limit considers refresh rate."), true) , showFPS("Show FPS", OptionEntryFlags::None, N_("Show FPS"), N_("Displays the FPS in the upper left corner of the screen."), false) + , showItemGraphicsInStores("Show Item Graphics in Stores", OptionEntryFlags::None, N_("Show Item Graphics in Stores"), N_("Show item graphics to the left of item desriptions in store menus."), false) , showHealthValues("Show health values", OptionEntryFlags::None, N_("Show health values"), N_("Displays current / max health value on health globe."), false) , showManaValues("Show mana values", OptionEntryFlags::None, N_("Show mana values"), N_("Displays current / max mana value on mana globe."), false) { @@ -976,6 +977,7 @@ std::vector GraphicsOptions::GetEntries() &zoom, &limitFPS, &showFPS, + &showItemGraphicsInStores, &showHealthValues, &showManaValues, &colorCycling, diff --git a/Source/options.h b/Source/options.h index d5d445db8..5a29d356b 100644 --- a/Source/options.h +++ b/Source/options.h @@ -505,6 +505,8 @@ struct GraphicsOptions : OptionCategoryBase { #endif /** @brief Enable FPS Limiter. */ OptionEntryBoolean limitFPS; + /** @brief Show item graphics to the left of item desriptions in store menus. */ + OptionEntryBoolean showItemGraphicsInStores; /** @brief Show FPS, even without the -f command line flag. */ OptionEntryBoolean showFPS; /** @brief Display current/max health values on health globe. */ diff --git a/Source/stores.cpp b/Source/stores.cpp index bd3d2f52d..30e226076 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -2288,7 +2288,7 @@ void PrintSString(const Surface &out, int margin, int line, string_view text, Ui const int halfCursWidth = cursWidth / 2; const int halfCursHeight = cursHeight / 2; - if (cursId >= 0) { + if (*sgOptions.Graphics.showItemGraphicsInStores && cursId >= 0) { const ClxSprite itemSprite = GetInvItemSprite(static_cast(CURSOR_FIRSTITEM) + cursId); const OwnedSurface itemSurface(itemSprite.width(), itemSprite.height()); SDL_FillRect(itemSurface.surface, nullptr, 1); @@ -2302,7 +2302,7 @@ void PrintSString(const Surface &out, int margin, int line, string_view text, Ui ClxDraw(out, rect.position + spriteOffset, halfSprite[0]); } - if (cursIndent) { + if (*sgOptions.Graphics.showItemGraphicsInStores && cursIndent) { const Rectangle textRect { { rect.position.x + halfCursWidth + 8, rect.position.y }, { rect.size.width - halfCursWidth + 8, rect.size.height } }; DrawString(out, text, textRect, flags); } else {