Adjusts to also hide impossible item silhouettes
This commit is contained in:
@@ -45,9 +45,11 @@ namespace game::window
|
||||
|
||||
for (int index = 0; index < Item::ITEM_COUNT; index++)
|
||||
{
|
||||
if (index == Item::INVALID) continue;
|
||||
|
||||
auto type = (Item::Type)index;
|
||||
auto seen = values.contains(type);
|
||||
|
||||
//Hide invalid items and impossible-to-obtain items when not seen.
|
||||
if (!seen && (Item::CATEGORIES[type] == Item::INVALID || Item::RARITIES[type] == Item::IMPOSSIBLE)) continue;
|
||||
|
||||
auto columns = (int)(texture.size.x / ITEM_SIZE.x);
|
||||
auto crop = vec2(type % columns, type / columns) * ITEM_SIZE;
|
||||
@@ -59,7 +61,6 @@ namespace game::window
|
||||
auto cursorScreenPos = ImGui::GetCursorScreenPos();
|
||||
|
||||
auto quantity = 0;
|
||||
auto seen = values.contains(type);
|
||||
|
||||
if (seen)
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace game::window
|
||||
ImGui::PushItemWidth(100);
|
||||
for (int i = 0; i < Item::ITEM_COUNT; i++)
|
||||
{
|
||||
if (i == Item::INVALID) continue;
|
||||
if (Item::CATEGORIES[i] == Item::INVALID) continue;
|
||||
ImGui::PushID(i);
|
||||
|
||||
//TODO: Probably a cleaner way to do this, maybe
|
||||
|
||||
Reference in New Issue
Block a user