Skip to content

Commit

Permalink
Fix #614: add toast when setting all pencil marks
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisboyle committed Oct 15, 2023
1 parent 72a69c4 commit bdfb080
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/src/main/kotlin/name/boyle/chris/sgtpuzzles/GamePlay.kt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ import name.boyle.chris.sgtpuzzles.config.PrefsConstants.COMPLETED_PROMPT_KEY
import name.boyle.chris.sgtpuzzles.config.PrefsConstants.CONTROLS_REMINDERS_KEY
import name.boyle.chris.sgtpuzzles.config.PrefsConstants.FULLSCREEN_KEY
import name.boyle.chris.sgtpuzzles.config.PrefsConstants.LAST_PARAMS_PREFIX
import name.boyle.chris.sgtpuzzles.config.PrefsConstants.LATIN_M_UNDO_SEEN
import name.boyle.chris.sgtpuzzles.config.PrefsConstants.LATIN_SHOW_M_KEY
import name.boyle.chris.sgtpuzzles.config.PrefsConstants.LIMIT_DPI_KEY
import name.boyle.chris.sgtpuzzles.config.PrefsConstants.MOUSE_BACK_KEY
Expand Down Expand Up @@ -1059,6 +1060,12 @@ class GamePlay : ActivityWithLoadButton(), OnSharedPreferenceChangeListener, Gam
if (GameView.CURSOR_KEYS.contains(k) || currentBackend === INERTIA && k == '\n'.code) {
gameView.ensureCursorVisible(gameEngine.cursorLocation)
}
if (k == 'M'.code && currentBackend!!.isLatin) {
toastFirstFewTimes(
this, state, LATIN_M_UNDO_SEEN, 3,
R.string.latin_m_undo_toast
)
}
gameView.requestFocus()
onBackPressedCallback.isEnabled = true
handler.sendMessageDelayed(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ object PrefsConstants {
const val SWAP_L_R_PREFIX = "swap_l_r_"
const val UNDO_NEW_GAME_SEEN = "undoNewGameSeen"
const val REDO_NEW_GAME_SEEN = "redoNewGameSeen"
const val LATIN_M_UNDO_SEEN = "latinMUndoSeen"
const val PUZZLESGEN_CLEANUP_DONE = "puzzlesgen_cleanup_done"
const val AUTO_ORIENT = "autoOrient"
const val AUTO_ORIENT_DEFAULT = true
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Version %s"</string>
<string name="replaceGame">You have an unfinished game of {0} which this will replace. Continue loading?</string>
<string name="undo_new_game_toast">Undoing into previous game</string>
<string name="redo_new_game_toast">Redoing into previously generated game</string>
<string name="latin_m_undo_toast">Pencil marks set; undo is available</string>
<!-- Help menu -->
<!-- {0} is a game name -->
<string name="how_to_play_game">How to play {0}</string>
Expand Down

0 comments on commit bdfb080

Please sign in to comment.