[nostalgia/core/studio] Fix issue with pixel idx lookup in draw command
This commit is contained in:
@@ -87,7 +87,8 @@ void TileSheetEditorImGui::drawTileSheet(const geo::Vec2 &fbSize) noexcept {
|
||||
if (wheelh != 0) {
|
||||
m_tileSheetEditor.scrollH(fbSize, wheelh);
|
||||
}
|
||||
if (io.MouseDown[0]) {
|
||||
if (io.MouseDown[0] && m_prevMouseDownPos != mousePos) {
|
||||
m_prevMouseDownPos = mousePos;
|
||||
auto clickPos = mousePos;
|
||||
const auto &winPos = ImGui::GetWindowPos();
|
||||
clickPos.x -= winPos.x + 10;
|
||||
@@ -96,6 +97,7 @@ void TileSheetEditorImGui::drawTileSheet(const geo::Vec2 &fbSize) noexcept {
|
||||
}
|
||||
}
|
||||
if (io.MouseReleased[0]) {
|
||||
m_prevMouseDownPos = {-1, -1};
|
||||
m_tileSheetEditor.releaseMouseButton();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user