00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00016
00017 #ifndef header_inputbutton_group
00018 #define header_inputbutton_group
00019
00020 #include "../Input/inputbutton.h"
00021
00022 class CL_InputButton_Group : public CL_InputButton
00023
00024
00025 {
00026 std::list<CL_InputButton*> buttons;
00027 public:
00028 void add(CL_InputButton *add_button)
00029 {
00030 buttons.push_back(add_button);
00031 }
00032
00034
00035 void remove(CL_InputButton *remove_button)
00036 {
00037 buttons.remove(remove_button);
00038 }
00039
00041
00042 virtual bool is_pressed()
00043 {
00044 for (
00045 std::list<CL_InputButton*>::iterator it = buttons.begin();
00046 it != buttons.end();
00047 it++)
00048 {
00049 if ((*it)->is_pressed() == true) return true;
00050 }
00051
00052 return false;
00053 }
00054
00055
00057
00058
00059 #endif