Added mouse click functions to image button
Added destructor for images Deleting listener now on exit
This commit is contained in:
@@ -1,20 +1,34 @@
|
||||
#include "BaseButtonInstance.h"
|
||||
|
||||
bool floatBottom;
|
||||
bool floatRight;
|
||||
bool floatCenter;
|
||||
bool disabled;
|
||||
bool floatBottom = false;
|
||||
bool floatRight = false;
|
||||
bool floatCenter = false;
|
||||
bool disabled = false;
|
||||
ButtonListener* listener = NULL;
|
||||
|
||||
BaseButtonInstance::BaseButtonInstance(void)
|
||||
{
|
||||
listener = NULL;
|
||||
}
|
||||
|
||||
BaseButtonInstance::~BaseButtonInstance(void)
|
||||
{
|
||||
delete listener;
|
||||
}
|
||||
|
||||
void BaseButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown){}
|
||||
|
||||
bool BaseButtonInstance::mouseInButton(float mousex, float mousey, RenderDevice* rd){return false;}
|
||||
|
||||
void BaseButtonInstance::onMouseClick()
|
||||
{
|
||||
if(listener != NULL)
|
||||
{
|
||||
listener->onButton1MouseClick(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool BaseButtonInstance::mouseInArea(float point1x, float point1y, float point2x, float point2y, float mousex, float mousey)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user