00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #if !defined(_OPENCITY_GUIBUTTON_H_)
00021 #define _OPENCITY_GUIBUTTON_H_ 1
00022
00023 #include "main.h"
00024 #include "guimain.h"
00025
00026
00027
00030 class GUIButton : public GUIMain {
00031 public:
00032 GUIButton() {};
00033 GUIButton(
00034 const int & rciX,
00035 const int & rciY,
00036 const uint & rcuiW,
00037 const uint & rcuiH,
00038 const string & strFile );
00039 ~GUIButton();
00040
00041
00042 void
00043 SetBackground(
00044 const Color& color );
00045
00046 void
00047 SetForeground(
00048 const Color& color );
00049
00050
00051
00052
00053
00054 void
00055 Display() const;
00056
00057
00058
00059
00060
00061 void
00062 uiKeyboard( const SDL_KeyboardEvent & rcsSDLKeyboardEvent );
00063
00064 void
00065 uiMouseMotion( const SDL_MouseMotionEvent & rcsSDLMouseMotionEvent );
00066
00067 void
00068 uiMouseButton( const SDL_MouseButtonEvent & rcsSDLMouseButtonEvent );
00069
00070 void
00071 uiExpose( const SDL_ExposeEvent & rcsSDLExposeEvent );
00072
00073 void
00074 uiResize( const SDL_ResizeEvent & rcsSDLResizeEvent );
00075
00076
00077 private:
00078 GLuint uiTexture, uiTextureOver;
00079
00080 Color colorForeground;
00081 Color colorBackground;
00082 };
00083
00084 #endif
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115