From e4973e0f92b524e7f9c2d10745f4c5e3a8557284 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 18 May 2018 21:09:42 +0300 Subject: MAINT-8344 Day Cycle Editor (part 3) --- indra/llui/llmultislider.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 2b422e89c9..927063a5fd 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -76,6 +76,7 @@ public: const std::string& getCurSlider() const { return mCurSlider; } F32 getCurSliderValue() const { return getSliderValue(mCurSlider); } void setCurSlider(const std::string& name); + void resetCurSlider(); void setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mCurSlider, val, from_event); } /*virtual*/ void setValue(const LLSD& value); -- cgit v1.2.3 From 2ddad24c4d5e64711cdbffd98e290d3da8e9714a Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 30 May 2018 17:08:28 -0700 Subject: Timeline behavior in day cycle edit. --- indra/llui/llmultislider.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 927063a5fd..0177597da2 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -72,6 +72,7 @@ public: virtual ~LLMultiSlider(); void setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE); F32 getSliderValue(const std::string& name) const; + F32 getSliderValueFromX(S32 xpos) const; const std::string& getCurSlider() const { return mCurSlider; } F32 getCurSliderValue() const { return getSliderValue(mCurSlider); } -- cgit v1.2.3 From c822d8af16428cf245ae57305a4f39d3fccd672b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 20 Jul 2018 19:10:22 +0300 Subject: MAINT-8344 implement slider support for an overlap threshold and reenable shift-copy --- indra/llui/llmultislider.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 0177597da2..9281b68406 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -50,6 +50,8 @@ public: draw_track, use_triangle; + Optional overlap_threshold; + Optional track_color, thumb_disabled_color, thumb_outline_color, @@ -107,6 +109,7 @@ protected: S32 mMaxNumSliders; BOOL mAllowOverlap; + F32 mOverlapThreshold; BOOL mDrawTrack; BOOL mUseTriangle; /// hacked in toggle to use a triangle -- cgit v1.2.3 From 51abc168c03f80d63c85d4bb48624f440b585390 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 3 Aug 2018 21:01:43 +0300 Subject: MAINT-8902 fix encroaching 'legacy' issues --- indra/llui/llmultislider.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 9281b68406..eff0c7d2d7 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -47,6 +47,7 @@ public: Optional max_sliders; Optional allow_overlap, + loop_overlap, draw_track, use_triangle; @@ -109,6 +110,7 @@ protected: S32 mMaxNumSliders; BOOL mAllowOverlap; + BOOL mLoopOverlap; F32 mOverlapThreshold; BOOL mDrawTrack; BOOL mUseTriangle; /// hacked in toggle to use a triangle -- cgit v1.2.3 From e539236a75a163b1c6748617bd1e4d2b84aaa3d6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 6 Sep 2018 21:29:28 +0300 Subject: MAINT-9099 Implementation of vertical orientation support for multislider --- indra/llui/llmultislider.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index eff0c7d2d7..3884b0a2a0 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -60,6 +60,8 @@ public: thumb_center_selected_color, triangle_color; + Optional orientation; + Optional mouse_down_callback, mouse_up_callback; Optional thumb_width; @@ -75,7 +77,7 @@ public: virtual ~LLMultiSlider(); void setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE); F32 getSliderValue(const std::string& name) const; - F32 getSliderValueFromX(S32 xpos) const; + F32 getSliderValueFromPos(S32 xpos, S32 ypos) const; const std::string& getCurSlider() const { return mCurSlider; } F32 getCurSliderValue() const { return getSliderValue(mCurSlider); } @@ -127,7 +129,9 @@ protected: LLUIColor mThumbCenterSelectedColor; LLUIColor mDisabledThumbColor; LLUIColor mTriangleColor; - + + const EOrientation mOrientation; + commit_signal_t* mMouseDownSignal; commit_signal_t* mMouseUpSignal; }; -- cgit v1.2.3 From c5936bbba031272b1deb78ce8ea52663d033695b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 12 Sep 2018 21:02:58 +0300 Subject: SL-1961 Icon support for multislider and icons on altitudes slider --- indra/llui/llmultislider.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 3884b0a2a0..a068b461e0 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -55,12 +55,14 @@ public: Optional track_color, thumb_disabled_color, + thumb_highlight_color, thumb_outline_color, thumb_center_color, thumb_center_selected_color, triangle_color; - Optional orientation; + Optional orientation, + thumb_image; Optional mouse_down_callback, mouse_up_callback; @@ -125,10 +127,12 @@ protected: mThumbRects; LLUIColor mTrackColor; LLUIColor mThumbOutlineColor; + LLUIColor mThumbHighlightColor; LLUIColor mThumbCenterColor; LLUIColor mThumbCenterSelectedColor; LLUIColor mDisabledThumbColor; LLUIColor mTriangleColor; + LLUIImagePtr mThumbImagep; //blimps on the slider, for now no 'disabled' support const EOrientation mOrientation; -- cgit v1.2.3 From ceb336c5f340c260ac5c1923723dbc8204b98157 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 13 Sep 2018 16:32:41 +0300 Subject: SL-1168 EEP Shouldn't be possible to create more than 20 keframes --- indra/llui/llmultislider.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 3884b0a2a0..9a997de16a 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -105,6 +105,10 @@ public: /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); /*virtual*/ void draw(); + S32 getMaxNumSliders() { return mMaxNumSliders; } + S32 getCurNumSliders() { return mValue.size(); } + bool canAddSliders() { return mValue.size() < mMaxNumSliders; } + protected: LLSD mValue; std::string mCurSlider; -- cgit v1.2.3 From 6762c4515a9b0f98164d6efd191abec5ca4dd211 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 7 Dec 2018 17:10:05 +0200 Subject: SL-1894 When crossing regions altitude slider could misbehave --- indra/llui/llmultislider.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 52c6d1ddef..50cf62e9c5 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -96,7 +96,7 @@ public: bool findUnusedValue(F32& initVal); const std::string& addSlider(); const std::string& addSlider(F32 val); - void addSlider(F32 val, const std::string& name); + bool addSlider(F32 val, const std::string& name); void deleteSlider(const std::string& name); void deleteCurSlider() { deleteSlider(mCurSlider); } void clear(); @@ -109,6 +109,7 @@ public: S32 getMaxNumSliders() { return mMaxNumSliders; } S32 getCurNumSliders() { return mValue.size(); } + F32 getOverlapThreshold() { return mOverlapThreshold; } bool canAddSliders() { return mValue.size() < mMaxNumSliders; } protected: -- cgit v1.2.3 From 8227a0b270f6e7cc521adeb7b97ad2d5fb646973 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 21 Dec 2018 15:30:57 -0800 Subject: SL-10279: Rework the environment pannel. Still in progress. --- indra/llui/llmultislider.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 50cf62e9c5..b4331e11c0 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -80,6 +80,7 @@ public: void setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE); F32 getSliderValue(const std::string& name) const; F32 getSliderValueFromPos(S32 xpos, S32 ypos) const; + LLRect getSliderThumbRect(const std::string& name) const; const std::string& getCurSlider() const { return mCurSlider; } F32 getCurSliderValue() const { return getSliderValue(mCurSlider); } -- cgit v1.2.3 From d607d81dba25dfe7dd1ecdf123af656ca939924f Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 2 Jan 2019 17:10:15 -0800 Subject: SL-10279: Temp fix for stale estate info when editing parcel environment. --- indra/llui/llmultislider.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index b4331e11c0..b0fca2597d 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -82,6 +82,10 @@ public: F32 getSliderValueFromPos(S32 xpos, S32 ypos) const; LLRect getSliderThumbRect(const std::string& name) const; + void setSliderThumbImage(const std::string &name); + void clearSliderThumbImage(); + + const std::string& getCurSlider() const { return mCurSlider; } F32 getCurSliderValue() const { return getSliderValue(mCurSlider); } void setCurSlider(const std::string& name); @@ -113,6 +117,7 @@ public: F32 getOverlapThreshold() { return mOverlapThreshold; } bool canAddSliders() { return mValue.size() < mMaxNumSliders; } + protected: LLSD mValue; std::string mCurSlider; -- cgit v1.2.3 From 531ad5b3ec1b6785bf6cde04c1d7203233b552a2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 31 Jan 2019 18:45:01 +0200 Subject: SL-1531 EEP Visual feedback on the timeline --- indra/llui/llmultislider.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index b0fca2597d..b85eec1e61 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -110,6 +110,7 @@ public: /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) override; /*virtual*/ void draw(); S32 getMaxNumSliders() { return mMaxNumSliders; } @@ -121,6 +122,7 @@ public: protected: LLSD mValue; std::string mCurSlider; + std::string mHoverSlider; static S32 mNameCounter; S32 mMaxNumSliders; -- cgit v1.2.3 From 7469fdba800e9a5d282ddc16f034aca71a2e8764 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 31 Jan 2019 20:25:56 +0200 Subject: SL-1531 Mac build fix --- indra/llui/llmultislider.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index b85eec1e61..20c3437ec4 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -92,8 +92,8 @@ public: void resetCurSlider(); void setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mCurSlider, val, from_event); } - /*virtual*/ void setValue(const LLSD& value); - /*virtual*/ LLSD getValue() const { return mValue; } + /*virtual*/ void setValue(const LLSD& value) override; + /*virtual*/ LLSD getValue() const override { return mValue; } boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ); boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); @@ -104,14 +104,14 @@ public: bool addSlider(F32 val, const std::string& name); void deleteSlider(const std::string& name); void deleteCurSlider() { deleteSlider(mCurSlider); } - void clear(); + /*virtual*/ void clear() override; - /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask) override; + /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask) override; + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask) override; + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask) override; /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) override; - /*virtual*/ void draw(); + /*virtual*/ void draw() override; S32 getMaxNumSliders() { return mMaxNumSliders; } S32 getCurNumSliders() { return mValue.size(); } -- cgit v1.2.3 From db2c32285b95d3517ebcd1dbf84faa2872ab6428 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 25 Feb 2020 18:59:43 +0200 Subject: SL-12591 Fixed slider value comparison --- indra/llui/llmultislider.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llui/llmultislider.h') diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 20c3437ec4..99a78d6e09 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -77,6 +77,10 @@ protected: friend class LLUICtrlFactory; public: virtual ~LLMultiSlider(); + + // Multi-slider rounds values to nearest increments (bias towards rounding down) + F32 getNearestIncrement(F32 value) const; + void setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE); F32 getSliderValue(const std::string& name) const; F32 getSliderValueFromPos(S32 xpos, S32 ypos) const; -- cgit v1.2.3