Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9558 in orxonox.OLD


Ignore:
Timestamp:
Jul 28, 2006, 12:18:58 PM (18 years ago)
Author:
bensch
Message:

resizing should work, but strangely it does not

Location:
branches/proxy/src/lib/gui/gl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/gui/gl/glgui_fixedposition_box.cc

    r9556 r9558  
    4848    {
    4949      case OrxGui::Center:
    50         this->setAbsCoor2D(GLGuiHandler::getInstance()->resolution()/2.0 - this->getSize2D() / 2.0);
     50        printf("_----------------------- ");
     51        GLGuiHandler::getInstance()->resolution().debug();
     52        this->setAbsCoor2D((GLGuiHandler::getInstance()->resolution() - this->getSize2D()) / 2.0);
    5153        break;
    5254      default:
     
    5456
    5557    }
    56     // resize everything.
    57     //for (widget = this->children.begin(); widget != this->children.end(); ++widget)
    58     //{}
    5958  }
    6059
  • branches/proxy/src/lib/gui/gl/glgui_handler.cc

    r9554 r9558  
    8787      this->_cursor = NULL;
    8888    }
     89  }
     90
     91  const Vector2D& GLGuiHandler::resolution()
     92  {
     93    if (this->_resolution == Vector2D::nullVector())
     94      this->_resolution = Vector2D(GraphicsEngine::getInstance()->getResolutionX(), GraphicsEngine::getInstance()->getResolutionY());
     95    return _resolution;
    8996  }
    9097
  • branches/proxy/src/lib/gui/gl/glgui_handler.h

    r9546 r9558  
    3434    Vector2D cursorPositionRel(const GLGuiWidget* const widget) const;
    3535
    36     const Vector2D& resolution() const { return this->_resolution; };
     36    const Vector2D& resolution();
    3737
    3838    void selectNext();
Note: See TracChangeset for help on using the changeset viewer.