Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, ozgur), 1,421 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Open file box? #410865
11/10/12 12:06
11/10/12 12:06
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
How would I have game studio create an "open file" box at run time so users could select an image off the hard drive as a background?


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Open file box? [Re: Stansmedia] #410875
11/10/12 13:02
11/10/12 13:02
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Include http://www.conitec.net/beta/strio_c.htm and use file_dialog(char* title,char* filter)


no science involved
Re: Open file box? [Re: fogman] #410877
11/10/12 13:11
11/10/12 13:11
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
file_dialog is good if you want a popUp Window (like Windows "open file")

For an ingame option use:

Create a folder at runtime (or create one by hand with rightclick-> new in the project folder):
Code:
CreateDirectory(_chr(str_cat(work_dir,"My Box Folder")),NULL);



and use
txt_for_dir
to get a list of all files (with specific extention) of the folder.

Now just create clickable buttons with PANEL´s button function and digits, and you´re done ^^

Last edited by Espér; 11/10/12 13:13.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Open file box? [Re: Espér] #410903
11/10/12 17:56
11/10/12 17:56
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
Sweet. I had a problem loading project files but there was a solution to that in the manual laugh

SetCurrentDirectory(_chr(work_dir));

Now ive got another pickle... Is it possible to set a fixed image as the sky? As of right now it just keeps coming up as a flat wall in the scene.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Open file box? [Re: Stansmedia] #410906
11/10/12 18:27
11/10/12 18:27
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
I managed to get it sort of working, problem is the image appears in front of everything...

Code:
ENTITY* skycubepic =
{
	
  x = 2000;
  y = 0;
  z = 0;
  type = "cosmo_f02+6.bmp"; // SET BY USER
  flags2 = SKY | SHOW | SCENE; 
}



Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Open file box? [Re: Stansmedia] #410909
11/10/12 18:37
11/10/12 18:37
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
Solved! Problem was my sky color wasn't transparent... I had a feeling setting a negative layer number would be it but it kept disapearing... Because of sky color.

Code:
ENTITY* skycubepic =
{
  layer = -1;	
  x = 100;
  y = 0;
  z = 0;
  type = "cosmo_f02+6.bmp"; // SET BY USER
  flags2 = SKY | SHOW ;



Code:
function main()
{
   ...
   vec_set(sky_color.blue,vector(0,0,0));
   ...
}



Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1