Some questions related to a custom UI I'm developing

Started by Uhfgood, Sat 26/05/2012 08:54:04

Previous topic - Next topic

Uhfgood

I'm actually building a radial (pie) menu for my game.  This doesn't use the typical buttons.  It requires a dead zone (ie a place in the center where it doesn't activate).  The angle of the mouse relative to the center of the clicking area (where the dead zone is), and the length of the "drag".  A drag is defined as hold down the mouse button and moving the mouse to another location.  The various buttons are at different angles and distances from the center.  To give you an idea here are two mockups.





The "buttons" won't really rely on an absolute position and this is designed to be one-button useful (makes it good for some touch screens in the near future should I port my game to some tablets or something).

So this is what I'm asking.  Do I actually develop an AGS GUI for these, or can I just put an image on screen with script?  And what is the best method to put an image on screen?  Also are there any performance issues to doing something like this verses a standard gui display?  Is it also possible to draw a line on the screen from my mouse to wherever I drag it?  And can this line drawing function be used in production games (that is, is it something other than a debug feature)?

If you need more clarity please let me know and I'll try to make myself a little clearer.

Khris

I'd go the GUI route, yes.
What you do is make the GUI big enough so the outer circle can fit, start with the inner circle, then change the background graphic of the GUI depending on the mouse position while the button is pressed.
The line can be displayed using a button, or you could draw it to a dynamic sprite which was created as a copy of the current GUI background sprite, then set the result as the GUI's background.
There shouldn't be any performance issues at all with this approach, no.

SMF spam blocked by CleanTalk