Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Gui Keyboard Input (https://forums.graalonline.com/forums/showthread.php?t=134268785)

sssssssssss 10-01-2013 01:49 AM

Gui Keyboard Input
 
So I have a gui control with gui images showing up. Is there something built in (I've looked but didn't notice anything, makefirstresponder, modal, and tabfirst didnt do anything for the control with firstresponder or modal or with the gui images as tabfirst) to make this work, or do I have to do custom work?

Basically, a menu pops up, and I was hoping with either arrow keys or tab you can cycle through the gui images in the control, but it's def not working...

callimuc 10-01-2013 02:30 PM

you can just detect the keys being pressed using onKeyDown(parameters, ...) and then do the changes to your GUI

baseman101 10-01-2013 10:14 PM

You could also probably use GuiCtrl.onAction() if it's a button GUI or something.

callimuc 10-02-2013 03:47 PM

Quote:

Originally Posted by baseman101 (Post 1723008)
You could also probably use GuiCtrl.onAction() if it's a button GUI or something.

I believe that only works when the button is the first responder and when you hit enter

sssssssssss 10-02-2013 06:46 PM

I can't test now but figured I'd ask if GuiCtrl.onKeyDown actually works if it's first responder.

fowlplay4 10-02-2013 10:29 PM

Quote:

Originally Posted by sssssssssss (Post 1723030)
I can't test now but figured I'd ask if GuiCtrl.onKeyDown actually works if it's first responder.

Yes it works.

Read over the GUI Docs on the Wiki, they're actually very helpful:

http://www.graal.net/index.php/Creat...ent/GuiControl

sssssssssss 10-02-2013 10:49 PM

I do use that site quite often, I guess I overlooked that. Thanks.


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

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