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.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.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.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.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.getClipboardText

love.system.getClipboardText Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets text from the clipboard. Function Synopsis text = love.system.getClipboardText( ) Arguments None. Returns string text The text currently held in the system's clipboard. See Also love.system love.system.setClipboardText

love.sound.newSoundData

love.sound.newSoundData Creates new SoundData from a filepath, File, or Decoder. It's also possible to create SoundData with a custom sample rate, channel and bit depth. The sound data will be decoded to the memory in a raw format. It is recommended to create only short sounds like effects, as a 3 minute song uses 30 MB of memory this way. Function Synopsis soundData = love.sound.newSoundData( filename ) Arguments string filename The file name of the file to load. Returns SoundData soundDa

love.sound.newDecoder

love.sound.newDecoder Attempts to find a decoder for the encoded sound data in the specified file. Function Synopsis decoder = love.sound.newDecoder( file, buffer ) Arguments File file The file with encoded sound data. number buffer (2048) The size of each decoded chunk, in bytes. Returns Decoder decoder A new Decoder object. Function Synopsis decoder = love.sound.newDecoder( filename, buffer ) Arguments string filename The filename of the file with encoded sound data. number buffer (2

love.run

love.run The main function, containing the main loop. A sensible default is used when left out. Function Synopsis love.run( ) Arguments None. Returns Nothing. Examples The default function for 0.10.0, 0.10.1, and 0.10.2, used if you don't supply your own. function love.run()   if love.math then love.math.setRandomSeed(os.time()) end   if love.load then love.load(arg) end   -- We don't want the first frame's dt to include time taken by love.load. if love.timer then love.timer.step() en

love.resize

love.resize Available since LÖVE 0.9.0 This callback is not supported in earlier versions. Called when the window is resized, for example if the user resizes the window, or if love.window.setMode is called with an unsupported width or height in fullscreen and the window chooses the closest appropriate size. Function Synopsis love.resize( w, h ) Arguments number w The new width, in pixels. number h The new height, in pixels. Returns Nothing. Notes Calls to love.window.setMode will only