Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc @ 6295

Last change on this file since 6295 was 6295, checked in by bensch, 18 years ago

orxonox/trunk: new GUI-functionality

File size: 1.4 KB
RevLine 
[4744]1/*
[1853]2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
[1855]10
11   ### File Specific:
[5360]12   main-programmer: Benjamin Grauer
[1855]13   co-programmer: ...
[1853]14*/
15
[5360]16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI
[1853]17
[5364]18#include "glgui_pushbutton.h"
[1853]19
[5395]20#include "text.h"
[5420]21#include "material.h"
[5395]22
[1856]23using namespace std;
[1853]24
[3245]25/**
[4838]26 * standard constructor
[3245]27*/
[5364]28GLGuiPushButton::GLGuiPushButton ()
[3365]29{
[5360]30  this->init();
[3365]31}
[1853]32
33
[3245]34/**
[4838]35 * standard deconstructor
[3245]36*/
[5364]37GLGuiPushButton::~GLGuiPushButton()
[3543]38{
[5360]39
[3543]40}
[5360]41
42/**
43 * initializes the GUI-element
44 */
[5364]45void GLGuiPushButton::init()
[5360]46{
[5364]47  this->setClassID(CL_GLGUI_PUSHBUTTON, "GLGuiPushButton");
[6295]48  this->frontMat.setDiffuse(1,0,0);
[5420]49//  this->label->setRelCoor2D(10, 10);
[5360]50}
51
52/**
[5364]53 * draws the GLGuiPushButton
[5360]54 */
[5395]55void GLGuiPushButton::draw() const
[5360]56{
[6287]57  this->startDraw();
58
[6295]59//  GLGuiButton::draw();
[6287]60
[6295]61  this->frontMat.select();
[5420]62  glBegin(GL_QUADS);
63
64  glVertex2d(0,0);
65  glVertex2d(0, this->getSizeY2D());
66  glVertex2d(this->getSizeX2D(), this->getSizeY2D());
67  glVertex2d(this->getSizeX2D(),0);
68
69  glEnd();
70
[6287]71  this->endDraw();
[5420]72//   this->label->draw();
[5418]73//  printf("test");
[5360]74}
[5395]75
76/**
77 * updates the GLGuiPushButton
78 */
79void GLGuiPushButton::update()
80{
81
[5421]82
[5395]83}
Note: See TracBrowser for help on using the repository browser.