summaryrefslogtreecommitdiff
path: root/indra/newview/llmoveview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmoveview.cpp')
-rw-r--r--indra/newview/llmoveview.cpp43
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);
}