### love.getVersion Source: https://github.com/htv04/wiilove/wiki/love Gets the current running version of WiiLÖVE. Returns the major, minor, and patch versions. ```APIDOC ## love.getVersion ### Description Gets the current running version of WiiLÖVE. ### Returns - **major** (number) - The major version of WiiLÖVE. - **minor** (number) - The minor version of WiiLÖVE. - **patch** (number) - The patch version of WiiLÖVE. ### Example ```lua local major, minor, patch = love.getVersion() print(major .. "." .. minor .. "." .. patch) ``` ``` -------------------------------- ### Get WiiLÖVE Version Source: https://github.com/htv04/wiilove/wiki/love Retrieves the major, minor, and patch version numbers of the currently running WiiLÖVE framework. ```lua major, minor, patch = love.getVersion() ``` -------------------------------- ### Initialize Game State Source: https://github.com/htv04/wiilove/wiki/love This callback is executed once at the very beginning of the game to set up initial states. ```lua love.load() ``` -------------------------------- ### Handle Wiimote Connection Source: https://github.com/htv04/wiilove/wiki/love This callback is invoked when a Wiimote is successfully connected to the system. ```lua love.wiimoteconnected(wiimote) ``` -------------------------------- ### love.load Source: https://github.com/htv04/wiilove/wiki/love Callback function called exactly once at the beginning of the game. Used for initialization. ```APIDOC ## love.load ### Description Called exactly once at the beginning of the game. ### Example ```lua function love.load() print("Game loaded!") end ``` ``` -------------------------------- ### Handle Home Button Press Source: https://github.com/htv04/wiilove/wiki/love This callback is triggered when the HOME button is pressed. Returning true will prevent the game from quitting. ```lua abort = love.homepressed() ``` -------------------------------- ### love.homepressed Source: https://github.com/htv04/wiilove/wiki/love Callback triggered when the HOME button is pressed. Can abort the game quit. ```APIDOC ## love.homepressed ### Description Triggered when the HOME button is pressed. The game will quit after this function runs unless the function returns an aborted status. ### Returns - **abort** (boolean) - Abort quitting. If true, do not quit the game. ### Example ```lua function love.homepressed() -- Return true to prevent quitting return true end ``` ``` -------------------------------- ### Pump Events into the Queue Source: https://github.com/htv04/wiilove/wiki/love.event This low-level function is typically called by `love.run` to process system events. It must be called to keep the game running and handle system-generated events. ```lua love.event.pump() ``` -------------------------------- ### love.draw Source: https://github.com/htv04/wiilove/wiki/love Callback function used to draw on the screen every frame. ```APIDOC ## love.draw ### Description Used to draw on the screen every frame. ### Example ```lua function love.draw() love.graphics.print("Hello, world!", 10, 10) end ``` ``` -------------------------------- ### love.wiimoteconnected Source: https://github.com/htv04/wiilove/wiki/love Callback called when a Wiimote is connected. Receives the connected Wiimote object. ```APIDOC ## love.wiimoteconnected ### Description Called when a Wiimote is connected. ### Parameters #### Path Parameters - **wiimote** (Wiimote) - The newly connected Wiimote. ### Example ```lua function love.wiimoteconnected(wiimote) print("Wiimote connected: " .. tostring(wiimote)) end ``` ``` -------------------------------- ### love.update Source: https://github.com/htv04/wiilove/wiki/love Callback function used to update the state of the game every frame. Receives the time delta. ```APIDOC ## love.update ### Description Used to update the state of the game every frame. ### Parameters #### Path Parameters - **dt** (number) - Time since the last update in seconds. ### Example ```lua function love.update(dt) -- Update game logic here end ``` ``` -------------------------------- ### Draw Game Elements Source: https://github.com/htv04/wiilove/wiki/love This callback is executed every frame for rendering game elements onto the screen. ```lua love.draw() ``` -------------------------------- ### love.event.pump Source: https://github.com/htv04/wiilove/wiki/love.event Pumps events into the event queue. This is a low-level function typically called by `love.run` and is necessary for the system to recognize the game as running and to handle system-generated events. ```APIDOC ## love.event.pump ### Description Pumps events into the event queue. This is a low-level function, and is usually not called by the developer, but by `love.run`. This needs to be called for the system to think the game is still running, and if you want to handle system-generated events at all. ### Method CALL ### Endpoint love.event.pump() ### Parameters None ### Response None ### Request Example None ### Response Example None ``` -------------------------------- ### love.wiimotedisconnected Source: https://github.com/htv04/wiilove/wiki/love Callback called when a Wiimote is disconnected. Receives the disconnected Wiimote object. ```APIDOC ## love.wiimotedisconnected ### Description Called when a Wiimote is disconnected. ### Parameters #### Path Parameters - **wiimote** (Wiimote) - The now-disconnected Wiimote. ### Example ```lua function love.wiimotedisconnected(wiimote) print("Wiimote disconnected: " .. tostring(wiimote)) end ``` ``` -------------------------------- ### Basic Drawing Function Source: https://github.com/htv04/wiilove/blob/main/README.md This is the fundamental draw function in WiiLÖVE, used to render elements to the screen. It's called every frame. ```lua function love.draw() love.graphics.print("WiiLÖVE is awesome!", 320, 240) end ``` -------------------------------- ### love.event.poll Source: https://github.com/htv04/wiilove/wiki/love.event Iterates through messages in the event queue. The queue is reset after `love.event.pump` is called. ```APIDOC ## love.event.poll ### Description Iterator for messages in the event queue. Resets after [`love.event.pump`](#loveeventpump) is called. ### Method CALL ### Endpoint e, a, b, c, d, e, f = love.event.poll() ### Parameters None ### Response - **e** (string) - Name of the event. - **a, b, c, d, e, f** (Variant) - Optional arguments passed to the event function. ### Request Example None ### Response Example None ``` -------------------------------- ### Update Game State Source: https://github.com/htv04/wiilove/wiki/love This callback is called every frame to update the game's logic and state. It receives the time elapsed since the last frame. ```lua love.update(dt) ``` -------------------------------- ### Poll Events from the Queue Source: https://github.com/htv04/wiilove/wiki/love.event Iterates through messages in the event queue. The queue is reset after `love.event.pump` is called. It returns the event name and its arguments. ```lua e, a, b, c, d, e, f = love.event.poll() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.