This commit is contained in:
Mango 2025-08-30 09:23:35 -07:00
commit 7ee8baf438
4 changed files with 19 additions and 9 deletions

View file

@ -11,7 +11,6 @@ function Button:new(x, y, r, b, c)
end
function Button:update(dt)
if self.b == "triggerleft" or self.b == "triggerright" then
if fightstick:getGamepadAxis(self.b) == 1 then
self.press = true
@ -38,4 +37,4 @@ function Button:draw()
love.graphics.circle(mode, self.x + self.r, self.y + self.r, self.r)
end
return Button
return Button

View file

@ -1,6 +1,8 @@
WINDOWWIDTH = 373
WINDOWHEIGHT = 212
WINDOWSCALE = 1
WINDOWWIDTH = 373*WINDOWSCALE
WINDOWHEIGHT = 212*WINDOWSCALE
BORDERLESS = true
BLACK = true
function love.conf(t)
t.window.width = WINDOWWIDTH
t.window.height = WINDOWHEIGHT

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

View file

@ -1,4 +1,5 @@
function love.load()
joysticks = love.joystick.getJoysticks()
fightstick = joysticks[1]
@ -39,10 +40,20 @@ function love.keypressed(key)
love.window.setMode(WINDOWWIDTH, WINDOWHEIGHT, {borderless=true, x=windowx, y=windowy})
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
function love.update(dt)
windowx, windowy, _ =love.window.getPosition()
windowx, windowy, _ = love.window.getPosition()
--movement keys
for i, v in ipairs(movement) do
v:update(dt)
@ -55,9 +66,7 @@ function love.update(dt)
end
function love.draw()
love.graphics.setBackgroundColor(0,0,0)
--love.graphics.setBackgroundColor(1, 179/255, 102/255)
--love.graphics.print("borderless = " .. (BORDERLESS and "true" or "false"), 0, 0)
love.graphics.scale(WINDOWSCALE, WINDOWSCALE)
--movement keys
for i, v in ipairs(movement) do
@ -68,4 +77,4 @@ function love.draw()
for i, v in ipairs(attack) do
v:draw()
end
end
end