- Unify clipboard
This commit is contained in:
@@ -97,7 +97,7 @@ function scene.keyDown(key)
|
||||
if rep.available and rep.fileName then
|
||||
local repStr=loadFile(rep.fileName,'-string')
|
||||
if repStr then
|
||||
love.system.setClipboardText(love.data.encode('string','base64',repStr))
|
||||
CLIPBOARD.set(love.data.encode('string','base64',repStr))
|
||||
MES.new('info',text.exportSuccess)
|
||||
else
|
||||
MES.new('error',text.replayBroken)
|
||||
@@ -107,7 +107,7 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
elseif key=='v' and kb.isDown('lctrl','rctrl') or key=='cV' then
|
||||
local repStr=love.system.getClipboardText()
|
||||
local repStr=CLIPBOARD.get()
|
||||
local res,fileData=pcall(love.data.decode,'string','base64',repStr)
|
||||
if res then
|
||||
local fileName=os.date("replay/%Y_%m_%d_%H%M%S_import.rep")
|
||||
|
||||
Reference in New Issue
Block a user