mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Use rich item tooltips in quest details window; fix shift-click chat link ordering
This commit is contained in:
parent
43c239ee2f
commit
4394f93a17
1 changed files with 8 additions and 17 deletions
|
|
@ -511,7 +511,10 @@ void GameScreen::render(game::GameHandler& gameHandler) {
|
||||||
inventoryScreen.setGameHandler(&gameHandler);
|
inventoryScreen.setGameHandler(&gameHandler);
|
||||||
inventoryScreen.render(gameHandler.getInventory(), gameHandler.getMoneyCopper());
|
inventoryScreen.render(gameHandler.getInventory(), gameHandler.getMoneyCopper());
|
||||||
|
|
||||||
// Insert item link into chat if player shift-clicked a bag item
|
// Character screen (C key toggle handled inside render())
|
||||||
|
inventoryScreen.renderCharacterScreen(gameHandler);
|
||||||
|
|
||||||
|
// Insert item link into chat if player shift-clicked any inventory/equipment slot
|
||||||
{
|
{
|
||||||
std::string pendingLink = inventoryScreen.getAndClearPendingChatLink();
|
std::string pendingLink = inventoryScreen.getAndClearPendingChatLink();
|
||||||
if (!pendingLink.empty()) {
|
if (!pendingLink.empty()) {
|
||||||
|
|
@ -524,9 +527,6 @@ void GameScreen::render(game::GameHandler& gameHandler) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Character screen (C key toggle handled inside render())
|
|
||||||
inventoryScreen.renderCharacterScreen(gameHandler);
|
|
||||||
|
|
||||||
if (inventoryScreen.consumeEquipmentDirty() || gameHandler.consumeOnlineEquipmentDirty()) {
|
if (inventoryScreen.consumeEquipmentDirty() || gameHandler.consumeOnlineEquipmentDirty()) {
|
||||||
updateCharacterGeosets(gameHandler.getInventory());
|
updateCharacterGeosets(gameHandler.getInventory());
|
||||||
updateCharacterTextures(gameHandler.getInventory());
|
updateCharacterTextures(gameHandler.getInventory());
|
||||||
|
|
@ -7411,22 +7411,13 @@ void GameScreen::renderQuestDetailsWindow(game::GameHandler& gameHandler) {
|
||||||
|
|
||||||
if (iconTex) {
|
if (iconTex) {
|
||||||
ImGui::Image((void*)(intptr_t)iconTex, ImVec2(18, 18));
|
ImGui::Image((void*)(intptr_t)iconTex, ImVec2(18, 18));
|
||||||
if (ImGui::IsItemHovered() && info && info->valid) {
|
if (ImGui::IsItemHovered() && info && info->valid)
|
||||||
ImGui::BeginTooltip();
|
inventoryScreen.renderItemTooltip(*info);
|
||||||
ImGui::TextColored(nameCol, "%s", info->name.c_str());
|
|
||||||
if (!info->description.empty())
|
|
||||||
ImGui::TextWrapped("%s", info->description.c_str());
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
}
|
}
|
||||||
ImGui::TextColored(nameCol, " %s", label.c_str());
|
ImGui::TextColored(nameCol, " %s", label.c_str());
|
||||||
if (ImGui::IsItemHovered() && info && info->valid && !info->description.empty()) {
|
if (ImGui::IsItemHovered() && info && info->valid)
|
||||||
ImGui::BeginTooltip();
|
inventoryScreen.renderItemTooltip(*info);
|
||||||
ImGui::TextColored(nameCol, "%s", info->name.c_str());
|
|
||||||
ImGui::TextWrapped("%s", info->description.c_str());
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!quest.rewardChoiceItems.empty()) {
|
if (!quest.rewardChoiceItems.empty()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue