summaryrefslogtreecommitdiff
path: root/indra/llui/llbutton.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llbutton.h')
-rw-r--r--indra/llui/llbutton.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 1982c2e36f..3dea4434a9 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -75,6 +75,8 @@ public:
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual void draw();
+ virtual void onMouseCaptureLost();
+
// HACK: "committing" a button is the same as clicking on it.
virtual void onCommit();
@@ -85,7 +87,7 @@ public:
void setMouseDownCallback( void (*cb)(void *data) ) { mMouseDownCallback = cb; } // mouse down within button
void setMouseUpCallback( void (*cb)(void *data) ) { mMouseUpCallback = cb; } // mouse up, EVEN IF NOT IN BUTTON
void setHeldDownCallback( void (*cb)(void *data) ) { mHeldDownCallback = cb; } // Mouse button held down and in button
- void setHeldDownDelay( F32 seconds) { mHeldDownDelay = seconds; }
+ void setHeldDownDelay( F32 seconds, S32 frames = 0) { mHeldDownDelay = seconds; mHeldDownFrameDelay = frames; }
F32 getHeldDownTime() const { return mMouseDownTimer.getElapsedTimeF32(); }
@@ -140,7 +142,6 @@ public:
void setBorderEnabled(BOOL b) { mBorderEnabled = b; }
static void onHeldDown(void *userdata); // to be called by gIdleCallbacks
- static void onMouseCaptureLost(LLMouseHandler* old_captor);
void setFixedBorder(S32 width, S32 height) { mFixedWidth = width; mFixedHeight = height; }
void setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; }
@@ -175,7 +176,9 @@ protected:
const LLFontGL *mGLFont;
LLFrameTimer mMouseDownTimer;
+ S32 mMouseDownFrame;
F32 mHeldDownDelay; // seconds, after which held-down callbacks get called
+ S32 mHeldDownFrameDelay; // frames, after which held-down callbacks get called
LLPointer<LLImageGL> mImageUnselected;
LLUIString mUnselectedLabel;