/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/src/sgx/gui/hotspot.cpp

*/

#include "sgx/core/core.hpp"
#include "sgx/graphics/graphics.hpp"
#include "sgx/gui/gui.hpp"

sgxGUIHotSpotParams::sgxGUIHotSpotParams(const tUINT32 w, const tUINT32 h) { 
	m_Width = w;
	m_Height = h;
}
	
sgxGUIHotSpot::sgxGUIHotSpot(const tINT32 x, const tINT32 y, const sgxGUIHotSpotParams &params) :
	sgxWidget(x,y, CGUIDesignScreen::widgetHotspot),
	m_SetupParams(params)
{
}

void	
sgxGUIHotSpot::getArea(sgxRect2i &rc) const {
	rc.left = m_X;
	rc.top = m_Y;
	rc.right = m_X+m_SetupParams.m_Width;
	rc.bottom = m_Y+m_SetupParams.m_Height;
}

tBOOL	sgxGUIHotSpot::onPressed(const sgxPoint2i &position) {
	onSelect(position);
	return TRUE;
}
