added a "use custom url" button

This commit is contained in:
Chr1Z93 2023-11-24 15:17:21 +01:00
parent 5ea2fbb2b8
commit ffd9d6f9e0
2 changed files with 20 additions and 0 deletions

View File

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

View File

@ -12,6 +12,13 @@
<Button class="bWhite"
color="white"/>
<Button class="windowButton"
hoverClass="bGrey"
pressClass="bWhite"
selectClass="bWhite"
color="#888888"
font="font_teutonic-arkham"/>
<!-- image boxes in the grid -->
<VerticalLayout class="imageBox"
color="black"
@ -58,6 +65,12 @@
font="font_teutonic-arkham"
preferredWidth="600"
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">
<Button rectAlignment="MiddleRight"
width="50"