From 65f338b78a26784e42a232f9b0f2fdab3054e3aa Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 26 May 2017 23:22:18 +0200 Subject: Properly construct world --- config/menus/select.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/menus/select.lua b/config/menus/select.lua index 804b4eb..fd897d2 100644 --- a/config/menus/select.lua +++ b/config/menus/select.lua @@ -36,7 +36,7 @@ return { :set("active", function (self) local nauts = naut_selector:getFullSelection(false) if #nauts > 1 then - changeScene(World:new(MAP, nauts)) + changeScene(World(MAP, nauts)) end end) , -- cgit v1.1 From baf04a055dbc66b80c29a406907a0a595ac55f00 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 27 Jun 2017 09:02:03 +0200 Subject: Moved ui elements to use new oop lib --- config/menus/credits.lua | 8 ++++---- config/menus/host.lua | 16 ++++++++-------- config/menus/main.lua | 20 ++++++++++---------- config/menus/select.lua | 26 +++++++++++++------------- config/menus/settings.lua | 18 +++++++++--------- 5 files changed, 44 insertions(+), 44 deletions(-) (limited to 'config') diff --git a/config/menus/credits.lua b/config/menus/credits.lua index 77cba62..6a2ab50 100644 --- a/config/menus/credits.lua +++ b/config/menus/credits.lua @@ -1,20 +1,20 @@ local menu = ... -local button = require "not.Button" -local element = require "not.Element" +local Button = require "not.Button" +local Element = require "not.Element" local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale() local bx = width/2-29 return { - button:new(menu) + Button(menu) :setText("Go back") :setPosition(bx,144) :set("active", function (self) self.parent:open("main") end) , - element:new(menu) + Element(menu) :setPosition(width/2, 30) :set("draw", function (self, scale) local x,y = self:getPosition() diff --git a/config/menus/host.lua b/config/menus/host.lua index b318a5b..fff683c 100644 --- a/config/menus/host.lua +++ b/config/menus/host.lua @@ -1,18 +1,18 @@ local menu = ... -local button = require "not.Button" -local selector = require "not.Selector" +local Button = require "not.Button" +local Selector = require "not.Selector" local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() local bx = width/2-29 -local map_selector = selector:new(menu) +local map_Selector = Selector(menu) require "iconsList" local icons, maps = getMapsIconsList() return { - map_selector + map_Selector :setPosition(width/2, 40) :setSize(80, 42) :setMargin(0) @@ -24,18 +24,18 @@ return { :set("shape", "panorama") :init() , - button:new(menu) + Button(menu) :setText("Next") :setPosition(bx,101) :set("isEnabled", function () - return map_selector:isLocked() + return map_Selector:isLocked() end) :set("active", function (self) - MAP = map_selector:getFullSelection(true)[1][1] -- please, don't kill me for this, kek + MAP = map_Selector:getFullSelection(true)[1][1] -- please, don't kill me for this, kek self.parent:open("select") end) , - button:new(menu) + Button(menu) :setText("Go back") :setPosition(bx,117) :set("active", function (self) diff --git a/config/menus/main.lua b/config/menus/main.lua index 236c011..d65c57d 100644 --- a/config/menus/main.lua +++ b/config/menus/main.lua @@ -1,8 +1,8 @@ local menu = ... -local button = require "not.Button" -local header = require "not.Header" -local element = require "not.Element" +local Button = require "not.Button" +local Header = require "not.Header" +local Element = require "not.Element" local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() local bx = width/2-29 @@ -10,40 +10,40 @@ local bx = width/2-29 local awesometwo = love.graphics.newImage("assets/two.png") return { - button:new(menu) + Button(menu) :setText("Start") :setPosition(bx, 80) :set("active", function (self) self.parent:open("host") end) , - button:new(menu) + Button(menu) :setText("Join") :setPosition(bx, 96) :set("isEnabled", function (self) return false end) , - button:new(menu) + Button(menu) :setText("Settings") :setPosition(bx, 112) :set("active", function (self) self.parent:open("settings") end) , - button:new(menu) + Button(menu) :setText("Credits") :setPosition(bx, 128) :set("active", function (self) self.parent:open("credits") end) , - button:new(menu) + Button(menu) :setText("Exit") :setPosition(bx, 144) :set("active", love.event.quit) , - element:new(menu) + Element(menu) :setPosition(width/2, 15) :set("draw", function (self, scale) local x,y = self:getPosition() @@ -52,7 +52,7 @@ return { love.graphics.draw(awesometwo, x*scale, y*scale, 0, scale, scale, 35) end) , - header:new(menu) + Header(menu) :setText("Roflnauts") :setPosition(width/2,40) , diff --git a/config/menus/select.lua b/config/menus/select.lua index fd897d2..431e620 100644 --- a/config/menus/select.lua +++ b/config/menus/select.lua @@ -1,20 +1,20 @@ local menu = ... -local button = require "not.Button" -local selector = require "not.Selector" -local element = require "not.Element" +local Button = require "not.Button" +local Selector = require "not.Selector" +local Element = require "not.Element" local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() local bx = width/2-29 -local naut_selector = selector:new(menu) -local start_button = button:new(menu) +local naut_Selector = Selector(menu) +local start_Button = Button(menu) require "iconsList" local nautsIcons, nautsList = getNautsIconsList() return { - naut_selector + naut_Selector :setPosition(width/2,60) :setMargin(8) :setSize(32, 32) @@ -24,30 +24,30 @@ return { :set("icons_q", nautsIcons) :init() , - start_button + start_Button :setText("Force start") :setPosition(bx,134) :set("isEnabled", function () - if #naut_selector:getFullSelection(false) > 1 then + if #naut_Selector:getFullSelection(false) > 1 then return true end return false end) :set("active", function (self) - local nauts = naut_selector:getFullSelection(false) + local nauts = naut_Selector:getFullSelection(false) if #nauts > 1 then changeScene(World(MAP, nauts)) end end) , - button:new(menu) + Button(menu) :setText("Go back") :setPosition(bx,150) :set("active", function (self) self.parent:open("host") end) , - element:new(menu) + Element(menu) :setPosition(bx, 101) :set("the_final_countdown", 9) :set("draw", function (self, scale) @@ -62,14 +62,14 @@ return { end end) :set("update", function (self, dt) - local total = #naut_selector:getFullSelection(false) + local total = #naut_Selector:getFullSelection(false) if total > 1 then self.the_final_countdown = self.the_final_countdown - dt else self.the_final_countdown = 9 end if self.the_final_countdown < 0 then - start_button:active() + start_Button:active() end end) , diff --git a/config/menus/settings.lua b/config/menus/settings.lua index ae0403d..a1c6507 100644 --- a/config/menus/settings.lua +++ b/config/menus/settings.lua @@ -1,15 +1,15 @@ local menu = ... -local button = require "not.Button" -local selector = require "not.Selector" -local element = require "not.Element" +local Button = require "not.Button" +local Selector = require "not.Selector" +local Element = require "not.Element" local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale() local bx = width/2-29 local keys = {"Left", "Right", "Up", "Down", "Attack", "Jump"} -local dimmer = element:new(menu) +local dimmer = Element(menu) :setPosition(width/2, 15) :set("visible", false) :set("currentControl", "Left") -- it actually means control that is being set CURRENTLY @@ -65,7 +65,7 @@ local controlreleased = function(self, set, action, key) end local a = { - button:new(menu) + Button(menu) :setText("Keyboard 1") :setPosition(bx,80) :set("setNumber", function () return 1 end) @@ -74,7 +74,7 @@ local a = { :set("stopChange", stopChange) :set("active", startChange) , - button:new(menu) + Button(menu) :setText("Keyboard 2") :setPosition(bx,96) :set("setNumber", function () return 2 end) @@ -83,7 +83,7 @@ local a = { :set("stopChange", stopChange) :set("active", startChange) , - button:new(menu) + Button(menu) :setText("Gamepad 1") :setPosition(bx,112) :set("setNumber", function () return 3 end) @@ -92,7 +92,7 @@ local a = { :set("stopChange", stopChange) :set("active", startChange) , - button:new(menu) + Button(menu) :setText("Gamepad 2") :setPosition(bx,128) :set("setNumber", function () return 4 end) @@ -101,7 +101,7 @@ local a = { :set("stopChange", stopChange) :set("active", startChange) , - button:new(menu) + Button(menu) :setText("Go back") :setPosition(bx,144) :set("active", function (self) -- cgit v1.1 From 75e30a649bd41029e48344969225e8ff329a86b4 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 27 Jun 2017 14:40:08 +0200 Subject: Indention in settings menu --- config/menus/settings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/menus/settings.lua b/config/menus/settings.lua index a1c6507..96c12cd 100644 --- a/config/menus/settings.lua +++ b/config/menus/settings.lua @@ -74,7 +74,7 @@ local a = { :set("stopChange", stopChange) :set("active", startChange) , - Button(menu) + Button(menu) :setText("Keyboard 2") :setPosition(bx,96) :set("setNumber", function () return 2 end) @@ -83,7 +83,7 @@ local a = { :set("stopChange", stopChange) :set("active", startChange) , - Button(menu) + Button(menu) :setText("Gamepad 1") :setPosition(bx,112) :set("setNumber", function () return 3 end) -- cgit v1.1 From 6c6e2fe6ec84ec57f6336fa9d6e4136c0e1c9513 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 12 Jul 2017 11:09:05 +0200 Subject: All changeScene calls replaced with proper SceneManager calls --- config/menus/select.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/menus/select.lua b/config/menus/select.lua index 431e620..037b798 100644 --- a/config/menus/select.lua +++ b/config/menus/select.lua @@ -36,7 +36,7 @@ return { :set("active", function (self) local nauts = naut_Selector:getFullSelection(false) if #nauts > 1 then - changeScene(World(MAP, nauts)) + sceneManager:changeScene(World(MAP, nauts)) end end) , @@ -73,4 +73,4 @@ return { end end) , -} \ No newline at end of file +} -- cgit v1.1 From 96fef88f56fdcdf95bc5783eb2b3b881ff435ba0 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 14 Jul 2017 21:54:46 +0200 Subject: Background in menu moved to separate class Weird noise added to menu configs to use single MenuBackground instance Initial pause menu added --- config/menus/credits.lua | 9 +++++++-- config/menus/host.lua | 9 +++++++-- config/menus/main.lua | 9 +++++++-- config/menus/pause.lua | 19 +++++++++++++++++++ config/menus/select.lua | 7 ++++++- config/menus/settings.lua | 9 +++++++-- 6 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 config/menus/pause.lua (limited to 'config') diff --git a/config/menus/credits.lua b/config/menus/credits.lua index 6a2ab50..d59b560 100644 --- a/config/menus/credits.lua +++ b/config/menus/credits.lua @@ -1,4 +1,4 @@ -local menu = ... +local menu, background = ... local Button = require "not.Button" local Element = require "not.Element" @@ -6,7 +6,12 @@ local Element = require "not.Element" local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale() local bx = width/2-29 +if background == nil or not background:is(require "not.MenuBackground") then + background = require "not.MenuBackground"(menu) +end + return { + background, Button(menu) :setText("Go back") :setPosition(bx,144) @@ -21,4 +26,4 @@ return { love.graphics.printf("A game by the Awesomenauts community including:\nSeltzy, PlasmaWisp, ParaDoX, MilkingChicken, Burningdillo, Bronkey and Aki.\n\n04font was used.\n\nBased on a game by Jan Willem Nijman, Paul Veer and Bits_Beats XOXO.\n\nAwesomenauts is property of Ronimo Games.", (x-110)*scale, (y+10)*scale, 220, "left", 0, scale, scale) end) , -} \ No newline at end of file +} diff --git a/config/menus/host.lua b/config/menus/host.lua index fff683c..a180736 100644 --- a/config/menus/host.lua +++ b/config/menus/host.lua @@ -1,4 +1,4 @@ -local menu = ... +local menu, background = ... local Button = require "not.Button" local Selector = require "not.Selector" @@ -11,7 +11,12 @@ local map_Selector = Selector(menu) require "iconsList" local icons, maps = getMapsIconsList() +if background == nil or not background:is(require "not.MenuBackground") then + background = require "not.MenuBackground"(menu) +end + return { + background, map_Selector :setPosition(width/2, 40) :setSize(80, 42) @@ -42,4 +47,4 @@ return { self.parent:open("main") end) , -} \ No newline at end of file +} diff --git a/config/menus/main.lua b/config/menus/main.lua index d65c57d..85e926f 100644 --- a/config/menus/main.lua +++ b/config/menus/main.lua @@ -1,4 +1,4 @@ -local menu = ... +local menu, background = ... local Button = require "not.Button" local Header = require "not.Header" @@ -9,7 +9,12 @@ local bx = width/2-29 local awesometwo = love.graphics.newImage("assets/two.png") +if background == nil or not background:is(require "not.MenuBackground") then + background = require "not.MenuBackground"(menu) +end + return { + background, Button(menu) :setText("Start") :setPosition(bx, 80) @@ -56,4 +61,4 @@ return { :setText("Roflnauts") :setPosition(width/2,40) , -} \ No newline at end of file +} diff --git a/config/menus/pause.lua b/config/menus/pause.lua new file mode 100644 index 0000000..74dd043 --- /dev/null +++ b/config/menus/pause.lua @@ -0,0 +1,19 @@ +local menu = ... + +local Button = require "not.Button" + +local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() +local bx = width/2-29 + +return { + Button(menu) + :setText("Unpause") + :setPosition(bx, height - 36) + :set("active", function () end) + , + Button(menu) + :setText("Exit") + :setPosition(bx, height - 20) + :set("active", function () end) + , +} diff --git a/config/menus/select.lua b/config/menus/select.lua index 037b798..23f9374 100644 --- a/config/menus/select.lua +++ b/config/menus/select.lua @@ -1,4 +1,4 @@ -local menu = ... +local menu, background = ... local Button = require "not.Button" local Selector = require "not.Selector" @@ -13,7 +13,12 @@ local start_Button = Button(menu) require "iconsList" local nautsIcons, nautsList = getNautsIconsList() +if background == nil or not background:is(require "not.MenuBackground") then + background = require "not.MenuBackground"(menu) +end + return { + background, naut_Selector :setPosition(width/2,60) :setMargin(8) diff --git a/config/menus/settings.lua b/config/menus/settings.lua index 96c12cd..59f9234 100644 --- a/config/menus/settings.lua +++ b/config/menus/settings.lua @@ -1,4 +1,4 @@ -local menu = ... +local menu, background = ... local Button = require "not.Button" local Selector = require "not.Selector" @@ -64,7 +64,12 @@ local controlreleased = function(self, set, action, key) end end +if background == nil or not background:is(require "not.MenuBackground") then + background = require "not.MenuBackground"(menu) +end + local a = { + background, Button(menu) :setText("Keyboard 1") :setPosition(bx,80) @@ -111,4 +116,4 @@ local a = { dimmer } -return a \ No newline at end of file +return a -- cgit v1.1 From 64adda89b9c1c53827d56391d5ccd9f0e9a4e93c Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 15 Jul 2017 01:00:06 +0200 Subject: Making new win screen based on Menu and SceneManager --- config/menus/win.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 config/menus/win.lua (limited to 'config') diff --git a/config/menus/win.lua b/config/menus/win.lua new file mode 100644 index 0000000..1d0918d --- /dev/null +++ b/config/menus/win.lua @@ -0,0 +1,22 @@ +local menu = ... + +local Header = require "not.Header" +local Element = require "not.Element" + +local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() + +return { + Element(menu) + :setPosition(width/2, 18) + :set("draw", function (self, scale) + local x,y = self:getPosition() + love.graphics.setColor(255, 255, 255, 255) + love.graphics.printf("rofl, now kill yourself", x*scale, y*scale, 160, "center", 0, scale, scale, 80, 3) + end) + :set("focus", function () return true end) + , + Header(menu) + :setText("WINNER") + :setPosition(width/2,40) + , +} -- cgit v1.1 From 73bca2d56b9a95b6b233da8ac466ba1d1f081c76 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 16 Jul 2017 17:20:03 +0200 Subject: Pause works now MusicPlayer bug still exists for pause and win screens --- config/menus/pause.lua | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/menus/pause.lua b/config/menus/pause.lua index 74dd043..60aa2fc 100644 --- a/config/menus/pause.lua +++ b/config/menus/pause.lua @@ -1,19 +1,35 @@ local menu = ... local Button = require "not.Button" +local Element = require "not.Element" local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() local bx = width/2-29 return { + Element(menu) + :set("draw", function (self, scale) + love.graphics.setColor(0, 0, 0, 110) + local width, height = love.graphics.getWidth(), love.graphics.getHeight() + love.graphics.rectangle("fill", 0, 0, width, height) + end) + , Button(menu) :setText("Unpause") - :setPosition(bx, height - 36) - :set("active", function () end) + :setPosition(bx, height - 38) + :set("active", function (self) + sceneManager:removeTopScene() + local scene = sceneManager:getAllScenes()[1] + scene:setSleeping(false) + scene:setInputDisabled(false) + end) , Button(menu) :setText("Exit") - :setPosition(bx, height - 20) - :set("active", function () end) + :setPosition(bx, height - 22) + :set("active", function (self) + sceneManager:removeTopScene() + sceneManager:changeScene(Menu("main")) + end) , } -- cgit v1.1 From e39c00b6e26504ba0f5fc4f0129bfceb3afe331f Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 16 Jul 2017 17:24:09 +0200 Subject: Fixed MusicPlayer bug with win and pause menus --- config/menus/main.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config') diff --git a/config/menus/main.lua b/config/menus/main.lua index 85e926f..95e44ec 100644 --- a/config/menus/main.lua +++ b/config/menus/main.lua @@ -13,6 +13,10 @@ if background == nil or not background:is(require "not.MenuBackground") then background = require "not.MenuBackground"(menu) end +-- Wait, only here? +musicPlayer:setTrack("menu.ogg") +musicPlayer:play() + return { background, Button(menu) -- cgit v1.1 From b2c2ef1ae1300a2a2610525bf19db227d6d5e54b Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 16 Jul 2017 20:20:50 +0200 Subject: Music doesn't stop on transition from any-menu to main-menu --- config/menus/main.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/menus/main.lua b/config/menus/main.lua index 95e44ec..ae2cef2 100644 --- a/config/menus/main.lua +++ b/config/menus/main.lua @@ -14,8 +14,10 @@ if background == nil or not background:is(require "not.MenuBackground") then end -- Wait, only here? -musicPlayer:setTrack("menu.ogg") -musicPlayer:play() +if musicPlayer:getCurrentTrack() ~= "menu.ogg" then + musicPlayer:setTrack("menu.ogg") + musicPlayer:play() +end return { background, -- cgit v1.1 From b1885629faea4ea4c1c0694ef90e4ffef730b0ce Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 17 Jul 2017 10:42:50 +0200 Subject: KYS message is uppercase now --- config/menus/win.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/menus/win.lua b/config/menus/win.lua index 1d0918d..f7163dd 100644 --- a/config/menus/win.lua +++ b/config/menus/win.lua @@ -11,7 +11,7 @@ return { :set("draw", function (self, scale) local x,y = self:getPosition() love.graphics.setColor(255, 255, 255, 255) - love.graphics.printf("rofl, now kill yourself", x*scale, y*scale, 160, "center", 0, scale, scale, 80, 3) + love.graphics.printf("ROFL, NOW KILL YOURSELF", x*scale, y*scale, 160, "center", 0, scale, scale, 80, 3) end) :set("focus", function () return true end) , -- cgit v1.1 From 9b75ea38f0194dfffc89c0144c1ab0efb8b4f392 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 18 Jul 2017 16:54:14 +0200 Subject: Resized 16px effects frames to 24px --- config/animations/effects.lua | 74 +++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'config') diff --git a/config/animations/effects.lua b/config/animations/effects.lua index dd6d55e..a0c9f47 100644 --- a/config/animations/effects.lua +++ b/config/animations/effects.lua @@ -1,5 +1,5 @@ -- Animations spritesheet array for `Effect` --- Size of sprie atlas is 168px x 120px +-- Size of sprie atlas is 168px x 144px -- NAME :POSITION :SIZE :FRAMES -- jump :x 0 y 0: 24px: 4 @@ -7,70 +7,70 @@ -- land :x 0 y 48: 24px: 5 -- respawn :x 0 y 72: 24px: 7 -- clash :x 0 y 96: 24px: 6 --- trail :x104 y 0: 16px: 4 --- hit :x106 y 18: 16px: 3 +-- trail :x 0 y120: 24px: 4 +-- hit :x 96 y 0: 24px: 3 local quads = { jump = { - [1] = love.graphics.newQuad( 0, 0, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 0, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 0, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 0, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 0, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 0, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 0, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 0, 24,24, 168,144), frames = 4, repeated = false }, doublejump = { - [1] = love.graphics.newQuad( 0, 24, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 24, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 24, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 24, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 24, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 24, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 24, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 24, 24,24, 168,144), frames = 4, repeated = false }, land = { - [1] = love.graphics.newQuad( 0, 48, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 48, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 48, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 48, 24,24, 168,120), - [5] = love.graphics.newQuad( 96, 48, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 48, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 48, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 48, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 48, 24,24, 168,144), + [5] = love.graphics.newQuad( 96, 48, 24,24, 168,144), frames = 5, repeated = false }, respawn = { - [1] = love.graphics.newQuad( 0, 72, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 72, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 72, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 72, 24,24, 168,120), - [5] = love.graphics.newQuad( 96, 72, 24,24, 168,120), - [6] = love.graphics.newQuad(120, 72, 24,24, 168,120), - [7] = love.graphics.newQuad(144, 72, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 72, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 72, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 72, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 72, 24,24, 168,144), + [5] = love.graphics.newQuad( 96, 72, 24,24, 168,144), + [6] = love.graphics.newQuad(120, 72, 24,24, 168,144), + [7] = love.graphics.newQuad(144, 72, 24,24, 168,144), frames = 7, repeated = false }, clash = { - [1] = love.graphics.newQuad( 0, 96, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 96, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 96, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 96, 24,24, 168,120), - [5] = love.graphics.newQuad( 96, 96, 24,24, 168,120), - [6] = love.graphics.newQuad(120, 96, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 96, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 96, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 96, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 96, 24,24, 168,144), + [5] = love.graphics.newQuad( 96, 96, 24,24, 168,144), + [6] = love.graphics.newQuad(120, 96, 24,24, 168,144), frames = 6, repeated = false }, trail = { - [1] = love.graphics.newQuad(104, 0, 16,16, 168,120), - [2] = love.graphics.newQuad(120, 0, 16,16, 168,120), - [3] = love.graphics.newQuad(136, 0, 16,16, 168,120), - [4] = love.graphics.newQuad(152, 0, 16,16, 168,120), + [1] = love.graphics.newQuad( 0,120, 24,24, 168,144), + [2] = love.graphics.newQuad( 24,120, 24,24, 168,144), + [3] = love.graphics.newQuad( 48,120, 24,24, 168,144), + [4] = love.graphics.newQuad( 72,120, 24,24, 168,144), frames = 4, repeated = false }, hit = { - [1] = love.graphics.newQuad(106, 18, 16,16, 168,120), - [2] = love.graphics.newQuad(122, 18, 16,16, 168,120), - [3] = love.graphics.newQuad(138, 18, 16,16, 168,120), + [1] = love.graphics.newQuad( 96, 0, 24,24, 168,144), + [2] = love.graphics.newQuad(120, 0, 24,24, 168,144), + [3] = love.graphics.newQuad(144, 0, 24,24, 168,144), frames = 3, repeated = false } } -return quads \ No newline at end of file +return quads -- cgit v1.1 From a6810abd1c8cc9956cb4b8cc2f00258780eee3a8 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 1 Aug 2017 04:10:11 +0200 Subject: Ingame settings now support changing display modes --- config/menus/settings.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'config') diff --git a/config/menus/settings.lua b/config/menus/settings.lua index 59f9234..7102bea 100644 --- a/config/menus/settings.lua +++ b/config/menus/settings.lua @@ -68,8 +68,29 @@ if background == nil or not background:is(require "not.MenuBackground") then background = require "not.MenuBackground"(menu) end +local displayTypes = {["fullscreen"] = "fullscreen", ["1"] = "1x", ["2"] = "2x", ["3"] = "3x", ["4"] = "4x", ["5"] = "5x"} +local displayButton = Button(menu) +:set("types", displayTypes) +:setText(displayTypes[Settings.current.display]) +:setPosition(bx,64) +:set("enabled", true) +:set("isEnabled", function (self) return self.enabled end) +:set("active", function (self) + self.parent.inputBreakTimer = 0.2 + if Settings.current.display == "fullscreen" then + Settings.current.display = "1" + elseif Settings.current.display == "5" then + Settings.current.display = "fullscreen" + else + Settings.current.display = tostring(tonumber(Settings.current.display) + 1) + end + self:setText(self.types[Settings.current.display]) + Settings.reload() +end) + local a = { background, + displayButton, Button(menu) :setText("Keyboard 1") :setPosition(bx,80) -- cgit v1.1