You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use any variable name if you don't like "WINDOWS"...Try using "MAC" pun
Make Tables! Key is the keyboard input, value is the width size
WINDOWS=require("path-to-lovely-windows")
localtable= {
f1= {1024,720},
f2= {720,600}
}
--so if the user press f1, the new window size will be 1024x720
Initialize
functionlove.load()
WINDOW.initialize(320,200) -- your custom game size (note: it is not the same as the window size)--then add the table to the moduleWINDOW.addInputTable(table) --parameters are the table we created earlierend
Recognizing Inputs
functionkeypressed(key)
WINDOW.keyInput(key)
end--or if you want keyreleased, just put WINDOW.keyInput(key) in there.
OTHER FUNCTIONS
WINDOW.getRatio() - returns the calculated ratio, useful for using love.graphics.scale()
WINDOW.listInput() - prints all the width and height sizes you've added. Useful with the LOVEDEBUG library
TO-DO
Add fullscreen switch
Add joystick/gamepad input
You can contribute, just make some pull request and commits.
Or you can issue if you have a problem
LICENSE
This module/library is under the MIT license.
About
Lovely-Windows is a simple Window/Screen Manager for Love2D