bug fix?
This commit is contained in:
parent
40034d2f00
commit
7ee8baf438
4 changed files with 19 additions and 9 deletions
|
@ -11,7 +11,6 @@ function Button:new(x, y, r, b, c)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Button:update(dt)
|
function Button:update(dt)
|
||||||
|
|
||||||
if self.b == "triggerleft" or self.b == "triggerright" then
|
if self.b == "triggerleft" or self.b == "triggerright" then
|
||||||
if fightstick:getGamepadAxis(self.b) == 1 then
|
if fightstick:getGamepadAxis(self.b) == 1 then
|
||||||
self.press = true
|
self.press = true
|
||||||
|
|
6
conf.lua
6
conf.lua
|
@ -1,6 +1,8 @@
|
||||||
WINDOWWIDTH = 373
|
WINDOWSCALE = 1
|
||||||
WINDOWHEIGHT = 212
|
WINDOWWIDTH = 373*WINDOWSCALE
|
||||||
|
WINDOWHEIGHT = 212*WINDOWSCALE
|
||||||
BORDERLESS = true
|
BORDERLESS = true
|
||||||
|
BLACK = true
|
||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
t.window.width = WINDOWWIDTH
|
t.window.width = WINDOWWIDTH
|
||||||
t.window.height = WINDOWHEIGHT
|
t.window.height = WINDOWHEIGHT
|
||||||
|
|
BIN
icon.png
BIN
icon.png
Binary file not shown.
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 26 KiB |
17
main.lua
17
main.lua
|
@ -1,4 +1,5 @@
|
||||||
function love.load()
|
function love.load()
|
||||||
|
|
||||||
joysticks = love.joystick.getJoysticks()
|
joysticks = love.joystick.getJoysticks()
|
||||||
fightstick = joysticks[1]
|
fightstick = joysticks[1]
|
||||||
|
|
||||||
|
@ -39,10 +40,20 @@ function love.keypressed(key)
|
||||||
love.window.setMode(WINDOWWIDTH, WINDOWHEIGHT, {borderless=true, x=windowx, y=windowy})
|
love.window.setMode(WINDOWWIDTH, WINDOWHEIGHT, {borderless=true, x=windowx, y=windowy})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if key == "c" then
|
||||||
|
if BLACK then
|
||||||
|
BLACK = false
|
||||||
|
love.graphics.setBackgroundColor(0,1,0)
|
||||||
|
else
|
||||||
|
BLACK = true
|
||||||
|
love.graphics.setBackgroundColor(0,0,0)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.update(dt)
|
function love.update(dt)
|
||||||
windowx, windowy, _ =love.window.getPosition()
|
windowx, windowy, _ = love.window.getPosition()
|
||||||
|
|
||||||
--movement keys
|
--movement keys
|
||||||
for i, v in ipairs(movement) do
|
for i, v in ipairs(movement) do
|
||||||
v:update(dt)
|
v:update(dt)
|
||||||
|
@ -55,9 +66,7 @@ function love.update(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.draw()
|
function love.draw()
|
||||||
love.graphics.setBackgroundColor(0,0,0)
|
love.graphics.scale(WINDOWSCALE, WINDOWSCALE)
|
||||||
--love.graphics.setBackgroundColor(1, 179/255, 102/255)
|
|
||||||
--love.graphics.print("borderless = " .. (BORDERLESS and "true" or "false"), 0, 0)
|
|
||||||
|
|
||||||
--movement keys
|
--movement keys
|
||||||
for i, v in ipairs(movement) do
|
for i, v in ipairs(movement) do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue