• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

src/render/src/Button.cpp

Go to the documentation of this file.
00001 #include "../pch.h"
00002 
00003 Button::Button(pIGeometry geometry, pITexture texture, void callback(pIControl))
00004 : Control(geometry, texture)
00005 {
00006         m_callback = callback;
00007 }
00008 
00009 Button::~Button(void)
00010 {
00011 }
00012 
00013 bool Button::hitTest(int mouseX, int mouseY)
00014 {
00015         if (mouseX >= m_x && mouseX <= (m_x + m_width) && mouseY >= m_y && mouseY <= (m_y + m_height)) {
00016                 m_callback(this);
00017                 return true;
00018         }
00019         return false;
00020 }

Generated on Fri Jun 18 2010 17:48:39 for Cannonball by  doxygen 1.7.0