include/gui/button.h

Go to the documentation of this file.
00001 #ifndef _VGUI_BUTTON_H
00002 #define _VGUI_BUTTON_H
00003 
00004 /* button.h */
00005 #include <string>
00006 
00007 namespace VGUI
00008 {
00009         class Button : public Widget
00010         {
00011         public:
00012                 Button() {}
00013                 Button( Widget* w );
00014                 ~Button();
00015                 void Draw();
00016                 void Draw( float opacity );
00017                 bool MouseOver( float x, float y );
00018                 string MousePress( float x, float y );
00019                 string MouseRelease( float x, float y );
00020                 void Press();
00021                 void Release();
00022 
00023                 string GetAction() { return action; }
00024                 void SetAction( string new_action ) { action = new_action; }
00025 
00026         private:
00027                 TEXTURE_HANDLE btn_up, btn_down;
00028                 string action;
00029                 float tex_width, tex_height;
00030                 bool down;
00031         };
00032 }
00033 
00034 
00035 #endif // _VGUI_BUTTON_H

Generated on Thu Oct 19 04:05:47 2006 by  doxygen 1.4.6