mElite  1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ClickableObject.cpp
Go to the documentation of this file.
1 
6 #include "ClickableObject.h"
7 
8 std::vector<ClickableObject*> ClickableObject::objectList;
9 
10 ClickableObject::ClickableObject(void)
11 {
12  objectList.push_back(this);
13 }
14 
15 void ClickableObject::clickAll()
16 {
17  for (unsigned int i = 0; i < objectList.size(); i++)
18  {
19  objectList.at(i)->mouseClick();
20  }
21 }
22 
23 void ClickableObject::drawAll()
24 {
25  for (unsigned int i = 0; i < objectList.size(); i++)
26  {
27  objectList.at(i)->draw();
28  }
29 }