Skip to content

Commit 80d79ac

Browse files
committed
Added support for smooth scroll mod
1 parent e4eb280 commit 80d79ac

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CHANGELOG.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.2.3
2+
Added support for Prevter's [Smooth Scroll](https://geode-sdk.org/mods/prevter.smooth-scroll) mod
3+
14
# 1.2.2
25
Fixed dependency issues on mobile
36

src/windows.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,15 @@ void WindowsZoomManager::onScroll(float y, float x) {
138138
return;
139139
}
140140
}
141-
142-
if (y > 0) {
143-
zoom(-0.1f);
141+
142+
float zoomDelta = 0.1f;
143+
144+
if (Loader::get()->isModLoaded("prevter.smooth-scroll")) {
145+
zoom(-y * 0.01f);
146+
} else if (y > 0) {
147+
zoom(-zoomDelta);
144148
} else {
145-
zoom(0.1f);
149+
zoom(zoomDelta);
146150
}
147151
}
148152

@@ -153,7 +157,7 @@ void WindowsZoomManager::onScreenModified() {
153157
clampPlayLayerPos(playLayer);
154158
if (!isPaused) return;
155159

156-
if (SettingsManager::get()->autoShowMenu && playLayer->getScale() == 1.0f) {
160+
if (SettingsManager::get()->autoShowMenu && playLayer->getScale() <= 1.05f) {
157161
setPauseMenuVisible(true);
158162
}
159163
}

0 commit comments

Comments
 (0)