diff options
Diffstat (limited to 'indra/newview/llmoveview.h')
-rw-r--r-- | indra/newview/llmoveview.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index cee6078ee9..dcca8308d9 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -46,6 +46,7 @@ class LLJoystickAgentSlide; class LLFloaterMove : public LLTransientDockableFloater { + LOG_CLASS(LLFloaterMove); friend class LLFloaterReg; private: @@ -55,6 +56,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void setEnabled(BOOL enabled); + /*virtual*/ void setVisible(BOOL visible); static F32 getYawRate(F32 time); static void setFlyingMode(BOOL fly); void setFlyingModeImpl(BOOL fly); @@ -84,19 +86,17 @@ private: void onWalkButtonClick(); void onRunButtonClick(); void onFlyButtonClick(); - void onStopFlyingButtonClick(); void initMovementMode(); void setMovementMode(const EMovementMode mode); void showFlyControls(bool bShow); void initModeTooltips(); void setModeTooltip(const EMovementMode mode); - void showQuickTips(const EMovementMode mode); + void setModeTitle(const EMovementMode mode); void initModeButtonMap(); void setModeButtonToggleState(const EMovementMode mode); void updateButtonsWithMovementMode(const EMovementMode newMode); void updatePosition(); void showModeButtons(BOOL bShow); - void updateHeight(bool show_mode_buttons); public: @@ -107,7 +107,6 @@ public: LLButton* mMoveUpButton; LLButton* mMoveDownButton; private: - LLButton* mStopFlyingButton; LLPanel* mModeActionsPanel; typedef std::map<LLView*, std::string> control_tooltip_map_t; @@ -126,6 +125,7 @@ private: */ class LLPanelStandStopFlying : public LLPanel { + LOG_CLASS(LLPanelStandStopFlying); public: typedef enum stand_stop_flying_mode_t { @@ -133,6 +133,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 +170,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; }; |