[nostalgia] Cleanup
This commit is contained in:
parent
7df978605f
commit
6885aca0e8
@ -45,7 +45,7 @@ void TileSheetEditorView::scrollV(const geo::Vec2 &paneSz, float wheel, bool zoo
|
|||||||
void TileSheetEditorView::scrollH(const geo::Vec2 &paneSz, float wheelh) noexcept {
|
void TileSheetEditorView::scrollH(const geo::Vec2 &paneSz, float wheelh) noexcept {
|
||||||
const auto pixelSize = m_pixelsDrawer.pixelSize(paneSz);
|
const auto pixelSize = m_pixelsDrawer.pixelSize(paneSz);
|
||||||
const ImVec2 sheetSize(pixelSize.x * static_cast<float>(m_model.activeSubSheet()->columns) * TileWidth,
|
const ImVec2 sheetSize(pixelSize.x * static_cast<float>(m_model.activeSubSheet()->columns) * TileWidth,
|
||||||
pixelSize.y * static_cast<float>(m_model.activeSubSheet()->rows) * TileHeight);
|
pixelSize.y * static_cast<float>(m_model.activeSubSheet()->rows) * TileHeight);
|
||||||
m_scrollOffset.x += wheelh * 0.1f;
|
m_scrollOffset.x += wheelh * 0.1f;
|
||||||
m_scrollOffset.x = ox::clamp(m_scrollOffset.x, -(sheetSize.x / 2), 0.f);
|
m_scrollOffset.x = ox::clamp(m_scrollOffset.x, -(sheetSize.x / 2), 0.f);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user