Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
mouse_mode = 4 not working with buttons #443545
07/19/14 15:11
07/19/14 15:11
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
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;
}


Re: mouse_mode = 4 not working with buttons [Re: Reconnoiter] #443547
07/19/14 15:56
07/19/14 15:56
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
TRy this:
mouse_mode = 2;
while(1){wait(1);vec_set(mouse_pos,mouse_cursor);}


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: mouse_mode = 4 not working with buttons [Re: DLively] #443548
07/19/14 16:28
07/19/14 16:28
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
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!

Last edited by Reconnoiter; 07/19/14 19:39.

Gamestudio download | chip programmers | 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