About Store Forum Documentation Contact



Post Reply 
GuiList CheckBox and Buttom
Author Message
Avatar Offline
Member

Post: #1
GuiList CheckBox and Buttom
Hi,

i would like to know if it is possible to have Gui list with CheckBoxes and Buttoms.

i have test that but doesnt work :(

Code:
struct MyStruct
{
   CheckBox MyCheckBox;
   Str MyName;
   Button MyButton;
};

Code:
Memc<MyStruct>     PAKLIST;

Code:
ListGroup pak_group[]= // Creation du list_group
{
   ListGroup(MEMBER(MyStruct,MyCheckBox)   ,0.20f, L"CheckBox"    ),
   ListGroup(MEMBER(MyStruct,MyName)        ,0.50, L"Name" ),
   ListGroup(MEMBER(MyStruct,MyButton)            ,0.45f ,L"Button" ),
};

in the init section :

Code:
FREPA(XMLPak.nodes)  
           {
            PakStruct &ptrpak = PAKLIST.New();
            ptrpak.MyCheckBox.set(true);
            ptrpak.MyName         = XMLPak.nodes[i].params(0).value;
            // ptrpak.MyButton        = ?????????????;

           }

Please help.
Avatar
(This post was last modified: 08-16-2011 12:06 AM by Avatar.)
08-16-2011 12:05 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: GuiList CheckBox and Buttom
Region r;
List<> l;
Memx<Button> b;
Memx<CheckBox> c;
r+=l.create(..);
REP(2)r+=b.New().create(..);
REP(2)r+=c.New().create(..);
08-16-2011 10:59 AM
Find all posts by this user Quote this message in a reply
Avatar Offline
Member

Post: #3
RE: GuiList CheckBox and Buttom
What is REP(2) ? a dont understand please.
08-17-2011 02:07 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #4
RE: GuiList CheckBox and Buttom
(08-17-2011 02:07 PM)Avatar Wrote:  What is REP(2) ? a dont understand please.

#define REP( n) for(Int i=(n); --i>= 0 ; ) // repeat : n-1 .. 0

It's a cycle that will add 2 times (1 .. 0) to the region buttons and checkboxes
08-17-2011 02:23 PM
Find all posts by this user Quote this message in a reply
Sadahar Offline
Member

Post: #5
RE: GuiList CheckBox and Buttom
This is quite a tricky process and it's been hard to me to find this post... a tutorial about this would be nice smile
10-27-2011 02:44 PM
Find all posts by this user Quote this message in a reply
Post Reply