1 registered members (TipmyPip),
18,449
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Button in a Panel/ lite c
#234411
11/02/08 20:19
11/02/08 20:19
|
Joined: Nov 2007
Posts: 60
darci
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2007
Posts: 60
|
hi all, i´ve got a problem. i made a button in a panel but this all in the .wdl format PANEL name_pan = {//........................................... bmap = "startgame.dds"; pos_x = 10; pos_y = 10; layer = 11; button(0,0, "over.dds", "click.dds", "clickoff.dds",function, NULL, NULL); flags = VISIBLE; } but in .c format it does not work, and i dont knwo how to make it right, because the helper show me only the .wdl sample 
|
|
|
Re: Button in a Panel/ lite c
[Re: darci]
#234412
11/02/08 20:24
11/02/08 20:24
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
You forgot the star after PANEL. It's supposed to be "PANEL* name_pan = etc.".
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Button in a Panel/ lite c
[Re: Uhrwerk]
#234457
11/03/08 00:48
11/03/08 00:48
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
button(0,0, "over.dds", "click.dds", "clickoff.dds",function, NULL, NULL); and don't just put function, you need the name of the function that you're using
...
button(0,0, "over.dds", "click.dds", "clickoff.dds",fnc_thisone, NULL, NULL);
...
}
function fnc_thisone(){
beep();
}
|
|
|
Re: Button in a Panel/ lite c
[Re: darci]
#235190
11/06/08 13:09
11/06/08 13:09
|
Joined: Nov 2007
Posts: 60
darci
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2007
Posts: 60
|
new problem  STRING* a_str = "text one"; TEXT* a_txt = {//------------------------------------ pos_x = 180; pos_y = 223; layer = 4; font = georgia_font; string (a_str); flags = VISIBLE; } PANEL* game_field_pan = {//------------------------------------ pos_x = 509; pos_y =223; layer = 3; bmap = "optionen.bmp"; button (10, 47, "on.bmp", "off.bmp", "over.bmp", NewText, NULL, NULL); flags = /*OVERLAY*/ | VISIBLE; } function NewText() {//------------------------------------ a_str ="text two"; } i want to change with a button an existing text, but that script dont work 
|
|
|
Re: Button in a Panel/ lite c
[Re: darci]
#235320
11/07/08 00:14
11/07/08 00:14
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
try str_cpy(a_str, "text two"); in function NewText()
|
|
|
|