mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
fix: correct tooltip comparison logic and streamline stack setting in SlotView
This commit is contained in:
parent
1e270d4adb
commit
310dc9ebb2
1 changed files with 2 additions and 2 deletions
|
|
@ -153,7 +153,7 @@ static bool is_same_tooltip(const ItemStack& stack, const ItemStack& cache) {
|
||||||
auto description = stack.getField("description");
|
auto description = stack.getField("description");
|
||||||
auto cDescription = cache.getField("description");
|
auto cDescription = cache.getField("description");
|
||||||
|
|
||||||
if (((caption != nullptr) != (description != nullptr)) ||
|
if (((caption != nullptr) != (cCaption != nullptr)) ||
|
||||||
((description != nullptr) != (cDescription != nullptr))) {
|
((description != nullptr) != (cDescription != nullptr))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -250,7 +250,7 @@ void SlotView::draw(const DrawContext& pctx, const Assets& assets) {
|
||||||
cache.countStr = std::to_wstring(stack.getCount());
|
cache.countStr = std::to_wstring(stack.getCount());
|
||||||
}
|
}
|
||||||
refreshTooltip(stack, item);
|
refreshTooltip(stack, item);
|
||||||
cache.stack.set(ItemStack(stack.getItemId(), stack.getCount()));
|
cache.stack.set(stack);
|
||||||
|
|
||||||
glm::vec4 tint(1, 1, 1, isEnabled() ? 1 : 0.5f);
|
glm::vec4 tint(1, 1, 1, isEnabled() ? 1 : 0.5f);
|
||||||
glm::vec2 pos = calcPos();
|
glm::vec2 pos = calcPos();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue