Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 12,709 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Help plz #186995
03/04/08 20:41
03/04/08 20:41
Joined: Feb 2008
Posts: 27
kentucky
S
SpearBang Offline OP
Newbie
SpearBang  Offline OP
Newbie
S

Joined: Feb 2008
Posts: 27
kentucky
I have read and looked all over "i am new to lite-c" but did not get any clear code. I am stuck with 2 things

1) how to change the color of digits useing ttf font

2) How to hide panel when you are done with it or its done its job



Re: Help plz [Re: SpearBang] #186996
03/04/08 21:23
03/04/08 21:23
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
1) your_panel.red
your_panel.green
your_panel.blue

2) Hide a panel: your_panel.flags &= ~VISIBLE;
Remove a panel: pan_remove(your_panel);



Re: Help plz [Re: Lukas] #186997
03/04/08 22:08
03/04/08 22:08
Joined: Feb 2008
Posts: 27
kentucky
S
SpearBang Offline OP
Newbie
SpearBang  Offline OP
Newbie
S

Joined: Feb 2008
Posts: 27
kentucky
Quote:

2) Hide a panel: your_panel.flags &= ~VISIBLE;
Remove a panel: pan_remove(your_panel);



i have tryed this but noluck where would i use this can it be used like this?
Code:
  if (startpan_hide=1)
{
start_pan.flags &= ~VISIBLE;
}



Re: Help plz [Re: SpearBang] #186998
03/04/08 22:45
03/04/08 22:45
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
i hope you mean if(starpan_hide == 1) ...
note the "==" instead of "=".

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: Help plz [Re: JibbSmart] #186999
03/05/08 00:27
03/05/08 00:27
Joined: Feb 2008
Posts: 27
kentucky
S
SpearBang Offline OP
Newbie
SpearBang  Offline OP
Newbie
S

Joined: Feb 2008
Posts: 27
kentucky
ok what i am trying to do is when it a button with mouse it takes me to new game and starts the game and removes the panel

here is my code
Code:
 

var startpan_hide = 0;

function main()
{
video_mode = 7;
mouse_map = mouse_bmp;
mouse_mode = 2;
level_load("mainmenu.WMB");
wait (1);
///////////////////////////////////camera set for mainmenu
vec_set(camera.x,vector(-123,-123,-103)); // place the camera at X,Y,Z
camera.pan = 77;
camera.tilt = 15;
camera.roll = 0;

while (1)
{
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
wait (1);
}
}

function load_start()
{
camera.x = 200;
level_load("level_start.WMB");
startpan_hide = 1;
wait(1);

}

PANEL* start_pan =
{
layer = 10;
pos_x = 20;
pos_y = 60;
button (22,22,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL);
digits (50,25,4,start_font,10,start_button);
button (22,62,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL);
digits (50,65,4,start_font,10,load_button);
digits (10,30,4,start_font,10,startpan_hide);
flags = VISIBLE;
}
if (startpan_hide == 1)
{
pan_remove(start_pan);
}




but when it loads it the buttons are still seen

Re: Help plz [Re: SpearBang] #187000
03/05/08 09:32
03/05/08 09:32
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
set(start_pan,VISIBLE); //you can see the panel
reset(start_pan,VISIBLE); //you don`t can see it

Re: Help plz [Re: Widi] #187001
03/05/08 09:42
03/05/08 09:42
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
One has to metion that the LiteC Tutorial is very... thin Try to look at the examples as well as in some example code in the "Lite-C Contributions" folder in this forum.

Re: Help plz [Re: PadMalcom] #187002
03/05/08 09:48
03/05/08 09:48
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
... something wrong at your code. You have to move
if (startpan_hide == 1)
{
pan_remove(start_pan);
}
into the while(1) loop in the main function.

Last edited by Widi; 03/05/08 09:50.
Re: Help plz [Re: Widi] #187003
03/05/08 14:20
03/05/08 14:20
Joined: Aug 2007
Posts: 44
QLD, Australia
Serex Offline
Newbie
Serex  Offline
Newbie

Joined: Aug 2007
Posts: 44
QLD, Australia
set() and reset() are your friends

Code:

PANEL* start_pan =
{
layer = 10;
pos_x = 20;
pos_y = 60;
button (22,22,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL);
digits (50,25,4,start_font,10,start_button);
button (22,62,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL);
digits (50,65,4,start_font,10,load_button);
digits (10,30,4,start_font,10,startpan_hide);
flags = VISIBLE;
}

function main()
{
video_mode = 7;
mouse_map = mouse_bmp;
mouse_mode = 2;
level_load("mainmenu.WMB");
wait (1);
/////////////////////////////////// camera set for mainmenu
vec_set(camera.x,vector(-123,-123,-103)); // place the camera at X,Y,Z
camera.pan = 77;
camera.tilt = 15;
camera.roll = 0;
set(start_pan, VISIBLE);

while (1)
{
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
wait (1);
}
}

function load_start()
{
camera.x = 200;
level_load("level_start.WMB");
reset(start_pan, VISIBLE);
wait(1);

}



Re: Help plz [Re: Serex] #187004
03/05/08 17:36
03/05/08 17:36
Joined: Feb 2008
Posts: 27
kentucky
S
SpearBang Offline OP
Newbie
SpearBang  Offline OP
Newbie
S

Joined: Feb 2008
Posts: 27
kentucky
Thanks alot guys it works now i had to put the panel befor the main and useing
set reset
P>S and its great that you guys try to help and not flame for just starting lite-c and not knowing it all.


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