mouse_mode = 4 not working with buttons

Posted By: Reconnoiter

mouse_mode = 4 not working with buttons - 07/19/14 15:11

Hi, sry for spamming the boards again grin

but why does this make buttons not respond anymore to the mouse cursor (functions as well as changing 'over' and 'on' bmaps does not work anymore)?

Code:
video_set(sys_metrics(0),sys_metrics(1),0,1); //first to fullscreen otherwise window size is not changed
video_set(0,0,0,2); 
video_window(0,0,4 | 16 | 32 | 64 | 128,"Game");
mouse_mode = 4;



button code:

Code:
PANEL* windowedmode_pan =
{
layer = 20;
//   size_x = 24; 
//   size_y = 24;	
button = 0,0,interface_cross_on_bmp,interface_cross_bmp,interface_cross_over_bmp,b_toggle_windowedmode,null,null;
digits(-160,0,"Toggle fullscreen mode","Calibri#20",0,0);
flags = SHOW | OUTLINE;
}

Posted By: DLively

Re: mouse_mode = 4 not working with buttons - 07/19/14 15:56

TRy this:
mouse_mode = 2;
while(1){wait(1);vec_set(mouse_pos,mouse_cursor);}
Posted By: Reconnoiter

Re: mouse_mode = 4 not working with buttons - 07/19/14 16:28

tnx for commenting

That still does not work. And mouse_mode = 1; also does not work. I suspect it is cause I use the standard/default cursor, setting a custom cursor with custom mouse.x/mouse.y force movement does work but than the engine cursor and the windows cursor are not at the same position anymore (which I need).

-edit, if I use a custom cursor, and set while(1){wait(1);vec_set(mouse_pos,mouse_cursor);} than the windows cursor and engine cursor are almost the same (probably cause the engine window is not entirely fullscreen). So I probably only need to add a little mouse_force for the engine cursor than it will be perfect.

Thanks DLively!
© 2023 lite-C Forums