Difference between revisions of "love.system.setClipboardText (Français)"
Line 52: | Line 52: | ||
* [[love.system.getClipboardText (Français)]] | * [[love.system.getClipboardText (Français)]] | ||
[[Category:Functions (Français)]] | [[Category:Functions (Français)]] | ||
− | {{#set:Description=Place du texte dans le presse-papier | + | {{#set:Description=Place du texte dans le presse-papier.}} |
− | .}} | + | |
== Autres langues == | == Autres langues == | ||
{{i18n|love.system.setClipboardText}} | {{i18n|love.system.setClipboardText}} |
Latest revision as of 13:38, 23 January 2021
Disponible depuis LÖVE 0.9.0 |
Ce-tte function n'est pas supporté-e par des versions plus anciennes. |
Place du texte dans le presse-papier.
Fonction
Synopsis
love.system.setClipboardText( text )
Arguments
string (Français) text
- Le nouveau texte que le presse-papier du système doit contenir.
Retourne
Rien.
Exemples
Règle un raccourcit clavier agnostique au système d'exploitation pour un tampon de copier-coller.
local buffer function love.draw() love.graphics.print( "OS: "..love.system.getOS().."\n".. "Local buffer: "..tostring(buffer).."\n".. "System buffer: "..tostring(love.system.getClipboardText())) end function love.keypressed(key) local osString = love.system.getOS() local control if osString == "OS X" then control = love.keyboard.isDown("lgui","rgui") elseif osString == "Windows" or osString == "Linux" then control = love.keyboard.isDown("lctrl","rctrl") end if control then if key == "c" then if buffer then love.system.setClipboardText(buffer) end end if key == "v" then buffer = love.system.getClipboardText() end end end
Voir également
Autres langues
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info