diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-05-08 07:43:08 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-05-08 07:43:08 +0000 |
commit | a4000c3744e42fcbb638e742f3b63fa31a0dee15 (patch) | |
tree | 7f472c30e65bbfa04ee9bc06631a1af305cc31fb /indra/newview/llmoveview.cpp | |
parent | 6c4cadbb04d633ad7b762058bdeba6e1f650dafd (diff) |
merge trunk@116587 skinning-7@119389 -> viewer-2.0.0-skinning-7
Diffstat (limited to 'indra/newview/llmoveview.cpp')
-rw-r--r-- | indra/newview/llmoveview.cpp | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index a180047875..36ec2c779a 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -59,13 +59,28 @@ const F32 NUDGE_TIME = 0.25f; // in seconds // protected LLFloaterMove::LLFloaterMove(const LLSD& key) -: LLFloater(std::string("move floater")) +: LLFloater() { setIsChrome(TRUE); const BOOL DONT_OPEN = FALSE; - LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml", NULL, DONT_OPEN); + LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml", DONT_OPEN); +} + +// virtual +void LLFloaterMove::onClose(bool app_quitting) +{ + destroy(); + + if (!app_quitting) + { + gSavedSettings.setBOOL("ShowMovementControls", FALSE); + } +} +// virtual +BOOL LLFloaterMove::postBuild() +{ mForwardButton = getChild<LLJoystickAgentTurn>("forward btn"); mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY); @@ -80,41 +95,29 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) mTurnLeftButton = getChild<LLButton>("turn left btn"); mTurnLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY); - mTurnLeftButton->setHeldDownCallback( turnLeft ); + mTurnLeftButton->setHeldDownCallback( turnLeft, NULL ); mTurnRightButton = getChild<LLButton>("turn right btn"); mTurnRightButton->setHeldDownDelay(MOVE_BUTTON_DELAY); - mTurnRightButton->setHeldDownCallback( turnRight ); + mTurnRightButton->setHeldDownCallback( turnRight, NULL ); mMoveUpButton = getChild<LLButton>("move up btn"); childSetAction("move up btn",moveUp,NULL); mMoveUpButton->setHeldDownDelay(MOVE_BUTTON_DELAY); - mMoveUpButton->setHeldDownCallback( moveUp ); + mMoveUpButton->setHeldDownCallback( moveUp, NULL ); mMoveDownButton = getChild<LLButton>("move down btn"); childSetAction("move down btn",moveDown,NULL); mMoveDownButton->setHeldDownDelay(MOVE_BUTTON_DELAY); - mMoveDownButton->setHeldDownCallback( moveDown ); -} - -// virtual -void LLFloaterMove::onClose(bool app_quitting) -{ - LLFloater::onClose(app_quitting); - - if (!app_quitting) - { - gSavedSettings.setBOOL("ShowMovementControls", FALSE); - } + mMoveDownButton->setHeldDownCallback( moveDown, NULL ); + return TRUE; } - // // Static member functions // -void LLFloaterMove::onOpen() +void LLFloaterMove::onOpen(const LLSD& key) { - LLFloater::onOpen(); gSavedSettings.setBOOL("ShowMovementControls", TRUE); } |