Merge pull request #488 from argonui/gallery

Added a "use custom url" button to the image gallery
This commit is contained in:
Entrox-Licher 2023-12-13 14:12:09 -05:00 committed by GitHub
commit 5372aa2977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -691,6 +691,16 @@ function onClick_select(_, _, identificationKey)
updatePreviewWindow() updatePreviewWindow()
end end
-- click function for the "Custom URL" button in the playarea image gallery
function onClick_customUrl(player)
onClick_toggleUi(_, "playareaGallery")
Wait.time(function()
player.showInputDialog("Enter a custom URL for the playarea image", "", function(newURL)
playAreaApi.updateSurface(newURL)
end)
end, 0.15)
end
-- click function for the download button in the preview window -- click function for the download button in the preview window
function onClick_download(player) function onClick_download(player)
local params = library[contentToShow][currentListItem] local params = library[contentToShow][currentListItem]

View File

@ -12,6 +12,13 @@
<Button class="bWhite" <Button class="bWhite"
color="white"/> color="white"/>
<Button class="windowButton"
hoverClass="bGrey"
pressClass="bWhite"
selectClass="bWhite"
color="#888888"
font="font_teutonic-arkham"/>
<!-- image boxes in the grid --> <!-- image boxes in the grid -->
<VerticalLayout class="imageBox" <VerticalLayout class="imageBox"
color="black" color="black"
@ -58,6 +65,12 @@
font="font_teutonic-arkham" font="font_teutonic-arkham"
preferredWidth="600" preferredWidth="600"
alignment="MiddleLeft">Playarea Image Gallery</Text> alignment="MiddleLeft">Playarea Image Gallery</Text>
<Button id="customUrl_button"
class="windowButton"
onClick="onClick_customUrl"
height="30"
preferredWidth="125"
fontSize="24">Use custom URL</Button>
<Panel preferredWidth="50"> <Panel preferredWidth="50">
<Button rectAlignment="MiddleRight" <Button rectAlignment="MiddleRight"
width="50" width="50"