mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2024-11-22 14:53:00 +00:00
can now copy sharecode after randomization
This commit is contained in:
parent
ee3c595077
commit
d7969ecd65
|
@ -54,6 +54,8 @@ layout.twitter.text = '(@shruuu and @duncathan_salt)'
|
|||
layout.footer.text = 'Original randomizer:\r\nshru.itch.io/cave-story-randomizer'
|
||||
|
||||
layout.go:onPress(function()
|
||||
Randomizer:new()
|
||||
|
||||
if Randomizer:ready() then
|
||||
if settings.seedselect.value and settings.customseed.value ~= "" then
|
||||
Randomizer.customseed = settings.customseed.value
|
||||
|
@ -71,7 +73,8 @@ layout.go:onPress(function()
|
|||
|
||||
Randomizer.puppy = settings.puppy.value
|
||||
C:setStatus(Randomizer:randomize())
|
||||
Randomizer:new()
|
||||
|
||||
layout.sharecode.text = "Copy Sharecode"
|
||||
else
|
||||
C:setStatus("No Cave Story folder found!\r\nDrag and drop your Cave Story folder here.")
|
||||
end
|
||||
|
@ -87,6 +90,13 @@ settings.closeButton:onPress(function()
|
|||
layout:show()
|
||||
end)
|
||||
|
||||
layout.sharecode:onPress(function()
|
||||
if Randomizer.sharecode ~= "" then
|
||||
love.system.setClipboardText(Randomizer.sharecode)
|
||||
layout.sharecode.text = "Copied!"
|
||||
end
|
||||
end)
|
||||
|
||||
settings.customseed:onChange(function()
|
||||
if #settings.customseed.value > 20 then
|
||||
settings.customseed.value = settings.customseed.value:sub(1, 20)
|
||||
|
|
|
@ -37,7 +37,15 @@ return { id = 'window',
|
|||
type = 'button',
|
||||
style = 'button',
|
||||
id = 'go',
|
||||
text = 'Randomize',
|
||||
text = 'Randomize!',
|
||||
width = 100,
|
||||
height = 32,
|
||||
},
|
||||
{
|
||||
type = 'button',
|
||||
style = 'button',
|
||||
id = 'sharecode',
|
||||
text = "Copy Sharecode",
|
||||
width = 100,
|
||||
height = 32,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue