fix tooltip issues in render options too

This commit is contained in:
jacob1 2013-05-05 00:18:28 -04:00
parent 4f2d24bcff
commit 082530d18c
3 changed files with 7 additions and 1 deletions

View File

@ -53,6 +53,10 @@ void Checkbox::OnMouseUp(int x, int y, unsigned int button)
void Checkbox::OnMouseEnter(int x, int y)
{
isMouseOver = true;
}
void Checkbox::OnMouseHover(int x, int y)
{
if(toolTip.length()>0 && GetParentWindow())
{
GetParentWindow()->ToolTip(this, ui::Point(x, y), toolTip);

View File

@ -25,6 +25,7 @@ public:
void SetIcon(Icon icon);
void Draw(const Point& screenPos);
virtual void OnMouseEnter(int x, int y);
virtual void OnMouseHover(int x, int y);
virtual void OnMouseLeave(int x, int y);
virtual void OnMouseClick(int x, int y, unsigned int button);
virtual void OnMouseUp(int x, int y, unsigned int button);

View File

@ -394,7 +394,8 @@ void RenderView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bo
void RenderView::ToolTip(ui::Component * sender, ui::Point mousePosition, std::string toolTip)
{
this->toolTip = toolTip;
toolTipPresence = 500;
if (toolTipPresence < 120)
toolTipPresence += 3;
}
RenderView::~RenderView() {