Implement operator == on MouseButton class
This commit is contained in:
@@ -17,6 +17,7 @@ public:
|
||||
explicit MouseButton(const char* charcode, unsigned int index);
|
||||
const char* CharCode;
|
||||
unsigned int ButtonIndex;
|
||||
bool operator == (const MouseButton& mb) const;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -10,6 +10,10 @@ MouseButton::MouseButton(const char* charcode, unsigned int index) {
|
||||
this->ButtonIndex = index;
|
||||
}
|
||||
|
||||
bool MouseButton::operator==(const MouseButton &mb) const {
|
||||
return (mb.CharCode == this->CharCode);
|
||||
}
|
||||
|
||||
|
||||
MouseButton GetMouseButtonFromXButton(unsigned int button) {
|
||||
switch(button) {
|
||||
|
Reference in New Issue
Block a user