love.system.getOS

love.system.getOS Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the current operating system. In general, LÖVE abstracts away the need to know the current operating system, but there are a few cases where it can be useful (especially in combination with os.execute.) Function Synopsis osString = love.system.getOS( ) Arguments None. Returns string osString The current operating system. "OS X", "Windows", "Linux", "Android" or "iOS". Notes In LÖVE ver

love.system.getPowerInfo

love.system.getPowerInfo Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets information about the system's power supply. Function Synopsis state, percent, seconds = love.system.getPowerInfo( ) Arguments None. Returns PowerState state The basic state of the power supply. number percent (nil) Percentage of battery life left, between 0 and 100. nil if the value can't be determined or there's no battery. number seconds (nil) Seconds of battery life left. ni

love.system.getProcessorCount

love.system.getProcessorCount Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the number of CPU cores in the system. Function Synopsis cores = love.system.getProcessorCount( ) Arguments None. Returns number cores The number of CPU cores. Notes The number includes the threads reported if technologies such as Intel's Hyper-threading are enabled. For example, on a 4-core CPU with Hyper-threading, this function will return 8. See Also love.system lov

love.system.openURL

love.system.openURL Available since LÖVE 0.9.1 This function is not supported in earlier versions. Opens a URL with the user's web or file browser. Function Synopsis success = love.system.openURL( url ) Arguments string url The URL to open. Must be formatted as a proper URL. Returns boolean success Whether the URL was opened successfully. Examples Open love2d.org when the game is loaded. function love.load() love.system.openURL("http://love2d.org/") end Open the game's save direc

love.system.setClipboardText

love.system.setClipboardText Available since LÖVE 0.9.0 This function is not supported in earlier versions. Puts text in the clipboard. Function Synopsis love.system.setClipboardText( text ) Arguments string text The new text to hold in the system's clipboard. Returns Nothing. See Also love.system love.system.getClipboardText

love.system.vibrate

love.system.vibrate Available since LÖVE 0.10.0 This function is not supported in earlier versions. Causes the device to vibrate, if possible. Currently this will only work on Android and iOS devices that have a built-in vibration motor. Function Synopsis love.system.vibrate( seconds ) Arguments number seconds (0.5) The duration to vibrate for. If called on an iOS device, it will always vibrate for 0.5 seconds due to limitations in the iOS system APIs. Returns Nothing. See Also love.s

love.textedited

love.textedited Available since LÖVE 0.10.0 This function is not supported in earlier versions. Called when the candidate text for an IME (Input Method Editor) has changed. The candidate text is not the final text that the user will eventually choose. Use love.textinput for that. Function Synopsis love.textedited( text, start, length ) Arguments string text The UTF-8 encoded unicode candidate text. number start The start cursor of the selected candidate text. number length The length o

love.textinput

love.textinput Available since LÖVE 0.9.0 This function is not supported in earlier versions. Called when text has been entered by the user. For example if shift-2 is pressed on an American keyboard layout, the text "@" will be generated. Function Synopsis love.textinput( text ) Arguments string text The UTF-8 encoded unicode text. Returns Nothing. Notes Although Lua strings can store UTF-8 encoded unicode text just fine, many functions in Lua's string library will not treat the text a

love.thread.getChannel

love.thread.getChannel Available since LÖVE 0.9.0 This function is not supported in earlier versions. Creates or retrieves a named thread channel. Function Synopsis channel = love.thread.getChannel( name ) Arguments string name The name of the channel you want to create or retrieve. Returns Channel channel The Channel object associated with the name. See Also love.thread Channel

love.thread.getThread

love.thread.getThread Available since LÖVE 0.7.0 and removed in LÖVE 0.9.0 This function is not supported in earlier or later versions. Look for a thread and get its object. Function Synopsis thread = love.thread.getThread( name ) Arguments string name The name of the thread to return. Returns Thread thread The thread with that name. Function Synopsis thread = love.thread.getThread( ) Arguments None. Returns Thread thread The current thread. See Also love.thread