Commit Graph

12 Commits

Author SHA1 Message Date
Alex Szpakowski ec9dec6b80 Replaced luax_newtype with luax_pushtype (and added luax_rawnewtype for the old functionality of luax_newtype.)
luax_pushtype keeps the object in a weak table and checks the table before creating a new userdata, so it re-uses the object's existing wrapper userdata if it can, whenever the object is pushed to Lua.

This fixes some subtle issues with love objects, where using them as keys in tables would not always work as expected (https://love2d.org/forums/viewtopic.php?f=4&t=39398&p=112388#p112415). It also decreases the amount of new Lua objects created, saving the garbage collector some work.
2013-08-29 00:40:06 -03:00
Alex Szpakowski 526ccb12ad Renamed love.window.isFullscreen to love.window.getFullscreen (resolves issue #721) 2013-08-28 19:15:00 -03:00
Alex Szpakowski 113ed1cfe7 Merged SDL2 changes from bartbes/love-experiments/SDL2 into default.
- Added love.system module, including clipboard functions.

- Added custom hardware cursors (love.mouse.newCursor, love.mouse.setCursor.)

- Revamped love.joystick:
-- added Joystick objects and moved love.joystick functions which operated on individual joysticks to methods on the Joystick objects.
-- Added love.joystick.getJoystick and love.joystick.getJoystickCount.
-- Added events for when joysticks are connected and disconnected.
-- Added 'Gamepad' methods to Joystick objects: Joystick:isGamepad, Joystick:getGamepadAxis, and Joystick:isGamepadDown. They're a common abstraction for xbox controller-like joystick across operating systems.

- Added monitor choosing support and "fullscreen desktop" mode to love.window.

- Moved unicode text input events to their own callback function (love.textinput), removed the key repeat functions from love.keyboard and made the second argument of love.keypressed a boolean saying whether the keypress was a repeat.

- liblove now works with love.window and love.graphics in OS X
2013-08-25 16:51:42 -03:00
Alex Szpakowski 035130533b Updated love.window.checkMode to work when a windowflag table is used as the third parameter 2013-08-22 20:28:50 -03:00
Alex Szpakowski 76565a3e11 Renamed love.window.setCaption to love.window.setTitle (resolves issue #703) 2013-08-14 11:16:41 -03:00
Alex Szpakowski 3e57cfd174 Slightly reduced internal reliance on specific module backends 2013-08-03 16:30:37 -03:00
Alex Szpakowski 7601ef05f4 Fixed a potential memory leak 2013-07-12 15:18:27 -03:00
Bart van Strien 25d0d87247 Add love.window.getIcon, and reset it after setMode, so it doesn't get reset (issue #667 and issue #513) 2013-07-09 15:19:49 +02:00
Alex Szpakowski eaf69aead1 Renamed love.window.setTitle back to love.window.setCaption
Previous rename was unnecessary
2013-05-21 22:24:51 -03:00
Alex Szpakowski 2b54ea23de Added love.window.isVisible 2013-05-20 06:25:51 -03:00
Alex Szpakowski b391a9f4a6 Added love.window.hasMouseFocus (issue #120) 2013-05-11 15:57:16 -03:00
Alex Szpakowski ff77eb4b29 Added love.window (issue #6.) All window-related functions have been moved from love.graphics to love.window.
love.graphics.setCaption has been renamed to love.window.setTitle.
2013-05-10 22:32:15 -03:00