Gamestudio Links
Zorro Links
Newest Posts
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (VoroneTZ), 9,291 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 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 | 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