Skip to content

Commit

Permalink
Added "Join Discord" and "Report Bugs" to main menu
Browse files Browse the repository at this point in the history
Suggested by @RocketLanterns
  • Loading branch information
Tetro48 committed Jan 30, 2024
1 parent 9d558e4 commit 0e22151
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scene.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ function Scene:render() end
function Scene:onInputPress() end
function Scene:onInputRelease() end

--#region Named scene-function impostors
-- For some reason, these "scenes" must be loaded before TitleScene or else title screen bugs out

JoinDiscordFunc = require "scene.named_funcs.join_discord"
ReportBugFunc = require "scene.named_funcs.report_bug"

--#endregion

ExitScene = require "scene.exit"
GameScene = require "scene.game"
ResourcePackScene = require "scene.resource_pack_scene"
Expand Down
23 changes: 23 additions & 0 deletions scene/named_funcs/join_discord.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
local FuncScene = Scene:extend()

FuncScene.title = "Join Discord"

function FuncScene:new()
self.prev_scene = scene
love.system.openURL("https://discord.gg/AADZUmgsph")
end

function FuncScene:update()
scene = self.prev_scene
end

function FuncScene:render()
end

function FuncScene:changeOption(rel)
end

function FuncScene:onInputPress(e)
end

return FuncScene
22 changes: 22 additions & 0 deletions scene/named_funcs/report_bug.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
local FuncScene = Scene:extend()

FuncScene.title = "Report Bugs"

function FuncScene:new()
self.prev_scene = scene
love.system.openURL("https://github.com/cambridge-stacker/cambridge/issues")
end

function FuncScene:update()
scene = self.prev_scene
end

function FuncScene:render()
end

function FuncScene:changeOption(rel)
end

function FuncScene:onInputPress(e)
end
return FuncScene
2 changes: 2 additions & 0 deletions scene/title.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ local main_menu_screens = {
ModeSelectScene,
HighscoresScene,
ReplaySelectScene,
JoinDiscordFunc,
ReportBugFunc,
SettingsScene,
CreditsScene,
ExitScene,
Expand Down

0 comments on commit 0e22151

Please sign in to comment.