Skip to content

Commit 931ab6f

Browse files
committed
CastielM made some adjustments to the way user input calculates where to move selection to for smoother use
1 parent 98b3cf9 commit 931ab6f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

games/BelowTheSurface/password.h

+12-8
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,16 @@ class Password
241241
{
242242
selection += 6;
243243
error = false;
244+
write_line(selection);
244245

245-
if (selection > keyboard.size() - 1)
246+
if (selection >= keyboard.size() - 1)
246247
{
247-
if (selection < 30)
248-
selection = 26;
249-
else
248+
if (selection > 29)
250249
selection = 0 + (selection - 30);
251-
250+
else if (selection > 26)
251+
selection = 27;
252+
else
253+
selection = 26;
252254
}
253255
}
254256

@@ -257,12 +259,14 @@ class Password
257259
selection -= 6;
258260
error = false;
259261

260-
if (selection < 0)
262+
if (selection <= 0)
261263
{
262-
if (selection < -2)
264+
if (selection < -4)
263265
selection = selection + 30;
264-
else
266+
else if (selection < -3 )
265267
selection = 26;
268+
else
269+
selection = 27;
266270
}
267271
}
268272

0 commit comments

Comments
 (0)