[nostalgia] Cleanup

This commit is contained in:
Gary Talent 2022-03-11 22:01:31 -06:00
parent 7df978605f
commit 6885aca0e8

View File

@ -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 {
const auto pixelSize = m_pixelsDrawer.pixelSize(paneSz);
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 = ox::clamp(m_scrollOffset.x, -(sheetSize.x / 2), 0.f);
}