diff --git a/load/sounds.lua b/load/sounds.lua index 6da3486..c00856f 100644 --- a/load/sounds.lua +++ b/load/sounds.lua @@ -10,6 +10,10 @@ sounds = { }, move = love.audio.newSource("res/se/move.wav", "static"), bottom = love.audio.newSource("res/se/bottom.wav", "static"), + cursor = love.audio.newSource("res/se/cursor.wav", "static"), + cursor_lr = love.audio.newSource("res/se/cursor_lr.wav", "static"), + main_decide = love.audio.newSource("res/se/main_decide.wav", "static"), + mode_decide = love.audio.newSource("res/se/mode_decide.wav", "static"), } function playSE(sound, subsound) diff --git a/res/se/cursor.wav b/res/se/cursor.wav new file mode 100644 index 0000000..b55ae9a Binary files /dev/null and b/res/se/cursor.wav differ diff --git a/res/se/cursor_lr.wav b/res/se/cursor_lr.wav new file mode 100644 index 0000000..9e7245e Binary files /dev/null and b/res/se/cursor_lr.wav differ diff --git a/res/se/main_decide.wav b/res/se/main_decide.wav new file mode 100644 index 0000000..63944ad Binary files /dev/null and b/res/se/main_decide.wav differ diff --git a/res/se/mode_decide.wav b/res/se/mode_decide.wav new file mode 100644 index 0000000..7e31e50 Binary files /dev/null and b/res/se/mode_decide.wav differ diff --git a/scene/mode_select.lua b/scene/mode_select.lua index ba40048..fbc6f69 100755 --- a/scene/mode_select.lua +++ b/scene/mode_select.lua @@ -58,7 +58,7 @@ function ModeSelectScene:render() 0, 0, 0, 0.5, 0.5 ) - + if self.menu_state.select == "mode" then love.graphics.setColor(1, 1, 1, 0.5) elseif self.menu_state.select == "ruleset" then @@ -72,7 +72,7 @@ function ModeSelectScene:render() love.graphics.setColor(1, 1, 1, 0.5) end love.graphics.rectangle("fill", 340, 78 + 20 * self.menu_state.ruleset, 200, 22) - + love.graphics.setColor(1, 1, 1, 1) love.graphics.draw(misc_graphics["select_mode"], 20, 40) @@ -92,15 +92,19 @@ function ModeSelectScene:onKeyPress(e) current_ruleset = self.menu_state.ruleset config.current_mode = current_mode config.current_ruleset = current_ruleset + playSE("mode_decide") saveConfig() scene = GameScene(game_modes[self.menu_state.mode], rulesets[self.menu_state.ruleset]) elseif (e.scancode == config.input["up"] or e.scancode == "up") and e.isRepeat == false then self:changeOption(-1) + playSE("cursor") elseif (e.scancode == config.input["down"] or e.scancode == "down") and e.isRepeat == false then self:changeOption(1) + playSE("cursor") elseif (e.scancode == config.input["left"] or e.scancode == "left") or (e.scancode == config.input["right"] or e.scancode == "right") then self:switchSelect() + playSE("cursor_lr") elseif e.scancode == "escape" then scene = TitleScene() end diff --git a/scene/title.lua b/scene/title.lua index 0908a80..754f43f 100644 --- a/scene/title.lua +++ b/scene/title.lua @@ -39,11 +39,14 @@ end function TitleScene:onKeyPress(e) if e.scancode == "return" and e.isRepeat == false then + playSE("main_decide") scene = main_menu_screens[self.main_menu_state]() elseif (e.scancode == config.input["up"] or e.scancode == "up") and e.isRepeat == false then self:changeOption(-1) + playSE("cursor") elseif (e.scancode == config.input["down"] or e.scancode == "down") and e.isRepeat == false then self:changeOption(1) + playSE("cursor") elseif e.scancode == "escape" and e.isRepeat == false then love.event.quit() end