mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2025-12-01 17:00:11 +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.footer.text = 'Original randomizer:\r\nshru.itch.io/cave-story-randomizer'
|
||||||
|
|
||||||
layout.go:onPress(function()
|
layout.go:onPress(function()
|
||||||
|
Randomizer:new()
|
||||||
|
|
||||||
if Randomizer:ready() then
|
if Randomizer:ready() then
|
||||||
if settings.seedselect.value and settings.customseed.value ~= "" then
|
if settings.seedselect.value and settings.customseed.value ~= "" then
|
||||||
Randomizer.customseed = settings.customseed.value
|
Randomizer.customseed = settings.customseed.value
|
||||||
|
|
@ -71,7 +73,8 @@ layout.go:onPress(function()
|
||||||
|
|
||||||
Randomizer.puppy = settings.puppy.value
|
Randomizer.puppy = settings.puppy.value
|
||||||
C:setStatus(Randomizer:randomize())
|
C:setStatus(Randomizer:randomize())
|
||||||
Randomizer:new()
|
|
||||||
|
layout.sharecode.text = "Copy Sharecode"
|
||||||
else
|
else
|
||||||
C:setStatus("No Cave Story folder found!\r\nDrag and drop your Cave Story folder here.")
|
C:setStatus("No Cave Story folder found!\r\nDrag and drop your Cave Story folder here.")
|
||||||
end
|
end
|
||||||
|
|
@ -87,6 +90,13 @@ settings.closeButton:onPress(function()
|
||||||
layout:show()
|
layout:show()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
layout.sharecode:onPress(function()
|
||||||
|
if Randomizer.sharecode ~= "" then
|
||||||
|
love.system.setClipboardText(Randomizer.sharecode)
|
||||||
|
layout.sharecode.text = "Copied!"
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
settings.customseed:onChange(function()
|
settings.customseed:onChange(function()
|
||||||
if #settings.customseed.value > 20 then
|
if #settings.customseed.value > 20 then
|
||||||
settings.customseed.value = settings.customseed.value:sub(1, 20)
|
settings.customseed.value = settings.customseed.value:sub(1, 20)
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,15 @@ return { id = 'window',
|
||||||
type = 'button',
|
type = 'button',
|
||||||
style = 'button',
|
style = 'button',
|
||||||
id = 'go',
|
id = 'go',
|
||||||
text = 'Randomize',
|
text = 'Randomize!',
|
||||||
|
width = 100,
|
||||||
|
height = 32,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = 'button',
|
||||||
|
style = 'button',
|
||||||
|
id = 'sharecode',
|
||||||
|
text = "Copy Sharecode",
|
||||||
width = 100,
|
width = 100,
|
||||||
height = 32,
|
height = 32,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue