Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7917 in orxonox.OLD for branches/gui


Ignore:
Timestamp:
May 28, 2006, 2:29:53 PM (18 years ago)
Author:
bensch
Message:

gui: added definitions

Location:
branches/gui/src
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl_gui/Makefile.am

    r7914 r7917  
    3333                signal_connector.h \
    3434                glgui.h \
     35                glgui_defs.h \
    3536                glgui_handler.h \
    3637                glgui_mainwidget.h \
  • branches/gui/src/lib/gui/gl_gui/glgui.h

    r7901 r7917  
    2121#include "glgui_textfield.h"
    2222
    23 namespace OrxGui
    24 {
    25 
    26 
    27 };
    28 
    29 
    30 
    31 
    3223
    3324#endif /* _GLGUI_H */
  • branches/gui/src/lib/gui/gl_gui/glgui_bar.cc

    r7779 r7917  
    4646    this->setClassID(CL_GLGUI_BAR, "GLGuiBar");
    4747
    48     this->frontMat.setDiffuse(1,1,1);
     48    this->frontMaterial().setDiffuse(1,1,1);
    4949
    5050    this->setSize2D(50, 10);
     
    6464    GLGuiWidget::draw();
    6565
    66     this->frontMat.select();
     66    this->frontMaterial().select();
    6767    glBegin(GL_QUADS);
    6868
  • branches/gui/src/lib/gui/gl_gui/glgui_defs.h

    r7916 r7917  
    11/*!
    2  * @file glgui.h
    3  * includes all the Files the GLGui knows.
     2 * @file glgui_defs.h
     3 * Definitions for the GLGui.
    44 */
    55
    6 #ifndef _GLGUI_H
    7 #define _GLGUI_H
     6#ifndef _GLGUI_DEFS_H
     7#define _GLGUI_DEFS_H
    88
    9 #include "glgui_handler.h"
    10 
    11 #include "glgui_widget.h"
    12 
    13 #include "glgui_bar.h"
    14 #include "glgui_box.h"
    15 #include "glgui_button.h"
    16 #include "glgui_checkbutton.h"
    17 //#include "glgui_colorselector.h"
    18 #include "glgui_pushbutton.h"
    19 #include "glgui_cursor.h"
    20 #include "glgui_inputline.h"
    21 #include "glgui_textfield.h"
    22 
     9/// TODO MOVE TO ORXGUI_TYPES
    2310namespace OrxGui
    2411{
    25 
    26 
     12  //! An enumeration for the Orientation of an Element.
     13  typedef enum {
     14    Horizontal,    //!< Horizontal Orientation.
     15    Vertical       //!< Vertical Orientation.
     16  } Orientation;
    2717};
    2818
    2919
    30 
    31 
    32 
    33 #endif /* _GLGUI_H */
     20#endif /* _GLGUI_DEFS_H */
  • branches/gui/src/lib/gui/gl_gui/glgui_slider.h

    r7914 r7917  
    99
    1010#include "glgui_widget.h"
    11 
     11#include "glgui_defs.h"
    1212
    1313namespace OrxGui
     
    3131
    3232  private:
     33    Orientation      orientation;
     34
     35    float            _maxValue;
     36    float            _minValue;
     37
     38    float            _value;
    3339
    3440  };
  • branches/gui/src/lib/gui/gl_gui/glgui_widget.cc

    r7903 r7917  
    6565    this->backMat.setDiffuse(1.0, 1.0, 1.0);
    6666    this->frontMat.setDiffuse(1.0, 0.0, 0.0);
    67 
    68     this->frontModel = 0;
    69     this->backModel = 0;
    70 
    7167
    7268    this->widgetSignals.resize(SignalCount, SignalConnector());
  • branches/gui/src/lib/gui/gl_gui/glgui_widget.h

    r7899 r7917  
    88
    99#include "element_2d.h"
    10 #include "event.h"
     10#include "rect2D.h"
     11
    1112#include "material.h"
    1213
     14#include "event.h"
     15#include "signal_connector.h"
     16
    1317#include "glincl.h"
    14 #include "signal_connector.h"
     18
    1519#include <vector>
    1620
     
    117121
    118122
    119   protected:
     123  private:
     124    /// LOOKS
    120125    Material                       backMat;
    121     GLuint                         backModel;
     126    Rect2D                         backRect;
    122127
    123128    Material                       frontMat;
    124     GLuint                         frontModel;
     129    Rect2D                         frontRect;
    125130
    126   private:
     131
     132    /// SIGNALS
    127133    std::vector<SignalConnector>   widgetSignals;
    128134
     135    /// EVENTS
    129136    bool                           _focusable;        //!< If this widget can receive focus.
    130137    bool                           _clickable;        //!< if this widget can be clicked upon.
  • branches/gui/src/lib/math/rect2D.h

    r7915 r7917  
    2424#define __RECT2D_H_
    2525
    26 #include <cmath>
    2726#include "vector2D.h"
    2827
     
    3433{
    3534public:
     35  Rect2D() { };
    3636  Rect2D(float x, float y, float width, float height);
    3737  Rect2D(const Vector2D& topLeft, const Vector2D& bottomRight );
  • branches/gui/src/lib/math/vector2D.h

    r7914 r7917  
    2424#define __VECTOR2D_H_
    2525
    26 #include <math.h>
     26#include <cmath>
    2727#include "compiler.h"
    2828
  • branches/gui/src/story_entities/simple_game_menu.cc

    r7913 r7917  
    6666  /// GUI
    6767  ///(this is as modular as it is possible).
    68   /*
    6968  OrxGui::GLGuiPushButton* pb = new OrxGui::GLGuiPushButton("PUSH ME");
    7069  pb->show();
     
    8786  OrxGui::GLGuiHandler::getInstance()->activateCursor();
    8887  OrxGui::GLGuiHandler::getInstance()->activate();
    89   */
    9088  /////
    9189
     
    109107  if( this->dataTank)
    110108    delete this->dataTank;
    111   //delete OrxGui::GLGuiHandler::getInstance( );
     109  delete OrxGui::GLGuiHandler::getInstance( );
    112110}
    113111
Note: See TracChangeset for help on using the changeset viewer.