Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-26-2007, 10:55 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Buttons taking the focus

I can't seem to figure out how to make GuiButtonCtrl's not take the focus. Whenever you login or when the script is updated on my main gui the buttons take the focus, forcing you to spam your keyboard with tab and arrow keys to be able to talk again. I've tried everything I could think of. I've set the profiles to have cankeyfocus=false, I've tried makeFirstResponder(), both true and false, and I've tried closequery=true.

Any suggestions?

And, on a rather unrelated note, is there a way to use the players gui style for gui controls?
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #2  
Old 12-26-2007, 11:46 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
Try GraalControl.makefirstresponder(true);
__________________
Reply With Quote
  #3  
Old 12-27-2007, 12:40 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by Inverness View Post
Try GraalControl.makefirstresponder(true);
I did
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #4  
Old 12-27-2007, 12:49 AM
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
PHP Code:
if ( x.isFirstResponder() )
{
  
GraalControl.makeFirstRespondertrue );

Something like this in a timeout? Poor optimization, but may work in a system script where there is already a timeout.
__________________
Reply With Quote
  #5  
Old 12-27-2007, 01:24 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Ah, I did something similar to that and it worked, thanks.

But, yeah, I don't suppose it's possible to read the players current gui style and use it in GUI Controls, is it?
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #6  
Old 12-27-2007, 02:57 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
GuiControlObject.style = $pref::video::defaultguistyle;

If its not done automatically, which it should be unless style == ""
__________________
Reply With Quote
  #7  
Old 12-27-2007, 04: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
The button profiles need to have the following (either with useownprofile = true or having profile = a profile with these):
PHP Code:
profile.tab false;
profile.cankeyfocus false
I actually just modify GuiButtonProfile with those as I believe it to be one of the most annoying features on Graal and should be off by default...
__________________
Do it with a DON!
Reply With Quote
  #8  
Old 12-27-2007, 05:00 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
I found that when the Graal taskbar is hidden, then there are much less problems with gui controls taking focus. Not sure if that is an issue with the client or not.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #9  
Old 01-02-2008, 12:57 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Normally you just set

PHP Code:
useownprofile true;
profile.modal false
The button cannot be clicked then though. You can also set some other attributes:
PHP Code:
profile.focusonshow false;
profile.tab false;
profile.cankeyfocus false
You can also unset the focus when your button receives the focus:
PHP Code:
function onFirstResponderChanges(obj) {
  if (
obj==MyButton && obj.isFirstResponder())
    
GraalControl.makeFirstResponder(true);

Reply With Quote
  #10  
Old 01-02-2008, 03:33 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Stefan View Post
Normally you just set

PHP Code:
useownprofile true;
profile.modal false
The button cannot be clicked then though. You can also set some other attributes:
PHP Code:
profile.focusonshow false;
profile.tab false;
profile.cankeyfocus false
You can also unset the focus when your button receives the focus:
PHP Code:
function onFirstResponderChanges(obj) {
  if (
obj==MyButton && obj.isFirstResponder())
    
GraalControl.makeFirstResponder(true);

Very nice Stefan That Fixed some stuff on my server ! <3
__________________
Reply With Quote
Reply


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 08:58 PM.


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