mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add shift-click chat links to AH bids and owner auctions tabs
This commit is contained in:
parent
99d1f5778c
commit
23cfb9b640
1 changed files with 21 additions and 1 deletions
|
|
@ -11858,9 +11858,19 @@ void GameScreen::renderAuctionHouseWindow(game::GameHandler& gameHandler) {
|
|||
}
|
||||
}
|
||||
ImGui::TextColored(bqc, "%s", name.c_str());
|
||||
// Tooltip
|
||||
// Tooltip and shift-click
|
||||
if (ImGui::IsItemHovered() && info && info->valid)
|
||||
inventoryScreen.renderItemTooltip(*info);
|
||||
if (ImGui::IsItemHovered() && ImGui::IsMouseClicked(ImGuiMouseButton_Left) &&
|
||||
ImGui::GetIO().KeyShift && info && info->valid && !info->name.empty()) {
|
||||
std::string link = buildItemChatLink(info->entry, info->quality, info->name);
|
||||
size_t curLen = strlen(chatInputBuffer);
|
||||
if (curLen + link.size() + 1 < sizeof(chatInputBuffer)) {
|
||||
strncat(chatInputBuffer, link.c_str(), sizeof(chatInputBuffer) - curLen - 1);
|
||||
chatInputMoveCursorToEnd = true;
|
||||
refocusChatInput = true;
|
||||
}
|
||||
}
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::Text("%u", a.stackCount);
|
||||
ImGui::TableSetColumnIndex(2);
|
||||
|
|
@ -11925,6 +11935,16 @@ void GameScreen::renderAuctionHouseWindow(game::GameHandler& gameHandler) {
|
|||
ImGui::TextColored(oqc, "%s", name.c_str());
|
||||
if (ImGui::IsItemHovered() && info && info->valid)
|
||||
inventoryScreen.renderItemTooltip(*info);
|
||||
if (ImGui::IsItemHovered() && ImGui::IsMouseClicked(ImGuiMouseButton_Left) &&
|
||||
ImGui::GetIO().KeyShift && info && info->valid && !info->name.empty()) {
|
||||
std::string link = buildItemChatLink(info->entry, info->quality, info->name);
|
||||
size_t curLen = strlen(chatInputBuffer);
|
||||
if (curLen + link.size() + 1 < sizeof(chatInputBuffer)) {
|
||||
strncat(chatInputBuffer, link.c_str(), sizeof(chatInputBuffer) - curLen - 1);
|
||||
chatInputMoveCursorToEnd = true;
|
||||
refocusChatInput = true;
|
||||
}
|
||||
}
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::Text("%u", a.stackCount);
|
||||
ImGui::TableSetColumnIndex(2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue