Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5362 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Oct 11, 2005, 1:36:08 AM (19 years ago)
Author:
bensch
Message:

oroxnox/trunk: gui extends element2D

Location:
trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/defs/class_id.h

    r5304 r5362  
    4141 * The first two: 1,2 superclass identifiers to
    4242 * The second three are for subclasses with inheritance:
    43  * the first of these numbers is defining the subclassType, it may be anything between 1-a
    44  * The following two may not be the same in any way,
    45  * eg. the bits may not intersect (no 1, 2 and a 3; 1,2 and 4 would be ok)
     43 *  the first of these numbers is defining the subclassType, it may be anything between 1-a
     44 *  The following two may not be the same in any way,
     45 * eg. the bits may not intersect (no 1, 2 and a 3; 01, 02 and 04, 08, 10 would be ok)
    4646 * The last three entries are for any classes in existence eg. SkyBox and so on
    4747 *
     
    8181  CL_WEAPON                     =    0x00120000,
    8282
    83   // subsuper-classes derivations taken : 1, a, b.     << THIS IS A LIST OF ALL THE DCL_MASK_SUBSUPERCLASS_ID's taken
     83  // subsuper-classes derivations taken : 1, 5, a, b.     << THIS IS A LIST OF ALL THE DCL_MASK_SUBSUPERCLASS_ID's taken
    8484
    8585  // lowest level classes
     
    172172  CL_ENVIRONMENT                =    0x00000810,
    173173  CL_SHADER                     =    0x00000811,
    174   // GL-menu
    175   CL_GLMENU_IMAGE_SCREEN        =    0x00000901,
     174  // GL-GUI
     175  CL_GLGUI_WIDGET               =    0x00501901,
     176
     177
     178
     179  CL_GLMENU_IMAGE_SCREEN        =    0x00000902,
    176180
    177181  // sound stuff (range from 0x00000a00 to 0x00000aff)
  • trunk/src/defs/debug.h

    r5357 r5362  
    7676#define DEBUG_MODULE_COLLISON_DETECTION 2
    7777#define DEBUG_MODULE_SPATIAL_SEPARATION 2
     78#define DEBUG_MODULE_GUI                2
    7879
    7980// MISC
  • trunk/src/lib/graphics/text_engine/text.cc

    r5357 r5362  
    5555}
    5656
     57/**
     58 * initializes Text
     59 */
    5760void Text::init()
    5861{
     
    112115
    113116/**
    114  *  Sets a new Text to the font
     117 * Sets a new Text to the font
    115118 * @param text the new text to set
    116119 */
     
    167170
    168171/**
    169  *  creates a texture out of the given parameters
     172 *  creates a texture out of the given parameters !! TEXT_STATIC !! - mode
    170173 *
    171174 * this has to be called every time by the user, to if changes were made.
  • trunk/src/lib/graphics/text_engine/text.h

    r5345 r5362  
    3434 ** Use this type, if you want to create fast changing
    3535 ** text like a counter.
    36  */typedef enum TEXT_RENDER_TYPE
     36 */
     37typedef enum TEXT_RENDER_TYPE
    3738{
    3839  TEXT_RENDER_STATIC      = 1,
     
    4950};
    5051
    51 
    52 ////////////
    53 /// TEXT ///
    54 ////////////
    5552//! Represents one textElement.
    5653class Text : public Element2D
     
    6966    /** @param blending the blending intensity to set (between 0.0 and 1.0) */
    7067    inline void setBlending(float blending) { this->blending = blending; };
    71 
    7268    /** sets the Color of the Text to render (values in [0-1]) @param r red @param g green @param b blue */
    7369    void setColor(float r, float g, float b) { this->color = Vector(r,g,b); };
  • trunk/src/lib/gui/gl_gui/Makefile.am

    r5315 r5362  
    22include $(MAINSRCDIR)/defs/include_paths.am
    33
    4 AM_LDFLAGS = 
     4AM_LDFLAGS =
    55
    6 noinst_LIBRARIES = libORXglgui.a 
     6noinst_LIBRARIES = libORXglgui.a
    77
    88libORXglgui_a_CPPFLAGS = -DBUILD_ORXONOX
    99
    1010
    11 libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc
     11libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \
     12                        glgui_widget.cc
    1213
    13 noinst_HEADERS= glmenu/glmenu_imagescreen.h
     14noinst_HEADERS= glmenu/glmenu_imagescreen.h \
     15                glgui.h \
     16                glgui_widget.h
    1417
    1518
    16 EXTRA_DIST = 
     19EXTRA_DIST =
    1720
  • trunk/src/lib/gui/gl_gui/Makefile.in

    r5351 r5362  
    5454libORXglgui_a_AR = $(AR) $(ARFLAGS)
    5555libORXglgui_a_LIBADD =
    56 am_libORXglgui_a_OBJECTS = libORXglgui_a-glmenu_imagescreen.$(OBJEXT)
     56am_libORXglgui_a_OBJECTS = libORXglgui_a-glmenu_imagescreen.$(OBJEXT) \
     57        libORXglgui_a-glgui_widget.$(OBJEXT)
    5758libORXglgui_a_OBJECTS = $(am_libORXglgui_a_OBJECTS)
    5859DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
    5960depcomp = $(SHELL) $(top_srcdir)/depcomp
    6061am__depfiles_maybe = depfiles
    61 @AMDEP_TRUE@DEP_FILES = \
     62@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libORXglgui_a-glgui_widget.Po \
    6263@AMDEP_TRUE@    ./$(DEPDIR)/libORXglgui_a-glmenu_imagescreen.Po
    6364CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     
    182183MAINSRCDIR = ../../..
    183184AM_LDFLAGS =
    184 noinst_LIBRARIES = libORXglgui.a 
     185noinst_LIBRARIES = libORXglgui.a
    185186libORXglgui_a_CPPFLAGS = -DBUILD_ORXONOX
    186 libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc
    187 noinst_HEADERS = glmenu/glmenu_imagescreen.h
     187libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \
     188                        glgui_widget.cc
     189
     190noinst_HEADERS = glmenu/glmenu_imagescreen.h \
     191                glgui.h \
     192                glgui_widget.h
     193
    188194EXTRA_DIST =
    189195all: all-am
     
    234240        -rm -f *.tab.c
    235241
     242@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_widget.Po@am__quote@
    236243@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glmenu_imagescreen.Po@am__quote@
    237244
     
    267274@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    268275@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glmenu_imagescreen.obj `if test -f 'glmenu/glmenu_imagescreen.cc'; then $(CYGPATH_W) 'glmenu/glmenu_imagescreen.cc'; else $(CYGPATH_W) '$(srcdir)/glmenu/glmenu_imagescreen.cc'; fi`
     276
     277libORXglgui_a-glgui_widget.o: glgui_widget.cc
     278@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libORXglgui_a-glgui_widget.o -MD -MP -MF "$(DEPDIR)/libORXglgui_a-glgui_widget.Tpo" -c -o libORXglgui_a-glgui_widget.o `test -f 'glgui_widget.cc' || echo '$(srcdir)/'`glgui_widget.cc; \
     279@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/libORXglgui_a-glgui_widget.Tpo" "$(DEPDIR)/libORXglgui_a-glgui_widget.Po"; else rm -f "$(DEPDIR)/libORXglgui_a-glgui_widget.Tpo"; exit 1; fi
     280@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='glgui_widget.cc' object='libORXglgui_a-glgui_widget.o' libtool=no @AMDEPBACKSLASH@
     281@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/libORXglgui_a-glgui_widget.Po' tmpdepfile='$(DEPDIR)/libORXglgui_a-glgui_widget.TPo' @AMDEPBACKSLASH@
     282@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     283@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glgui_widget.o `test -f 'glgui_widget.cc' || echo '$(srcdir)/'`glgui_widget.cc
     284
     285libORXglgui_a-glgui_widget.obj: glgui_widget.cc
     286@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libORXglgui_a-glgui_widget.obj -MD -MP -MF "$(DEPDIR)/libORXglgui_a-glgui_widget.Tpo" -c -o libORXglgui_a-glgui_widget.obj `if test -f 'glgui_widget.cc'; then $(CYGPATH_W) 'glgui_widget.cc'; else $(CYGPATH_W) '$(srcdir)/glgui_widget.cc'; fi`; \
     287@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/libORXglgui_a-glgui_widget.Tpo" "$(DEPDIR)/libORXglgui_a-glgui_widget.Po"; else rm -f "$(DEPDIR)/libORXglgui_a-glgui_widget.Tpo"; exit 1; fi
     288@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='glgui_widget.cc' object='libORXglgui_a-glgui_widget.obj' libtool=no @AMDEPBACKSLASH@
     289@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/libORXglgui_a-glgui_widget.Po' tmpdepfile='$(DEPDIR)/libORXglgui_a-glgui_widget.TPo' @AMDEPBACKSLASH@
     290@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     291@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glgui_widget.obj `if test -f 'glgui_widget.cc'; then $(CYGPATH_W) 'glgui_widget.cc'; else $(CYGPATH_W) '$(srcdir)/glgui_widget.cc'; fi`
    269292uninstall-info-am:
    270293
  • trunk/src/lib/gui/gl_gui/glgui_widget.cc

    r5359 r5362  
    1616#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI
    1717
    18 #include "glgui_.h"
     18#include "glgui_widget.h"
    1919
    2020using namespace std;
     
    2323 * standard constructor
    2424*/
    25 GLGui::GLGui ()
     25GLGuiWidget::GLGuiWidget ()
    2626{
    2727  this->init();
     
    3333 * standard deconstructor
    3434*/
    35 GLGui::~GLGui()
     35GLGuiWidget::~GLGuiWidget()
     36{
     37
     38}
     39
     40
     41/**
     42 * initializes the GUI-element
     43 */
     44void GLGuiWidget::init()
     45{
     46  this->setClassID(CL_GLGUI_WIDGET, "GLGuiWidget");
     47
     48}
     49
     50
     51/**
     52 * draws the GLGuiWidget
     53 */
     54void GLGuiWidget::draw()
    3655{
    3756
     
    3958
    4059/**
    41  * initializes the GUI-element
     60 * updates a GLGuiWidget
    4261 */
    43 GLGui::init()
    44 {
    45   this->setClassID(CL_GLGUI_, "GLGui");
    46 
    47 }
    48 
    49 /**
    50  * draws the GLGui
    51  */
    52 void GLGui::draw()
     62void GLGuiWidget::update()
    5363{
    5464
  • trunk/src/lib/gui/gl_gui/glgui_widget.h

    r5359 r5362  
    11/*!
    2  * @file glgui_.h
    3  * The gl_ widget of th openglGUI
    4  *
     2 * @file glgui_widget.h
     3 * The gl_widget of the openglGUI
    54 */
    65
    7 #ifndef _GLGUI__H
    8 #define _GLGUI__H
     6#ifndef _GLGUI_WIDGET_H
     7#define _GLGUI_WIDGET_H
    98
    10 #include "base_object.h"
     9#include "element_2d.h"
    1110
    1211// FORWARD DECLARATION
     
    1413//! This is part of the openglGUI class
    1514/**
    16  *
     15 * A widget is the main class of all the elements of th GUI.
    1716 */
    18 class GLGui : public GLGui {
     17class GLGuiWidget : public Element2D {
    1918
    2019 public:
    21   GLGui();
    22   virtual ~GLGui();
     20  GLGuiWidget();
     21  virtual ~GLGuiWidget();
    2322
    2423  void init();
    2524
    2625  virtual void draw();
     26  virtual void update();
     27
    2728
    2829 private:
     
    3031};
    3132
    32 #endif /* _GLGUI__H */
     33#endif /* _GLGUI_WIDGET_H */
Note: See TracChangeset for help on using the changeset viewer.