diff options
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 64 |
1 files changed, 10 insertions, 54 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 6bc14b331b..ab85a8c3c1 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -43,21 +43,17 @@ // Constants const F32 CAMERA_BUTTON_DELAY = 0.0f; -// Globals -LLFloaterCamera* gFloaterCamera = NULL; - - // // Member functions // -LLFloaterCamera::LLFloaterCamera(const std::string& name) -: LLFloater(name) // uses "FloaterCameraRect3" +LLFloaterCamera::LLFloaterCamera(const LLSD& val) +: LLFloater("camera floater") // uses "FloaterCameraRect3" { setIsChrome(TRUE); - // For now, only used for size and tooltip strings - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml"); + const BOOL DONT_OPEN = FALSE; + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", NULL, DONT_OPEN); S32 top = getRect().getHeight(); S32 bottom = 0; @@ -103,11 +99,12 @@ LLFloaterCamera::LLFloaterCamera(const std::string& name) addChild(mTrack); } - -LLFloaterCamera::~LLFloaterCamera() +// virtual +void LLFloaterCamera::onOpen() { - // children all deleted by LLView destructor - gFloaterCamera = NULL; + LLFloater::onOpen(); + + gSavedSettings.setBOOL("ShowCameraControls", TRUE); } // virtual @@ -119,45 +116,4 @@ void LLFloaterCamera::onClose(bool app_quitting) { gSavedSettings.setBOOL("ShowCameraControls", FALSE); } -} - -// -// Static member functions -// - -// static -void LLFloaterCamera::show(void*) -{ - if(!gFloaterCamera) - { - gFloaterCamera = new LLFloaterCamera("camera floater"); - } - gFloaterCamera->open(); /* Flawfinder: ignore */ - gSavedSettings.setBOOL("ShowCameraControls", TRUE); -} - -// static -void LLFloaterCamera::toggle(void*) -{ - if (gFloaterCamera) - { - gFloaterCamera->close(); - } - else - { - show(NULL); - } -} - -// static -BOOL LLFloaterCamera::visible(void*) -{ - if (gFloaterCamera) - { - return gFloaterCamera->getVisible(); - } - else - { - return FALSE; - } -} +}
\ No newline at end of file |