Harton
Member
|
Link objects from file *.gobj with objects created in the code
I have this code:
Code:
class Menu
{
public:
(...)
private:
(...)
GuiObjs m_gui;
Window *m_window;
Button m_button;
};
Bool G::Menu::Load()
{
if(m_gui.load("GUI/Menu.gobj"))
{
Gui+=m_gui;
m_window = &m_gui.getWindow("Window");
m_window += m_button.create(Rect(0.2,0.2,0.4,0.4));
return true;
}
return false;
}
and I see a window but I don't see the button...Why? What is wrong?
|
|
07-24-2010 11:44 PM |
|
Esenthel
Administrator
|
RE: Link objects from file *.gobj with objects created in the code
you're passing Rect coordinates out of range.
try using negative Y values
|
|
07-25-2010 09:55 AM |
|
Harton
Member
|
RE: Link objects from file *.gobj with objects created in the code
Thanks! My stupid mistake.
|
|
07-25-2010 02:55 PM |
|