Changeset 8141 in orxonox.OLD for branches/gui/src
- Timestamp:
- Jun 4, 2006, 1:19:07 AM (19 years ago)
- Location:
- branches/gui/src/lib
- Files:
-
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/Makefile.am
r8035 r8141 11 11 libORXglgui_a_SOURCES = \ 12 12 glmenu/glmenu_imagescreen.cc \ 13 \ 14 glgui_style.cc \ 13 15 glgui_handler.cc \ 14 16 signal_connector.cc \ … … 32 34 noinst_HEADERS= \ 33 35 glmenu/glmenu_imagescreen.h \ 36 \ 37 glgui_style.h \ 34 38 signal_connector.h \ 35 39 glgui.h \ -
branches/gui/src/lib/gui/gl/glgui_style.cc
r8140 r8141 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include " proto_class.h"18 #include "glgui_style.h" 19 19 20 using namespace std; 20 namespace OrxGui 21 { 21 22 22 23 23 /** 24 * standard constructor 25 * @todo this constructor is not jet implemented - do it 26 */ 27 ProtoClass::ProtoClass () 28 { 29 this->setClassID(CL_PROTO_ID, "ProtoClass"); 30 31 /* If you make a new class, what is most probably the case when you write this file 32 don't forget to: 33 1. Add the new file new_class.cc to the ./src/Makefile.am 34 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS 35 36 Advanced Topics: 37 - if you want to let your object be managed via the ObjectManager make sure to read 38 the object_manager.h header comments. You will use this most certanly only if you 39 make many objects of your class, like a weapon bullet. 40 */ 41 } 24 /** 25 * @brief standard constructor 26 */ 27 GLGuiStyle::GLGuiStyle () 28 { 29 } 42 30 43 31 44 /** 45 * standard deconstructor 46 */ 47 ProtoClass::~ProtoClass () 48 { 49 // delete what has to be deleted here 32 /** 33 * @brief standard deconstructor 34 */ 35 GLGuiStyle::~GLGuiStyle () 36 { 37 // delete what has to be deleted here 38 } 50 39 } -
branches/gui/src/lib/gui/gl/glgui_style.h
r8140 r8141 1 1 /*! 2 * @file proto_class.h2 * @file glgui_style.h 3 3 * @brief Definition of ... 4 4 */ 5 5 6 #ifndef _PROTO_CLASS_H 7 #define _PROTO_CLASS_H 8 9 #include "base_object.h" 6 #ifndef _GLGUI_STYLE_H 7 #define _GLGUI_STYLE_H 10 8 11 9 // FORWARD DECLARATION 12 10 11 #include "font.h" 12 #include "texture.h" 13 #include "color.h" 14 15 namespace OrxGui 16 { 17 18 //! A class for Defining Styles to the opengl-gui. 19 class GLGuiStyle 20 { 21 //! An enumerator that defines the different states Widgets may be in. 22 typedef enum { 23 Normal, //!< Normal state of the GUI's Widgets. 24 Active, //!< If the widget is Active. 25 Selected, //!< If the Widget is Selected. 26 Insensitive //!< If the Widget is insensitive. 27 } State; 28 29 public: 30 GLGuiStyle(); 31 virtual ~GLGuiStyle(); 13 32 14 33 15 //! A class for ... 16 class ProtoClass : public BaseObject { 34 private: 17 35 18 public: 19 ProtoClass(); 20 virtual ~ProtoClass(); 36 float _borderLeft; 37 float _borderRight; 38 float _borderTop; 39 float _borderBottom; 21 40 41 Font* _font; 42 float _textSize; 43 float _textColor; 22 44 23 private: 45 float _backgroundColor; 46 Texture _backgorundTexture; 24 47 25 }; 48 float _foregroundColor; 49 Texture _foregorundTexture; 26 50 27 #endif /* _PROTO_CLASS_H */ 51 bool _animated; 52 bool _animatedStateChanges; 53 }; 54 } 55 #endif /* _GLGUI_STYLE_H */ -
branches/gui/src/lib/util/color.h
r7195 r8141 16 16 { 17 17 public: 18 Color(float r, float g, float b, float a) :_r(r), _g(g), _b(b), _a(a) {}; 19 Color(const Color& c) { _r = c._r; _g = c._g; _b = c._b; _a = c._a; }; 20 21 float r() const { return _r; } 22 float& r() { return _r; } 23 float g() const { return _g; } 24 float& g() { return _g; } 25 float b() const { return _b; } 26 float& b() { return _b; } 27 float a() const { return _a; } 28 float& a() { return _a; } 29 30 public: 18 31 static Vector RGBtoHSV (const Vector& RGB); 19 32 static void RGBtoHSV (const Vector& RGB, Vector& HSV); … … 24 37 static float minrgb(float r, float g, float b); 25 38 static float maxrgb(float r, float g, float b); 39 40 float _r; //!< Red Value. 41 float _g; //!< Green Value. 42 float _b; //!< Blue Value. 43 float _a; //!< Alpha Value. 44 26 45 }; 27 46
Note: See TracChangeset
for help on using the changeset viewer.