Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-11-2008, 01:32 AM
The_Kez The_Kez is offline
N-Pulse Asst. Manager
The_Kez's Avatar
Join Date: Dec 2007
Posts: 106
The_Kez is on a distinguished road
Send a message via MSN to The_Kez
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. =)
Reply With Quote
  #2  
Old 02-11-2008, 01:50 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by The_Kez View Post
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.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 02-11-2008, 02:00 AM
The_Kez The_Kez is offline
N-Pulse Asst. Manager
The_Kez's Avatar
Join Date: Dec 2007
Posts: 106
The_Kez is on a distinguished road
Send a message via MSN to The_Kez
No problem. :3
It works for me, thank ya.
Reply With Quote
  #4  
Old 02-11-2008, 03:30 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
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.

__________________
Do it with a DON!
Reply With Quote
  #5  
Old 02-11-2008, 03:41 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by zokemon View Post
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.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #6  
Old 02-11-2008, 08:01 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Why isn't Zero GST yet?
__________________
Reply With Quote
  #7  
Old 02-11-2008, 08:07 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Quote:
Originally Posted by Inverness View Post
Why isn't Zero GST yet?
GST has a requirement of being suck-ups. Zero doesn't qualify.
Reply With Quote
  #8  
Old 02-11-2008, 08:44 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Novo View Post
GST has a requirement of being suck-ups. Zero doesn't qualify.
LOL
I don't think you know Zero well enough then.
__________________
Reply With Quote
  #9  
Old 02-11-2008, 11:58 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Inverness View Post
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 .
__________________
Do it with a DON!
Reply With Quote
  #10  
Old 02-11-2008, 03:40 PM
Dan Dan is offline
Daniel
Join Date: Oct 2007
Posts: 383
Dan is an unknown quantity at this point
Send a message via MSN to Dan
Quote:
Originally Posted by Novo View Post
GST has a requirement of being suck-ups. Zero doesn't qualify.
I love you for that haha.
__________________

Last edited by Dan; 02-11-2008 at 03:56 PM..
Reply With Quote
  #11  
Old 02-11-2008, 11:39 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by zokemon View Post
which I don't usually do .
When you do it though, it stands out spectacularly, at least with what I'm thinking of.
__________________
Reply With Quote
  #12  
Old 02-11-2008, 11:49 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Inverness View Post
Why isn't Zero GST yet?
Amen.
Quote:
Originally Posted by Novo View Post
GST has a requirement of being suck-ups. Zero doesn't qualify.
Damn you, I just spilled Pepsi on my $2,000 laptop
__________________
Reply With Quote
  #13  
Old 02-11-2008, 11:58 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Inverness View Post
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?
If I sucked up, why am I still being paid minimum wage at Gamestop?
__________________
Do it with a DON!
Reply With Quote
  #14  
Old 02-12-2008, 12:25 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by zokemon View Post
Just because I haven't looked at your chat system yet?
No, this happened months ago.
__________________
Reply With Quote
  #15  
Old 02-12-2008, 02:50 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Inverness View Post
No, this happened months ago.
Ahh, I don't remember.
__________________
Do it with a DON!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:44 PM.


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