add advanced tooltips, F3+H combo, and handle settings (#1389)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "..\..\..\Minecraft.World\net.minecraft.world.level.tile.entity.h"
|
||||
#include "..\..\MultiplayerLocalPlayer.h"
|
||||
#include "..\..\Minecraft.h"
|
||||
#include "..\..\Options.h"
|
||||
|
||||
#ifdef __ORBIS__
|
||||
#include <pad.h>
|
||||
@@ -1677,7 +1678,13 @@ vector<HtmlString> *IUIScene_AbstractContainerMenu::GetItemDescription(Slot *slo
|
||||
{
|
||||
if(slot == nullptr) return nullptr;
|
||||
|
||||
vector<HtmlString> *lines = slot->getItem()->getHoverText(nullptr, false);
|
||||
bool advanced = false;
|
||||
if (const Minecraft* pMinecraft = Minecraft::GetInstance())
|
||||
{
|
||||
if (pMinecraft->options)
|
||||
advanced = pMinecraft->options->advancedTooltips;
|
||||
}
|
||||
vector<HtmlString> *lines = slot->getItem()->getHoverText(nullptr, advanced);
|
||||
|
||||
// Add rarity to first line
|
||||
if (lines->size() > 0)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "..\..\..\Minecraft.World\net.minecraft.world.item.h"
|
||||
#include "..\..\..\Minecraft.World\net.minecraft.network.packet.h"
|
||||
#include "..\..\Minecraft.h"
|
||||
#include "..\..\Options.h"
|
||||
#include "..\..\MultiPlayerLocalPlayer.h"
|
||||
#include "..\..\ClientConnection.h"
|
||||
#include "IUIScene_TradingMenu.h"
|
||||
@@ -368,7 +369,13 @@ void IUIScene_TradingMenu::setTradeItem(int index, shared_ptr<ItemInstance> item
|
||||
|
||||
vector<HtmlString> *IUIScene_TradingMenu::GetItemDescription(shared_ptr<ItemInstance> item)
|
||||
{
|
||||
vector<HtmlString> *lines = item->getHoverText(nullptr, false);
|
||||
bool advanced = false;
|
||||
if (const Minecraft* pMinecraft = Minecraft::GetInstance())
|
||||
{
|
||||
if (pMinecraft->options)
|
||||
advanced = pMinecraft->options->advancedTooltips;
|
||||
}
|
||||
vector<HtmlString> *lines = item->getHoverText(nullptr, advanced);
|
||||
|
||||
// Add rarity to first line
|
||||
if (lines->size() > 0)
|
||||
|
||||
Reference in New Issue
Block a user