예제 #1
0
    void WidgetComponent::layout(const Window& owner) const
    {
        try
        {
            Rectf pixelArea(d_area.getPixelRect(owner));
            URect window_area(cegui_absdim(pixelArea.left()),
                                cegui_absdim(pixelArea.top()),
                                cegui_absdim(pixelArea.right()),
                                cegui_absdim(pixelArea.bottom()));

            Window* wnd = owner.getChild(d_name);
            wnd->setArea(window_area);
            wnd->notifyScreenAreaChanged();
        }
        catch (UnknownObjectException&)
        {}
    }
    void WidgetComponent::layout(const Window& owner) const
    {
        try
        {
            Rect pixelArea(d_area.getPixelRect(owner));
            URect window_area(cegui_absdim(pixelArea.d_left),
                              cegui_absdim(pixelArea.d_top),
                              cegui_absdim(pixelArea.d_right),
                              cegui_absdim(pixelArea.d_bottom));

            Window* wnd = WindowManager::getSingleton().getWindow(owner.getName() + d_nameSuffix);
            wnd->setArea(window_area);
            wnd->notifyScreenAreaChanged();
        }
        catch (UnknownObjectException&)
        {}
    }