diff --git a/game/gamemode.lua b/game/gamemode.lua index 885010c..0319304 100644 --- a/game/gamemode.lua +++ b/game/gamemode.lua @@ -12,7 +12,6 @@ local GameMode = Object:extend() function GameMode:new(player_name, input_file, replay_grade) VCTRL.toggle(MOBILE and not input_file and not SETTINGS.tvMode) - if MOBILE and not SETTINGS.tvMode then love.keyboard.setTextInput(false) end VCTRL.reset() if player_name == nil then self.training = true else self.training = false end diff --git a/scene/name_entry.lua b/scene/name_entry.lua index 8a9277c..dae1088 100644 --- a/scene/name_entry.lua +++ b/scene/name_entry.lua @@ -170,14 +170,12 @@ function NameEntryScene:onInputPress(e) BUTTON.release(buttonList, e.x, e.y, e.id) SETTINGS['last_entry'] = name:upper() SCENE = GameScene(name:lower()) - else - if self.entry_pos == 3 then self:getPlayInfo(name) + elseif self.entry_pos == 3 then self:getPlayInfo(name) else self.name_entry[self.entry_pos ] = self.chars:sub(self.char_pos, self.char_pos) self.name_entry[self.entry_pos+1] = self.chars:sub(self.char_pos, self.char_pos) end - self.entry_pos = self.entry_pos + 1 - end + self.entry_pos = self.entry_pos + 1 elseif e.input == "left" or e.scancode == "left" then self.direction = "left" elseif e.input == "right" or e.scancode == "right" then @@ -199,6 +197,10 @@ end function NameEntryScene:onInputRelease(e) if e.type == "mouse" or e.type == "touch" then BUTTON.release(buttonList, e.x, e.y, e.id) + elseif ( + MOBILE and not SETTINGS.tvMode and + self.entry_pos == 4 + ) then love.keyboard.setTextInput(false) elseif e.input == "left" or e.scancode == "left" or e.input == "right" or e.scancode == "right" then self.direction = nil self.repeat_counter = self.repeat_limit-1 diff --git a/scene/replay.lua b/scene/replay.lua index d818ad2..c62856f 100644 --- a/scene/replay.lua +++ b/scene/replay.lua @@ -8,7 +8,11 @@ local buttonList = { x = 325, y = 385, w = 100, h = 30, text = CHAR.key.up.." Page up", codeWhenReleased = function() - scene_self.page = math.max(scene_self.page - 1, 0) + if scene_self.page == 1 then + scene_self.page = 1 + math.floor(#scene_self.replays / scene_self.page_flip) + else + scene_self.page = scene_self.page - 1 + end scene_self.replay_select = 1; end }, @@ -16,7 +20,11 @@ local buttonList = { x = 435, y = 385, w = 100, h = 30, text = CHAR.key.down.." Page down", codeWhenReleased = function() - scene_self.page = math.max(scene_self.page - 1, 1+(math.floor(#scene_self.replays / scene_self.page_flip))) + if scene_self.page < 1 + math.floor(#scene_self.replays / scene_self.page_flip) then + scene_self.page = scene_self.page + 1 + else + scene_self.page = 1 + end scene_self.replay_select = 1; end }, diff --git a/scene/training.lua b/scene/training.lua index 83ca65c..ab389bc 100644 --- a/scene/training.lua +++ b/scene/training.lua @@ -54,7 +54,7 @@ end function TrainingScene:onInputPress(e) if e.type == "mouse" or (e.type == "touch" and not VCTRL.press(e.x, e.y, e.id)) then menuKey:press(e.x, e.y, e.id) - elseif (self.game.game_over or self.game.completed) and (e.input == "menu_decide" or e.input == "menu_back" or e.input == "rotate_right") and self.game.game_over_frames > 50 then + elseif (self.game.game_over or self.game.completed) and (e.input == "menu_back" or e.input == "rotate_right") and self.game.game_over_frames > 50 then SCENE = TitleScene() elseif (e.input == "menu_back") then SCENE = TitleScene()