mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 00:00:13 +00:00
Add shift-click spell linking to chat from spellbook
This commit is contained in:
parent
25c5d257ae
commit
f5de4d2031
3 changed files with 36 additions and 3 deletions
|
|
@ -476,6 +476,19 @@ void GameScreen::render(game::GameHandler& gameHandler) {
|
|||
// Spellbook (P key toggle handled inside)
|
||||
spellbookScreen.render(gameHandler, core::Application::getInstance().getAssetManager());
|
||||
|
||||
// Insert spell link into chat if player shift-clicked a spellbook entry
|
||||
{
|
||||
std::string pendingSpellLink = spellbookScreen.getAndClearPendingChatLink();
|
||||
if (!pendingSpellLink.empty()) {
|
||||
size_t curLen = strlen(chatInputBuffer);
|
||||
if (curLen + pendingSpellLink.size() + 1 < sizeof(chatInputBuffer)) {
|
||||
strncat(chatInputBuffer, pendingSpellLink.c_str(), sizeof(chatInputBuffer) - curLen - 1);
|
||||
chatInputMoveCursorToEnd = true;
|
||||
refocusChatInput = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Talents (N key toggle handled inside)
|
||||
talentScreen.render(gameHandler);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue