00001 #ifndef _VGUI_MULTIIMAGE_H 00002 #define _VGUI_MULTIIMAGE_H 00003 00004 /* image.h */ 00005 #include "gui.h" 00006 00007 namespace VGUI 00008 { 00009 class MultiImage : public Widget 00010 { 00011 public: 00012 MultiImage() {} 00013 MultiImage( Widget* w ); 00014 ~MultiImage(); 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 ResetValue(); 00021 void HookIncValuePress(); 00022 void HookDecValuePress(); 00023 void HookIncValueRelease(); 00024 void HookDecValueRelease(); 00025 void Release(); 00026 00027 vector<string> GetFilenameList() { return filename_list; } 00028 vector<string> GetValueList() { return value_list; } 00029 string GetValue() { return value_list[cur_option]; } 00030 string GetSetting() { return setting; } 00031 void SetFilenameList( vector<string> new_filename_list ) { filename_list = new_filename_list; Load(); } 00032 void SetValueList( vector<string> new_value_list ) { value_list = new_value_list; } 00033 void SetValue( string new_value ) { for( unsigned int i = 0; i < filename_list.size(); i++ ) if( filename_list[i] == new_value ) cur_option = i; return; } 00034 void SetSetting( string new_setting ) { setting = new_setting; } 00035 00036 private: 00037 void Load(); 00038 00039 vector<string> filename_list; 00040 vector<string> value_list; 00041 vector<TEXTURE_HANDLE> img_tex_list; 00042 unsigned int cur_option, last_option; 00043 string setting; 00044 bool l_down, r_down; 00045 Uint32 press_time; 00046 }; 00047 } 00048 00049 00050 #endif // _VGUI_MULTIIMAGE_H
1.4.6