diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-04-17 02:06:30 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-04-17 02:06:30 +0000 |
commit | c57beb8b4bd51add9a92ddc4d704e7bea9c4d940 (patch) | |
tree | 8fc0abb0655302822390d227d9ec0ad7d4056563 /indra/newview/llfloatercamera.cpp | |
parent | fb42741b620cea3d3b6380f1f099c92fcf4f3b04 (diff) |
QAR-449 Viewer 1.20 RC 0
merge Branch_1-20-Viewer -r 84060 : 84432 -> release
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 |