2 registered members (Akow, SBGuy),
1,423
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Open/browse dialog
[Re: Jaeger]
#270667
06/09/09 10:20
06/09/09 10:20
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Its not that Jaeger. Its just that 3DGS (like any DirectX app) create the full-screen in a different "video-space"(called a D3Ddevice) to windows itself, and the API's ONLY create themselves on the windows D3Ddevice.
Ive played with your idea in the past, and all I could get was the API box coming up in front OK, but the 3DGS display freezes, even though the game is still running, or the game would get kicked back to windowed mode with the API box in front.
Neither of which was acceptable.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Open/browse dialog
[Re: EvilSOB]
#270676
06/09/09 11:02
06/09/09 11:02
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
OP
Serious User
|
OP
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
ok, so basicly, i can create text boxes, window buttons, tabs, menus...with windows.h?
Last edited by croman; 06/09/09 11:02.
Ubi bene, ibi Patria.
|
|
|
Re: Open/browse dialog
[Re: croman]
#270699
06/09/09 12:17
06/09/09 12:17
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
OP
Serious User
|
OP
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
help me out with this one, will ya? i'm new to this windows.h stuff
how can i create a text box for example and that the text inside of it gets saved to some STRING?
Ubi bene, ibi Patria.
|
|
|
Re: Open/browse dialog
[Re: Espér]
#271424
06/13/09 02:28
06/13/09 02:28
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Esper :: Lite-C or windows.h?
//LITE-C
var fhandle = file_open_read("test");
if(fhandle) { file_close(fhandle); printf("file exists"); }
else { printf("file DOESNT exist"); }
//when you have included "windows.h"
if(GetFileAttributes("test.txt")+1) { printf("file exists"); }
else { printf("file DOESNT exist"); }
//also used like this when filename is in a 3DGS string
if(GetFileAttributes(filename_string.chars)+1) { printf("file exists"); }
else { printf("file DOESNT exist"); }
PM me if you need more than this... Croman :: Sorry for that minor highjack of your thread. As to your question about building your own dialog box, I cant help there sorry. I dont do much in the way of "visible" API work because its very anti-fullscreen. Plus what you want is a-lot of work. Visual API stuff is hideously complex/messy. I strongly advise you coding something in lite-c code instead.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Open/browse dialog
[Re: EvilSOB]
#271726
06/14/09 18:34
06/14/09 18:34
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
Expert
|
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
uhm.. both are not wkring.. because i included windows.h:
if(menutyp == 0)
{
menupart_x = (screensize.x*0);
menupart_y = (screensize.y*0);
var filecounter = 1;
while(filecounter != 5)
{
if(filecounter == 1)
{
if(GetFileAttributes("chronicle_1.sav")+1)
{PANEL* button_1 = pan_create("pos_x=71;pos_y=131;flags=SHOW;
button(0, 0, icon_save13, icon_save11, icon_save12, call_file_1, NULL, NULL);",2);printf("1 existiert");}
else
{PANEL* button_1 = pan_create("pos_x=71;pos_y=131;flags=SHOW;
button(0, 0, button_leer, button_leer, button_leer, new_file_1, NULL, NULL);",2);}
}
if(filecounter == 2)
{
if(GetFileAttributes("\\Saves\chronicle_2.sav")+1)
{PANEL* button_2 = pan_create("pos_x=71;pos_y=131;flags=SHOW;
button(0, 0, icon_save23, icon_save21, icon_save22, call_file_2, NULL, NULL);",2);}
else
{PANEL* button_2 = pan_create("pos_x=71;pos_y=241;flags=SHOW;
button(0, 0, button_leer, button_leer, button_leer, new_file_2, NULL, NULL);",2);}
}
if(filecounter == 3)
{
if(GetFileAttributes("\\Saves\chronicle_3.sav")+1)
{PANEL* button_3 = pan_create("pos_x=71;pos_y=351;flags=SHOW;
button(0, 0, icon_save33, icon_save31, icon_save32, call_file_3, NULL, NULL);",2);}
else
{PANEL* button_3 = pan_create("pos_x=71;pos_y=351;flags=SHOW;
button(0, 0, button_leer, button_leer, button_leer, new_file_3, NULL, NULL);",2);}
}
if(filecounter == 4)
{
if(GetFileAttributes("\\Saves\chronicle_4.sav")+1)
{PANEL* button_4 = pan_create("pos_x=71;pos_y=461;flags=SHOW;
button(0, 0, icon_save43, icon_save41, icon_save42, call_file_4, NULL, NULL);",2);}
else
{PANEL* button_4 = pan_create("pos_x=71;pos_y=461;flags=SHOW;
button(0, 0, button_leer, button_leer, button_leer, new_file_4, NULL, NULL);",2);}
}
filecounter += 1;
}
}
i stored chronicle_1.sav and chronicle_2.sav, in the "Saves" Folder of my project.. But always the else condition is activated..
Last edited by Espér; 06/14/09 18:39.
|
|
|
Re: Open/browse dialog
[Re: Espér]
#271882
06/15/09 15:04
06/15/09 15:04
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
The format for the path and filename does NOT want to start with "\\".
These lines should all use the 'path' format as follows. if(GetFileAttributes("Saves\\chronicle_2.sav")+1)
API-based functions assume you are starting from the project folder. If you put a '\\' at the beginning of the file/path string, then it assumes you want to look at the root directory of that drive letter. ie If your project is at C:\projects\myproject, and the you use the test GetFileAttributes("\\Saves\\chronicle_2.sav")+1), then it will be checking for the file "C:\Saves\chronicle_2.sav"... (When you use API functions anyway)
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|