Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / trying to select an image from a file

Author
Message
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 30th Jul 2016 14:56
for some reason this aint working:


I call this from a main loop if user pressed the F7 key, there is a sync() and eveything else is working, but nothing shows on screen after selecting an image.
Hail to the king, baby!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Jul 2016 15:05 Edited at: 30th Jul 2016 15:07
start with a test

call test() at top after your screen settings or use breakpoints.
what is your virtual resolution? the sprite pos is inside?

function test()
select_image()
do
sync()
loop
endfunction
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 30th Jul 2016 15:16 Edited at: 30th Jul 2016 16:53
my vres is
SetWindowSize( 1024, 768, 1 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )

I have everything else showing,here is the whole code:



I press F7 to choose a file, in this program one can place virtual buttons on screen with the mouse, save the setup with F4 and load back with F1, it is a whole menu editor I am trying to create, pressing f5 hides/shows the edit boxes you use to set the buttons params before putting it down with the left mouse button, whilst f8 clears the whole thing! the code needs no media,I have yet to code in the ability to delete a button already created, but will do, it is pretty much early days, only started coding it yesterday.I actually ripped it out of the even bigger project of the 2D Level editor as this was going to be integrated into it, but got messy so developing it seperately
Hail to the king, baby!
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 30th Jul 2016 15:39 Edited at: 30th Jul 2016 15:39
The downside is that buttons always display above every thing else, so if you place one on top of the edit boxes/text then they will be covered up, I might change the code to have the edit boxes in one single small row at the bottom,taking up very little, and limit the drawing space for the buttons to minus that area, anyhow, that is thinking ahead, first I want this image loading working so one can choose a backdrop behind the buttons!
Hail to the king, baby!
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 30th Jul 2016 17:07 Edited at: 30th Jul 2016 17:08
ah never mind lol, found out I actually either need the files already in the media folder of the project, or indeed I should copy them into that folder from loading them in,will probably do the latter, silly me!
Hail to the king, baby!

Login to post a reply

Server time is: 2024-09-29 17:31:00
Your offset time is: 2024-09-29 17:31:00