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 / [SOLVED] Chose File interface in AGK

Author
Message
BOB Tellura
8
Years of Service
User Offline
Joined: 22nd Dec 2015
Location:
Posted: 9th Sep 2017 16:58
Hi

I'm working on a level editor.
Levels are writed on files.
I would like create an interface to chose files.
My fist idea is to use button dynamicly created in function of files...

I would like to know if someone early work on this and the methode used (buttons, sprites...)

Thanks

BOB

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Sep 2017 02:57
This post has been marked by the post author as the answer.
you could use
ChooseRawFile()
BOB Tellura
8
Years of Service
User Offline
Joined: 22nd Dec 2015
Location:
Posted: 10th Sep 2017 17:27
Hi,

Really thanks!!!!

I'm confused.

I serach but I don't find it...

Thanks for your quick response blink0k.

Have a nice weekend.

BOB
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Sep 2017 21:12
I use this page to search for commands

Also the editor help is always a little behind the online help so it's best to use the online help for the latest commands
BOB Tellura
8
Years of Service
User Offline
Joined: 22nd Dec 2015
Location:
Posted: 12th Sep 2017 22:27
Top blink0k

My goal is to choose a file in the media folder (the folder by default)
If I use "ChooseRawFile()" I'm in "My documents" (in windows platform)
Can I change the folder to get the media folder?

Thanks

BOB
IronManhood
9
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 12th Sep 2017 22:50
I typically use https://www.appgamekit.com/documentation/Reference/File/GetFirstFile.htm and create sprites and text as the ui.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Sep 2017 23:17
BOB Tellura
8
Years of Service
User Offline
Joined: 22nd Dec 2015
Location:
Posted: 13th Sep 2017 22:33
Finally my code:

If GetCurrentDir() <> "media/" Then SetFolder("media/")
ret$=ChooseRawFile("*.alvl")
If ret$=""
//Nothing selected
Else
LevelFile = opentoread(ret$)
Level = ReadLine(LevelFile)
Endif

Thanks a lot IronMahood and bink0k

Login to post a reply

Server time is: 2024-11-24 07:22:10
Your offset time is: 2024-11-24 07:22:10