diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-07-02 00:38:13 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-07-02 00:38:13 +0000 |
commit | 39905b927d60e204438705728d2c214cb3f9ef81 (patch) | |
tree | 7bb617cc204514b233e081457d905693aa0ae409 /indra/llui/lluictrl.cpp | |
parent | 687cff0eb8dfe663b99e18cfd953e0764d8ab372 (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@873 https://svn.aws.productengine.com/secondlife/pe/stable@888 -> viewer-2.0.0-pe-4
Diffstat (limited to 'indra/llui/lluictrl.cpp')
-rw-r--r-- | indra/llui/lluictrl.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 7b378fd9c7..0fbcf24c49 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -48,6 +48,8 @@ LLUICtrl::Params::Params() commit_callback("commit_callback"), validate_callback("validate_callback"), rightclick_callback("rightclick_callback"), + mouseenter_callback("mouseenter_callback"), + mouseleave_callback("mouseleave_callback"), control_name("control_name") { addSynonym(initial_value, "initial_val"); @@ -200,6 +202,11 @@ void LLUICtrl::initFromParams(const Params& p) if(p.rightclick_callback.isProvided()) initCommitCallback(p.rightclick_callback, mRightClickSignal); + if(p.mouseenter_callback.isProvided()) + initCommitCallback(p.mouseenter_callback, mMouseEnterSignal); + + if(p.mouseleave_callback.isProvided()) + initCommitCallback(p.mouseleave_callback, mMouseLeaveSignal); } @@ -264,6 +271,17 @@ void LLUICtrl::initEnableCallback(const EnableCallbackParam& cb, enable_signal_t } } +// virtual +void LLUICtrl::onMouseEnter(S32 x, S32 y, MASK mask) +{ + mMouseEnterSignal(this, getValue()); +} + +// virtual +void LLUICtrl::onMouseLeave(S32 x, S32 y, MASK mask) +{ + mMouseLeaveSignal(this, getValue()); +} void LLUICtrl::onCommit() { |