summaryrefslogtreecommitdiff
path: root/indra/llui/lliconctrl.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-08-31 00:16:09 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-08-31 00:16:09 +0300
commit5c18921e9ada7799e31b30e16aabc0580e5d5d38 (patch)
tree28d8f9c2bed0909c897be5318b31a91a23c835b4 /indra/llui/lliconctrl.cpp
parent1f930a7222b66ebf254ccf8cbda965514915fc3f (diff)
parentd31a83fb946c49a38376ea3b312b5380d0c8c065 (diff)
Merge branch 'master' into DRTVWR-544-maint
# Conflicts: # indra/newview/llpanelpicks.cpp # indra/newview/llpanelprofile.cpp
Diffstat (limited to 'indra/llui/lliconctrl.cpp')
-rw-r--r--indra/llui/lliconctrl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp
index 82b01e705d..e01aba402e 100644
--- a/indra/llui/lliconctrl.cpp
+++ b/indra/llui/lliconctrl.cpp
@@ -35,6 +35,7 @@
#include "llui.h"
#include "lluictrlfactory.h"
#include "lluiimage.h"
+#include "llwindow.h"
static LLDefaultChildRegistry::Register<LLIconCtrl> r("icon");
@@ -42,6 +43,7 @@ LLIconCtrl::Params::Params()
: image("image_name"),
color("color"),
use_draw_context_alpha("use_draw_context_alpha", true),
+ interactable("interactable", false),
scale_image("scale_image"),
min_width("min_width", 0),
min_height("min_height", 0)
@@ -52,6 +54,7 @@ LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p)
mColor(p.color()),
mImagep(p.image),
mUseDrawContextAlpha(p.use_draw_context_alpha),
+ mInteractable(p.interactable),
mPriority(0),
mMinWidth(p.min_width),
mMinHeight(p.min_height),
@@ -81,6 +84,16 @@ void LLIconCtrl::draw()
LLUICtrl::draw();
}
+BOOL LLIconCtrl::handleHover(S32 x, S32 y, MASK mask)
+{
+ if (mInteractable && getEnabled())
+ {
+ getWindow()->setCursor(UI_CURSOR_HAND);
+ return TRUE;
+ }
+ return LLUICtrl::handleHover(x, y, mask);
+}
+
// virtual
// value might be a string or a UUID
void LLIconCtrl::setValue(const LLSD& value)