Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5420 in orxonox.OLD for trunk/src/lib/gui


Ignore:
Timestamp:
Oct 22, 2005, 1:57:29 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Font is now Right, and the Rendering 'should be' faster.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc

    r5418 r5420  
    1919
    2020#include "text.h"
     21#include "material.h"
    2122
    2223using namespace std;
     
    4546{
    4647  this->setClassID(CL_GLGUI_PUSHBUTTON, "GLGuiPushButton");
     48//  this->label->setRelCoor2D(10, 10);
    4749
     50  this->backMat = new Material();
     51  this->backMat->setDiffuse(0, 0, 0);
     52
     53  this->setSize2D(label->getSizeX2D()+10, label->getSizeY2D()+10);
    4854}
    4955
     
    5359void GLGuiPushButton::draw() const
    5460{
    55   this->label->draw();
     61  this->backMat->select();
     62  glPushMatrix();
     63  glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
     64  glBegin(GL_QUADS);
     65
     66  glVertex2d(0,0);
     67  glVertex2d(0, this->getSizeY2D());
     68  glVertex2d(this->getSizeX2D(), this->getSizeY2D());
     69  glVertex2d(this->getSizeX2D(),0);
     70
     71  glEnd();
     72  glPopMatrix();
     73
     74//   this->label->draw();
    5675//  printf("test");
    5776}
Note: See TracChangeset for help on using the changeset viewer.