diff --git a/scene/challenge_select.lua b/scene/challenge_select.lua index 94c86b3..bb4abe1 100644 --- a/scene/challenge_select.lua +++ b/scene/challenge_select.lua @@ -99,12 +99,15 @@ function ChallengeSelectScene:render() for idx, challenge in pairs(challenges) do if(idx >= self.menu_state.challenge-9 and idx <= self.menu_state.challenge+9) then love.graphics.printf(challenge.name, 40, (260 - 20*(self.menu_state.challenge)) + 20 * idx, 200, "left") - cur_tagline = challenge.tagline + end end - - +-- challenge details + love.graphics.printf(challenges[self.menu_state.challenge].tagline, 340, 150, 200, "left") + love.graphics.printf(challenges[self.menu_state.challenge].description, 340, 250, 200, "left") + love.graphics.printf("Mode: "..challenges[self.menu_state.challenge].mode, 340, 350, 200, "left") + love.graphics.printf("Ruleset: "..challenges[self.menu_state.challenge].ruleset, 340, 380, 200, "left") end function ChallengeSelectScene:onInputPress(e) @@ -151,7 +154,7 @@ function ChallengeSelectScene:onInputPress(e) end - love.graphics.printf("test???", 340, 258, 200, "left") + end @@ -175,6 +178,7 @@ end function ChallengeSelectScene:changechallenge(rel) local len = table.getn(challenges) self.menu_state.challenge = Mod1(self.menu_state.challenge + rel, len) + end diff --git a/scene/mode_select.lua b/scene/mode_select.lua index a7db60e..a33f27e 100755 --- a/scene/mode_select.lua +++ b/scene/mode_select.lua @@ -108,6 +108,7 @@ function ModeSelectScene:render() love.graphics.printf(ruleset.name, 360, (260 - 20*(self.menu_state.ruleset)) + 20 * idx, 160, "left") end end + love.graphics.printf(game_modes[self.menu_state.mode].tagline, 5, 5, 600, "left") end function ModeSelectScene:onInputPress(e) diff --git a/tetris/challenges/Tetrs.lua b/tetris/challenges/Tetrs.lua index 58f68e4..e4d7d75 100644 --- a/tetris/challenges/Tetrs.lua +++ b/tetris/challenges/Tetrs.lua @@ -13,8 +13,8 @@ TetrsChallenge.name = "Tetrs" TetrsChallenge.hash = "Tetrs" TetrsChallenge.mode = "MarathonGF" TetrsChallenge.ruleset = "Standard" -TetrsChallenge.tagline = "abababa" -TetrsChallenge.description = "Complete a mode with a specific ruleset and idk they did some other stupid things too lol" +TetrsChallenge.tagline = "Where's the long bar? Seriously, I can't find it." +TetrsChallenge.description = "Complete a 150-line Marathon...without the I piece!" function TetrsChallenge:new() diff --git a/tetris/challenges/challenge.lua b/tetris/challenges/challenge.lua index 7f777b1..5771a20 100644 --- a/tetris/challenges/challenge.lua +++ b/tetris/challenges/challenge.lua @@ -14,7 +14,7 @@ local Challenge = GameMode:extend() Challenge.name = "A really cool challenge name" Challenge.hash = "" Challenge.mode = "" -Challenge.ruleset = "Guideline SRS" +Challenge.ruleset = "" Challenge.tagline = "Are you up for this challenge?" Challenge.description = "Complete a mode with a specific ruleset and idk they did some other stupid things too lol" diff --git a/tetris/challenges/details_test.lua b/tetris/challenges/details_test.lua new file mode 100644 index 0000000..55356e8 --- /dev/null +++ b/tetris/challenges/details_test.lua @@ -0,0 +1,26 @@ +require 'funcs' + +local GameMode = require 'tetris.modes.gamemode' +local Piece = require 'tetris.components.piece' +local Grid = require 'tetris.components.grid' +local Randomizer = require 'tetris.randomizers.randomizer' +local Bag7Randomizer = require 'tetris.randomizers.bag7noI' +local MarathonGF = require 'tetris.modes.marathon_gf' + +local TetrsChallenge = MarathonGF:extend() + +TetrsChallenge.name = "Another mode" +TetrsChallenge.hash = "Tetrs2" +TetrsChallenge.mode = "MarathonGF" +TetrsChallenge.ruleset = "Standard" +TetrsChallenge.tagline = "Hey look! The feature works!" +TetrsChallenge.description = "This is just a clone of Tetrs to test out the challenge details feature." + +function TetrsChallenge:new() + + TetrsChallenge.super:new() + self.randomizer = Bag7Randomizer() + self.next_queue_length = 6 +end + +return TetrsChallenge