Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GUI Issue (https://forums.graalonline.com/forums/showthread.php?t=78667)

The_Kez 02-11-2008 01:32 AM

GUI Issue
 
Just a quick question -

Using the function obj.onSelect on a text list, is there any way to check which mouse button was pressed (left or right)?
i.e Using the default f7 playerlist, right clicking brings up a new text list, left clicking does not.

Thanks for the help. =)

Tigairius 02-11-2008 01:50 AM

Quote:

Originally Posted by The_Kez (Post 1374503)
Just a quick question -

Using the function obj.onSelect on a text list, is there any way to check which mouse button was pressed (left or right)?
i.e Using the default f7 playerlist, right clicking brings up a new text list, left clicking does not.

Thanks for the help. =)

PHP Code:

function obj.onSelect() {
  
GraalControl.showtop();
  
GraalControl.makefirstresponder(true);
  if (
rightmousebutton) {
    
// blah 
  
}


Sorry for not helping you on N-Pulse earlier.

The_Kez 02-11-2008 02:00 AM

No problem. :3
It works for me, thank ya.

zokemon 02-11-2008 03:30 AM

No, that's horrible way to do it.

It's much simpler then that too. Just do this:
PHP Code:

function obj.onSelect() {
  
// Left Click stuff
}
function 
obj.onOpenMenu() {
  
// Right Click stuff


If onSelect is still being called when you right click, just replace that function with:
PHP Code:

function obj.onSelect() {
  if (!
leftmousebuttonglobal) return;
  
// Left Click stuff


Most of that info can be found here.

:)

Tigairius 02-11-2008 03:41 AM

Quote:

Originally Posted by zokemon (Post 1374521)
No, that's horrible way to do it.

It's much simpler then that too. Just do this:
PHP Code:

function obj.onSelect() {
  
// Left Click stuff
}
function 
obj.onOpenMenu() {
  
// Right Click stuff


If onSelect is still being called when you right click, just replace that function with:
PHP Code:

function obj.onSelect() {
  if (!
leftmousebuttonglobal) return;
  
// Left Click stuff


Most of that info can be found here.

:)

Good stuff.

Inverness 02-11-2008 08:01 AM

Why isn't Zero GST yet?

Novo 02-11-2008 08:07 AM

Quote:

Originally Posted by Inverness (Post 1374552)
Why isn't Zero GST yet?

GST has a requirement of being suck-ups. Zero doesn't qualify.

Inverness 02-11-2008 08:44 AM

Quote:

Originally Posted by Novo (Post 1374553)
GST has a requirement of being suck-ups. Zero doesn't qualify.

LOL
I don't think you know Zero well enough then.

zokemon 02-11-2008 11:58 AM

Quote:

Originally Posted by Inverness (Post 1374554)
LOL
I don't think you know Zero well enough then.

Sucking up requires treating those that are not above me at a lower level then I treat those that are above me, which I don't usually do ;).

Dan 02-11-2008 03:40 PM

Quote:

Originally Posted by Novo (Post 1374553)
GST has a requirement of being suck-ups. Zero doesn't qualify.

I love you for that haha.

Inverness 02-11-2008 11:39 PM

Quote:

Originally Posted by zokemon (Post 1374569)
which I don't usually do ;).

When you do it though, it stands out spectacularly, at least with what I'm thinking of.

cbk1994 02-11-2008 11:49 PM

Quote:

Originally Posted by Inverness (Post 1374552)
Why isn't Zero GST yet?

Amen.
Quote:

Originally Posted by Novo (Post 1374553)
GST has a requirement of being suck-ups. Zero doesn't qualify.

Damn you, I just spilled Pepsi on my $2,000 laptop

zokemon 02-11-2008 11:58 PM

Quote:

Originally Posted by Inverness (Post 1374626)
When you do it though, it stands out spectacularly, at least with what I'm thinking of.

Just because I haven't looked at your chat system yet? :frown:
If I sucked up, why am I still being paid minimum wage at Gamestop?

Inverness 02-12-2008 12:25 AM

Quote:

Originally Posted by zokemon (Post 1374636)
Just because I haven't looked at your chat system yet? :frown:

No, this happened months ago.

zokemon 02-12-2008 02:50 AM

Quote:

Originally Posted by Inverness (Post 1374646)
No, this happened months ago.

Ahh, I don't remember.


All times are GMT +2. The time now is 11:25 AM.

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