rem
rem AGK Application 1.08B13
rem MR
rem image selection
MainLoop()
end
function MainLoop()
image=SelectImage()
if image=0
//was canceled
else
//make a Background sprite
sprite = CreateSprite( image )
SetSpritesize( sprite, -1,100 )
setspritepositionbyoffset(sprite,50,50)
endif
bntend=1
AddVirtualButton( bntend,10,10,10 )
SetVirtualButtonText( bntend, "Exit" )
do
if GetVirtualButtonPressed( bntend ) then exit
Sync()
loop
deleteVirtualButton(bntend)
endfunction
function SelectImage()
if ShowChooseImageScreen()=1 //Ok
while IsChoosingImage()=1 //Dialog is Open, Wait
sync()
endwhile
image = GetChosenImage() //Get the image
endif
endfunction image
Help make AGK better by submitting an example for this command! (All examples are subject to approval)
rem rem AGK Application 1.08B13 rem MR rem image selection MainLoop() end function MainLoop() image=SelectImage() if image=0 //was canceled else //make a Background sprite sprite = CreateSprite( image ) SetSpritesize( sprite, -1,100 ) setspritepositionbyoffset(sprite,50,50) endif bntend=1 AddVirtualButton( bntend,10,10,10 ) SetVirtualButtonText( bntend, "Exit" ) do if GetVirtualButtonPressed( bntend ) then exit Sync() loop deleteVirtualButton(bntend) endfunction function SelectImage() if ShowChooseImageScreen()=1 //Ok while IsChoosingImage()=1 //Dialog is Open, Wait sync() endwhile image = GetChosenImage() //Get the image endif endfunction image