summaryrefslogtreecommitdiff
path: root/indra/newview/llmoveview.h
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-11-16 23:17:24 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-11-16 23:17:24 +0200
commit4b80c9978c48b6a9eaac2ed358e81cf06f3e2cb5 (patch)
treebc794297be76b309b92cb33b699cf3723a5380b1 /indra/newview/llmoveview.h
parent19d90dc5ed5494308744c02be9afb7eb021244e0 (diff)
Fixed Stand / Stop flying buttons (EXT-2408, EXT-2467, EXT-2513).
The buttons are now attached to the movement controls floater while it's visible (EXT-984). --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llmoveview.h')
-rw-r--r--indra/newview/llmoveview.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index cee6078ee9..2664fe6e40 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -46,11 +46,12 @@ class LLJoystickAgentSlide;
class LLFloaterMove
: public LLTransientDockableFloater
{
+ LOG_CLASS(LLFloaterMove);
friend class LLFloaterReg;
private:
LLFloaterMove(const LLSD& key);
- ~LLFloaterMove() {}
+ ~LLFloaterMove();
public:
/*virtual*/ BOOL postBuild();
@@ -96,7 +97,6 @@ private:
void updateButtonsWithMovementMode(const EMovementMode newMode);
void updatePosition();
void showModeButtons(BOOL bShow);
- void updateHeight(bool show_mode_buttons);
public:
@@ -126,6 +126,7 @@ private:
*/
class LLPanelStandStopFlying : public LLPanel
{
+ LOG_CLASS(LLPanelStandStopFlying);
public:
typedef enum stand_stop_flying_mode_t
{
@@ -133,6 +134,19 @@ public:
SSFM_STOP_FLYING
} EStandStopFlyingMode;
+ /**
+ * Attach or detach the panel to/from the movement controls floater.
+ *
+ * Called when the floater gets opened/closed, user sits, stands up or starts/stops flying.
+ *
+ * @param move_view The floater to attach to (not always accessible via floater registry).
+ * If NULL is passed, the panel gets reparented to its original container.
+ *
+ * @see mAttached
+ * @see mOriginalParent
+ */
+ void reparent(LLFloaterMove* move_view);
+
static LLPanelStandStopFlying* getInstance();
static void setStandStopFlyingMode(EStandStopFlyingMode mode);
static void clearStandStopFlyingMode(EStandStopFlyingMode mode);
@@ -157,6 +171,23 @@ private:
LLButton* mStandButton;
LLButton* mStopFlyingButton;
+
+ /**
+ * The original parent of the panel.
+ *
+ * Makes it possible to move (reparent) the panel to the movement controls floater and back.
+ *
+ * @see reparent()
+ */
+ LLHandle<LLPanel> mOriginalParent;
+
+ /**
+ * True if the panel is currently attached to the movement controls floater.
+ *
+ * @see reparent()
+ * @see updatePosition()
+ */
+ bool mAttached;
};