Skip to content

Commit a702d28

Browse files
committed
Fix #65.
1 parent 385394b commit a702d28

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

main/src/com/miloshpetrov/sol2/ui/SolInputManager.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,10 @@ private void addRemoveScreens() {
211211

212212
private void updateCursor(SolApplication cmp) {
213213
if (cmp.isMobile()) return;
214+
SolGame game = cmp.getGame();
215+
214216
myMousePos.set(myPtrs[0].x, myPtrs[0].y);
215-
if (cmp.getOptions().controlType != GameOptions.CONTROL_KB) {
216-
SolGame game = cmp.getGame();
217+
if (cmp.getOptions().controlType == GameOptions.CONTROL_MIXED || cmp.getOptions().controlType == GameOptions.CONTROL_MOUSE) {
217218
if (game == null || myMouseOnUi) {
218219
myCurrCursor = myUiCursor;
219220
} else {
@@ -222,7 +223,7 @@ private void updateCursor(SolApplication cmp) {
222223
}
223224
return;
224225
}
225-
if (myMousePrevPos.epsilonEquals(myMousePos, 0)) {
226+
if (myMousePrevPos.epsilonEquals(myMousePos, 0) && game != null && getTopScreen() != game.getScreens().menuScreen) {
226227
myMouseIdleTime += Const.REAL_TIME_STEP;
227228
myCurrCursor = myMouseIdleTime < CURSOR_SHOW_TIME ? myUiCursor : null;
228229
} else {

0 commit comments

Comments
 (0)