Radio Button grouping

BronzeBeard

06-06-2010 01:35:10

Hello all!

I was wondering if QuickGUI's radio buttons have any sort of grouping, indexing, or IDing options? I didn't see anything in the api, nor searching the forums turned anything up for me.

What I mean by that, I have a window, which in turn has a number of radio buttons. These radio buttons are for 3 different things. However only one radio button in the window can be selected. With some sort of grouping, I'd be able to have 3 different radio button groups, allowing me to select 3 different buttons.

Hopefully this will get some attention in kungfoo's latest rewrite :wink:

kungfoomasta

07-06-2010 17:55:46

Hi BronzeBeard. (Is that a wc3 name? :mrgreen: )

That is very odd you can only select one. (did you mean they all act as 1 group?) Currently the Radio Buttons should be grouped according to their container. So if you wanted 3 different sets, you'd have to put them into 3 different Panels inside the window. This was the easiest way I thought to achieve grouping, the alternative would be to require the user assign them to some group ID, and all radio buttons assigned to the same group ID would represent one set of choices. This sounds more flexible, but not sure if its needed in practice. (ie, would Container grouping be good enough?)

BronzeBeard

10-06-2010 04:34:33

Hi BronzeBeard. (Is that a wc3 name? :mrgreen: )
Very observant :lol: Actually a bunch of co-workers named me this during a bowling game, being at the time I had a long bronze beard... (and suck at bowling)


That is very odd you can only select one. (did you mean they all act as 1 group?) Currently the Radio Buttons should be grouped according to their container. So if you wanted 3 different sets, you'd have to put them into 3 different Panels inside the window. This was the easiest way I thought to achieve grouping, the alternative would be to require the user assign them to some group ID, and all radio buttons assigned to the same group ID would represent one set of choices. This sounds more flexible, but not sure if its needed in practice. (ie, would Container grouping be good enough?)


At first I had them all in the same container. I did end up putting them in transparent panels before your post. It works fine :)

I just found it a little strange. The other 2 Gui's I've touched in my life (GTK and VB) use a grouping index number. There is no need for extra containers, and it makes switch checking easier.

Is it necessary? Not really, I wouldn't waste my time on it if I were you. I was just a little surprised and was pondering in public :)


Thanks for your time Kungfu! :D

gameengineer

03-12-2010 22:36:44

I guess I'm a little slow but I still haven't gotten radio buttons working. Using the LayoutEditor I first just created two radioboxes and set one of them to be default pressed. When running the Test inside LayoutEditor I can click each one and the highlighting works but the unpressed one does not become pressed.

I then tried creating a Window and creating them inside the window. The were truly children of the Window but the same result happened, no changing of pressed condition with either button.

I've just started using MyGUI this week so I'm sure I'm doing something wrong.

Oh, here's a little feedback regarding your demo code. Its produces nice demos but the code is overly complicated. I'm sure it made the developer's life simple by creating complicated base classes for multiple demos but its hell on new comers trying to figure out how to do the simplest things with your API. I'm not new to C++ and thank God for that or I would have had to give up. You need very short and very basic "here's how you create buttons and add handlers" for each widget. Yes I know about the Quickstart and it is helpful but you need to show how to "wire up" all widgets.

EDIT: Well I still don't have grouping working but I have a work around which manually turns one button off and the other on (assuming two radio buttons) depending on which one was clicked. Basically doing grouping manually.

Argh! I posted in the wrong forum! Sorry this was meant for MyGUI not QuickGUI. Just noticed this!

Steve

BronzeBeard

04-12-2010 01:03:26



Argh! I posted in the wrong forum! Sorry this was meant for MyGUI not QuickGUI. Just noticed this!

Steve



And I was just about to post my code for it, when I read this line...

:lol:

gameengineer

08-12-2010 15:23:42


And I was just about to post my code for it, when I read this line...
:lol:

:oops: :)

Well since I'm here and new to MyGUI anyway, has anyone here tried MyGUI? How does it fair with this gui library?

Importance to me: lots of documentation and lots of tutorials and sample code. I can read headers like the best of them but learning someone else's code that way is only as good as how well the developer comments. I've been doing this too long to know "good commenting" and "programmer" is almost a contradiction. :wink:

Steve

BronzeBeard

08-12-2010 16:03:40

I think it best to wait for kungfu to finish his "re-write" before jumping into qgui.

I'm using a much older (modified) version of qgui so i can't comment on how it compares to mygui.... I will say however that it beats the socks off CEGUI. ;)

Calder

08-12-2010 16:55:22

I tried MyGUI for a while, and really disliked it. It's fine for basic things, and the editor is quite nice, but when you get into more advanced features like animation, it's extremely unintuitive and lacking any documentation. More to your point, however, the whole thing has virtually no documentation. KFM has written a few tutorials on setting up the new QuickGUI, but it's also lacking in the documentation area. The difference (at least for me) is that QuickGUI's API, structure and comments are far more "grokkable" so you can actually figure out what's going on.

gameengineer

09-12-2010 16:10:24

At this point I've invested a few days in MyGUI and will stick with it for my current project. I'll at least have one data point to use for comparison if/when changing to another gui. Yes I agree CEGUI is too slow and too... not what I need, at this point.

Thanks for the advice on waiting for the re-write for QuickGUI.

Steve