X-Git-Url: https://harishankar.org/repos/?p=getaclue.git;a=blobdiff_plain;f=player_mainwindow.py;fp=player_mainwindow.py;h=8ffdb16c05ae8d142f80d29a92c9ded8af80b9a6;hp=24fabf6033992d2172ec260aab1a522d8f3d0899;hb=366da234706d16d54502d2a6501b43cfb29e9615;hpb=8035dfe2cfc14d23c5a323f1aed88b8e8c067090 diff --git a/player_mainwindow.py b/player_mainwindow.py index 24fabf6..8ffdb16 100644 --- a/player_mainwindow.py +++ b/player_mainwindow.py @@ -262,7 +262,7 @@ along with GetAClue. If not, see .""" if self.puzzle: # set a guess only if not revealed if self.puzzle.data[self.selected_row][self.selected_col].revealed is False: - self.puzzle.data[self.selected_row][self.selected_col].guess = guess_char.upper () + self.puzzle.data[self.selected_row][self.selected_col].guess = guess_char # across mode typing if self.typing_mode == self.ACROSS: # move by one character across but only if there is no block @@ -355,12 +355,18 @@ along with GetAClue. If not, see .""" drawarea.queue_draw () # if it is A-Z or a-z then elif len (key) == 1 and key.isalpha (): - self.set_guess (key) + guess_char = key.upper () + self.set_guess (guess_char) drawarea.queue_draw () # if it is the delete key then delete character at selected row/col - elif key == "delete" or key == "space": + elif key == "delete": self.puzzle.data[self.selected_row][self.selected_col].guess = None drawarea.queue_draw () + # if the key is space key then delete character and move across or + # down one step depending on the mode + elif key == "space": + self.set_guess (None) + drawarea.queue_draw () # if it is backspace key then delete character at previous row/col # depending on the input mode. If across editing mode, then delete # at previous column else at previous row