From a4000c3744e42fcbb638e742f3b63fa31a0dee15 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 8 May 2009 07:43:08 +0000 Subject: merge trunk@116587 skinning-7@119389 -> viewer-2.0.0-skinning-7 --- indra/newview/llmoveview.cpp | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'indra/newview/llmoveview.cpp') 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("forward btn"); mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY); @@ -80,41 +95,29 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) mTurnLeftButton = getChild("turn left btn"); mTurnLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY); - mTurnLeftButton->setHeldDownCallback( turnLeft ); + mTurnLeftButton->setHeldDownCallback( turnLeft, NULL ); mTurnRightButton = getChild("turn right btn"); mTurnRightButton->setHeldDownDelay(MOVE_BUTTON_DELAY); - mTurnRightButton->setHeldDownCallback( turnRight ); + mTurnRightButton->setHeldDownCallback( turnRight, NULL ); mMoveUpButton = getChild("move up btn"); childSetAction("move up btn",moveUp,NULL); mMoveUpButton->setHeldDownDelay(MOVE_BUTTON_DELAY); - mMoveUpButton->setHeldDownCallback( moveUp ); + mMoveUpButton->setHeldDownCallback( moveUp, NULL ); mMoveDownButton = getChild("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); } -- cgit v1.2.3