Game Development Community

GUI, Mouse Cursor and Keyboard questions

by Leslie Young · in Torque X 2D · 10/14/2008 (12:44 pm) · 2 replies

I see that by default there is no mouse cursor visible in Torque X. Is there a way to make the mouse cursor visible on windows platform and also have it effect buttons on my GUI?

I notice that TAB and Shift+TAB will move focus between the buttons I have added on my GUI. How would I go about adding perhaps W, S, Up Key, and the Down Key to perform the same thing?

[edit] I looked at the Torque X FPS sample and is hoping there is a different way of doing up/down menu selection than that, especially since I want to use GUIButton. Maybe there is a way to bind Up to do the same thing as TAB and Down to do what Shift+TAB does?

#1
10/19/2008 (4:52 am)
I've poked around and it doesn't seem like it is possible to do what I want so I ended up creating my own GUI Button and the menu gui just keeps track of which is active and tell 'em when to focus or unfocus depending on the user input. I think this is the best way to go anyways cause now I can do all kinds of things with my custom button like add icons next to the text on the button, or animate a button when it is focused, etc.
#2
10/19/2008 (10:39 am)
This really sounds like the best option. You can also create your own cusor graphic that's themed with your game, too. I think this is a lot better than using the stock Windows cursor.

John K.