Simple Clickable buttons

27 views
Skip to first unread message

EdwardP

unread,
Sep 7, 2012, 12:10:32 PM9/7/12
to G3D Users
I'd like to add some simple buttons to trigger a game state change
("New Game", "Options" - that sort of thing) and I am considering the
best way to implement these? A WidgetManager and a Widget for each
button looks very promising but unfortunately I have gone down an
input management route that is independent of OSWindow events - I've
used OIS to get joystick support (because I thought this might be
going from G3D at some point). This works very well, with objects just
checking current and cached states of the input devices directly as
part of the game loop. However do you think I have, as a result,
really blown it with widgets or would there be a way to still leverage
some functionality from them?

I need to be able to change button selection-highlights with things
other than the mouse (an XBox360 gamepad and/or keyboard,
specifically) but also know if a mouse click has hit a particular
button so that I can deal with a variety of possible input devices
with the one UI.

Any suggestions or advice gratefully received, as always.

E

Corey Taylor

unread,
Sep 14, 2012, 8:02:04 PM9/14/12
to g3d-...@googlegroups.com
I didn't have time to reply before and am not going to go into detail, but if you really want to use the G3D GUI, you can render it yourself and perform state changes based on other input events.

Take a look at the list of functions in GuiTheme.

corey
Reply all
Reply to author
Forward
0 new messages