diff options
| author | build.powdertoy.co.uk <admin@powdertoy.co.uk> | 2012-07-19 17:08:34 (GMT) |
|---|---|---|
| committer | build.powdertoy.co.uk <admin@powdertoy.co.uk> | 2012-07-19 17:08:34 (GMT) |
| commit | d328b84b1330b0e8f3a7f87ce48b9b20ea4b6d01 (patch) | |
| tree | db311c7849270ddd2510cbd65a192b059f8a3c77 /src/interface/Button.cpp | |
| parent | d71af3706a7a14e8ae65523e1a062417818b8fe2 (diff) | |
| parent | 4d961117bde4398ae4d72f2db96eef381371e2df (diff) | |
| download | powder-d328b84b1330b0e8f3a7f87ce48b9b20ea4b6d01.zip powder-d328b84b1330b0e8f3a7f87ce48b9b20ea4b6d01.tar.gz | |
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/interface/Button.cpp')
| -rw-r--r-- | src/interface/Button.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index ac1f87e..b70d41e 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -13,7 +13,7 @@ namespace ui { -Button::Button(Point position, Point size, std::string buttonText): +Button::Button(Point position, Point size, std::string buttonText, std::string toolTip): Component(position, size), ButtonText(buttonText), isMouseInside(false), @@ -21,7 +21,8 @@ Button::Button(Point position, Point size, std::string buttonText): isTogglable(false), toggle(false), actionCallback(NULL), - Enabled(true) + Enabled(true), + toolTip(toolTip) { TextPosition(); } @@ -141,6 +142,10 @@ void Button::OnMouseEnter(int x, int y) return; if(actionCallback) actionCallback->MouseEnterCallback(this); + if(toolTip.length()>0 && GetParentWindow()) + { + GetParentWindow()->ToolTip(this, ui::Point(x, y), toolTip); + } } |
