Stupid SED? (small code)

Posted By: aztec

Stupid SED? (small code) - 03/25/09 18:21

can't fint any mistakes in the following code but somehow it doesnt change the panel when the mouse touches the button and it won't make any sounds (beep();) only if I press the button p off course.
Does anyone know whats wrong?
Code:
function overbeep
{
	beep();
}

on_p = overbeep;

panel playerpan
{
	pos_x = 0;
	pos_y = 0;
	bmap = hintergrund;
	flags = visible,refresh,overlay;
	layer = 1;
	button = -15,-8,mainbtn,mainbtn,mainbtn,null,null,null;
	button = -15,-8,startbtn,startbtn,startover,overbeep,null,overbeep;
	button = -15,-50,stopbtn,stopbtn,stopover,overbeep,null,overbeep;
}

function main
{
	wait(1);
	video_window(NULL,NULL,16,"AztecMP3-Player V: 1.0");
	video_set(420,120,0,0);
	mouse_mode = 2;
	mouse_map = cursor;
		 while(1)
  {
    MOUSE_POS.X = mouse_cursor.x;
    MOUSE_POS.Y = mouse_cursor.y;
    wait(1);
  }
} 

best regards

Aztec
Posted By: Meerkat

Re: Stupid SED? (small code) - 03/25/09 18:39

Ich bin mir nicht sicher. Aber ich glaub du musst die Abfrage des

Code:
on_p = overbeep;


in die Main function schreiben. So funktionierts bei mir. ^^
Posted By: aztec

Re: Stupid SED? (small code) - 03/25/09 19:28

also haupsächlich geht es darum, dass die Buttons nicht korekt angezeigt werden. wenn ich über sie herüber fahre welchseln sie nicht zum "bmapover" panel trotzde versuch ich deinen Tipp mal
Posted By: flits

Re: Stupid SED? (small code) - 03/25/09 20:04

maby this is your rpoblem

Buttons outside the panel area won't react on the mouse. The panel area is defined either by the size of the panel background bitmap, or by the size_x/y parameters. If the panel only consists of a single button and has no background bitmap, always place it at the 0,0 position
Posted By: Rasch

Re: Stupid SED? (small code) - 03/25/09 23:25

Probiers mal damit!

Code:
function overbeep
{
	beep();
}

on_p = overbeep;

panel playerpan
{
	pos_x = 0;
	pos_y = 0;
	bmap = hintergrund;
	flags = visible,refresh,overlay;
	layer = 1;
	button = 15,8,mainbtn,mainbtn,mainbtn2,null,null,null;
	button = 15,8,startbtn,startbtn,startover,null,null,overbeep;
	button = 15,50,stopbtn,stopbtn,stopover,null,null,overbeep;
}

function main
{
	wait(1);
	video_window(NULL,NULL,16,"AztecMP3-Player V: 1.0");
	video_set(420,120,0,0);
	mouse_mode = 2;
	mouse_map = cursor;
		 while(1)
  {
    MOUSE_POS.X = mouse_cursor.x;
    MOUSE_POS.Y = mouse_cursor.y;
    wait(1);
  }
} 

Posted By: aztec

Re: Stupid SED? (small code) - 03/26/09 12:32

Ach ich habs verstanden.
Leide tut sich trotzdem nichts auch wenn sie sich nicht in einem positiven x und y Wert befinden, aber ich glaub ich weis warum es nicht reagiert werd es einfach mal versuchen was mir grad eingefallen ist

EDIT: Okay es ist gelößt die Button haben sich gegenseitig behindert und das habe ich nicht berücksichtigt ^^ sorry für den Aufstand den ich gemacht habe
© 2024 lite-C Forums