Prevent non-game square being activated - crossword.koplugin - Unnamed repository; edit this file 'description' to name the repository. (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules (DIR) README (DIR) LICENSE --- (DIR) commit 80699e8b875081f3815020cfb9ab61e450a6f0b4 (DIR) parent 3cd2c0b9fbb1f4026f3cb1aa10bcd320f90910fe (HTM) Author: Scarlett <social@scarlettmcallister.com> Date: Sat, 6 May 2023 21:52:23 -0300 Prevent non-game square being activated Diffstat: M gameview.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- (DIR) diff --git a/gameview.lua b/gameview.lua @@ -76,11 +76,9 @@ function GameView:render() grid = self.puzzle:getGrid(), dark_mode = self.dark_mode, on_tap_callback = function(row_num, col_num) - -- On tap, pass the row and col nums to the active puzzle and return - -- a clue based on the active direction (i.e.: across or down) - -- Then update the grid (@todo: display touch feedback) and the clue in - -- the active grid view. Then refresh this view. - logger.dbg(row_num .. " " .. col_num) + if(self.puzzle:getSquareAtPos(row_num, col_num)) then + return + end self.active_row_num = row_num self.active_col_num = col_num self:refreshGameView()