mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix action bar click-to-cast and add spellbook drag-and-drop
Left-click on action bar slots now casts spells/uses items instead of starting a drag. Right-click-drag rearranges slots. Spells can be dragged from the spellbook directly onto the action bar, replacing the old "Assign to" button row.
This commit is contained in:
parent
4e2cf0af8e
commit
37d6298b72
3 changed files with 73 additions and 63 deletions
|
|
@ -31,6 +31,11 @@ public:
|
|||
void toggle() { open = !open; }
|
||||
void setOpen(bool o) { open = o; }
|
||||
|
||||
// Drag-and-drop state for action bar assignment
|
||||
bool isDraggingSpell() const { return draggingSpell_; }
|
||||
uint32_t getDragSpellId() const { return dragSpellId_; }
|
||||
void consumeDragSpell() { draggingSpell_ = false; dragSpellId_ = 0; dragSpellIconTex_ = 0; }
|
||||
|
||||
private:
|
||||
bool open = false;
|
||||
bool pKeyWasDown = false;
|
||||
|
|
@ -54,8 +59,10 @@ private:
|
|||
// Tab state
|
||||
SpellTab currentTab = SpellTab::GENERAL;
|
||||
|
||||
// Action bar assignment
|
||||
int assigningSlot = -1;
|
||||
// Drag-and-drop from spellbook to action bar
|
||||
bool draggingSpell_ = false;
|
||||
uint32_t dragSpellId_ = 0;
|
||||
GLuint dragSpellIconTex_ = 0;
|
||||
|
||||
void loadSpellDBC(pipeline::AssetManager* assetManager);
|
||||
void loadSpellIconDBC(pipeline::AssetManager* assetManager);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue