About Store Forum Documentation Contact



Post Reply 
EE::GuiObjs::create
Author Message
Mardok Offline
Member

Post: #1
EE::GuiObjs::create
Code:
GuiObjs& create(C Memx< ObjName< Button   > > &button  , // create from objects
                   C Memx< ObjName< CheckBox > > &checkbox,
                   C Memx< ObjName< ComboBox > > &combobox,
                   C Memx< ObjName< CMenu    > > &cmenu   ,
                   ...);

It's too hard for me... can someone tell me how create (for example) Button in my specific GuiObjs by code. I know i can using GuiEditor and load *.gobj but how do this by code.


EE::GuiObjs myGuiObjs.create( ... i want button )

I want button inside myGuiObjs.

Someone help me?

Sample code plz xD
07-12-2013 01:20 AM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #2
RE: EE::GuiObjs::create
Here's a bit of code from a tutorial:
button_b.create(Rect_C( 0.3, 0, 0.45, 0.08), "Button Stay");

I recommand you check out the tutorials, this kind of thing is "explained" there by examples for everything. You may notice the button object has to be declared, then the create function knows a button will be created with that create function (in this case, giving position and name); Then, the object button is added to your Gui by:
Gui+=button_b; Have you studied OOP? If you did it should be fairly easy to understand.
07-12-2013 07:17 AM
Find all posts by this user Quote this message in a reply
Mardok Offline
Member

Post: #3
RE: EE::GuiObjs::create
I asked about EE:GuiObjs::create

Read my post slowly one more time.

I dont want add button to Gui but to GuiObjs

EE::GuiObjs not support "+=" operator... there is a create function...
07-12-2013 11:02 AM
Find all posts by this user Quote this message in a reply
TBJokers Offline
Member

Post: #4
RE: EE::GuiObjs::create
If it's pointer based you should be using MyGuiObjs =& MyButton.create(Rect_RU(x,x,x,x),"XXX");

Else you are using MyGuiObjs += MyButton.create(Rect_RU(x,x,x,x),"XXX");
07-12-2013 12:06 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: EE::GuiObjs::create
Hi,

As you've typed the correct function, you can see that it expects a bunch of Memx containers (list of different gui objects)

Code:
GuiObjs& create(C Memx< ObjName< Button   > > &button  , // create from objects
                    C Memx< ObjName< CheckBox > > &checkbox,
                    C Memx< ObjName< ComboBox > > &combobox,
                    C Memx< ObjName< CMenu    > > &cmenu   ,
                    ...);
Simply define a list of all required containers:
Code:
Memx< ObjName< Button   > > buttons;
Memx< ObjName< CheckBox> > checkboxes;
..
and then pass all of them into the create function
create(buttons, checkboxes, ..);

also as you want to create a button you can do first (before calling the above 'create')
buttons.New().create(..);
07-16-2013 12:50 PM
Find all posts by this user Quote this message in a reply
Mardok Offline
Member

Post: #6
RE: EE::GuiObjs::create
Huh, it's simply... omg

thx Esenthel for correct answer

CLOSED
07-20-2013 08:19 AM
Find all posts by this user Quote this message in a reply
Post Reply