Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   onMouseDownGlobal() {} (https://forums.graalonline.com/forums/showthread.php?t=134258085)

DustyPorViva 02-19-2010 11:15 PM

onMouseDownGlobal() {}
 
The equivalent of onMouseDown(), but works globally(just like leftmousebuttonglobal and the others), in terms of GUI's capturing mouse clicks. For example, if I have a GUIcontrol in use for a HUD, but typically can not be interacted with by the mouse, it will break onMouseDown if the player clicks on the screen over top of that. Sometimes this can be detrimental to mouse controls.

xAndrewx 02-20-2010 12:31 AM

I don't quite understand, but wouldn't this fix it?
HTML Code:

  GraalControl.makeFirstResponder(true);

DustyPorViva 02-20-2010 12:50 AM

Quote:

Originally Posted by xAndrewx (Post 1557303)
I don't quite understand, but wouldn't this fix it?
HTML Code:

  GraalControl.makeFirstResponder(true);

Dunno... it's not enabled by default regardless. Not to mention onMouseDown() is not a GUI function, thus I don't think it'd be affected. Also(never using makefirstresponder myself), wouldn't that effect things negatively if GraalControl is stealing mouse click focus from GUI's that DO need it?

Inverness 02-20-2010 06:52 AM

Quote:

Originally Posted by DustyPorViva (Post 1557311)
Not to mention onMouseDown() is not a GUI function

Uh, yes it is. http://wiki.graal.net/index.php/GuiControl

cbk1994 02-20-2010 06:58 AM

You can also set modal to false in the GUI's profile.

DustyPorViva 02-20-2010 07:00 AM

Quote:

Originally Posted by Inverness (Post 1557376)

I'm talking about the default onMouseDown(), not the inherited one for GUI's.

cbk1994 02-20-2010 07:03 AM

Quote:

Originally Posted by DustyPorViva (Post 1557379)
I'm talking about the default onMouseDown(), not the inherited one for GUI's.

I'm 99% certain onMouseDown() is just short name for the GraalControl.onMouseDown() event.

Inverness 02-20-2010 07:04 AM

Quote:

Originally Posted by DustyPorViva (Post 1557379)
I'm talking about the default onMouseDown(), not the inherited one for GUI's.

OIC, my mistake. :D

Well we have the global booleans for checking if a mouse button down, so we should have the events too.

DustyPorViva 02-20-2010 07:06 AM

Quote:

Originally Posted by cbk1994 (Post 1557380)
I'm 99% certain onMouseDown() is just short name for the GraalControl.onMouseDown() event.

It returns completely different parameters(first is "left", "double", "middle", or "right". Second is key modifier, for like holding ctrl and such... I think.). While GUI.onMouseDown() returns about 4 params, including the position of the click in the gui.

Crow 02-20-2010 11:23 AM

Quote:

Originally Posted by DustyPorViva (Post 1557382)
Second is key modifier, for like holding ctrl and such... I think.

Yup.

Inverness 02-20-2010 12:22 PM

Quote:

Originally Posted by DustyPorViva (Post 1557382)
It returns completely different parameters(first is "left", "double", "middle", or "right". Second is key modifier, for like holding ctrl and such... I think.). While GUI.onMouseDown() returns about 4 params, including the position of the click in the gui.

Indeed, you'll find the mousedown event in the old commands.rtf.


All times are GMT +2. The time now is 02:08 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.