mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Add bag bar drag-to-reorder, fix three wrong WotLK opcodes
Bag bar: left-click drag bags to swap positions using CMSG_SWAP_ITEM with INVENTORY_SLOT_BAG_0 (255). Local optimistic swap for instant feedback. Camera controller now respects ImGui WantCaptureMouse. Vendor auto-open bags only triggers once per session. Fix opcodes: CMSG_GAMEOBJECT_USE 0x01B→0x0B1 (typo caused SMSG_FORCEACTIONSHOW spam), CMSG_CANCEL_AURA 0x033→0x136, SMSG_SELL_ITEM 0x1A4→0x1A1.
This commit is contained in:
parent
328ec9ea78
commit
38ad368c82
9 changed files with 168 additions and 48 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "rendering/camera_controller.hpp"
|
||||
#include <algorithm>
|
||||
#include <imgui.h>
|
||||
#include "rendering/terrain_manager.hpp"
|
||||
#include "rendering/wmo_renderer.hpp"
|
||||
#include "rendering/m2_renderer.hpp"
|
||||
|
|
@ -1416,14 +1417,17 @@ void CameraController::processMouseButton(const SDL_MouseButtonEvent& event) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Don't capture mouse when ImGui wants it (hovering UI windows)
|
||||
bool uiWantsMouse = ImGui::GetIO().WantCaptureMouse;
|
||||
|
||||
if (event.button == SDL_BUTTON_LEFT) {
|
||||
leftMouseDown = (event.state == SDL_PRESSED);
|
||||
leftMouseDown = (event.state == SDL_PRESSED) && !uiWantsMouse;
|
||||
if (event.state == SDL_PRESSED && event.clicks >= 2) {
|
||||
autoRunning = false;
|
||||
}
|
||||
}
|
||||
if (event.button == SDL_BUTTON_RIGHT) {
|
||||
rightMouseDown = (event.state == SDL_PRESSED);
|
||||
rightMouseDown = (event.state == SDL_PRESSED) && !uiWantsMouse;
|
||||
}
|
||||
|
||||
bool anyDown = leftMouseDown || rightMouseDown;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue