About Store Forum Documentation Contact



Post Reply 
Link objects from file *.gobj with objects created in the code
Author Message
Harton Offline
Member

Post: #1
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
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
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
Find all posts by this user Quote this message in a reply
Harton Offline
Member

Post: #3
RE: Link objects from file *.gobj with objects created in the code
Thanks! My stupid mistake.
07-25-2010 02:55 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply