From a790c3805601bf5cacd9359a4f303376076013d7 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 27 Sep 2009 12:20:00 -0700 Subject: Made the windlight floater toggle --- linden/indra/newview/llfloaterwindlight.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llfloaterwindlight.cpp b/linden/indra/newview/llfloaterwindlight.cpp index 9936f3b..3cbcab1 100644 --- a/linden/indra/newview/llfloaterwindlight.cpp +++ b/linden/indra/newview/llfloaterwindlight.cpp @@ -468,14 +468,21 @@ LLFloaterWindLight* LLFloaterWindLight::instance() } void LLFloaterWindLight::show() { - LLFloaterWindLight* windLight = instance(); - windLight->syncMenu(); + if (!sWindLight) + { + LLFloaterWindLight* windLight = instance(); + windLight->syncMenu(); - // comment in if you want the menu to rebuild each time - //LLUICtrlFactory::getInstance()->buildFloater(windLight, "floater_windlight_options.xml"); - //windLight->initCallbacks(); + // comment in if you want the menu to rebuild each time + //LLUICtrlFactory::getInstance()->buildFloater(windLight, "floater_windlight_options.xml"); + //windLight->initCallbacks(); - windLight->open(); + windLight->open(); + } + else + { + sWindLight->close(); + } } bool LLFloaterWindLight::isOpen() -- cgit v1.1