From 1e9cfd39c8441fad71ed7171ac93bdeb1d02e54b Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 15 Nov 2013 11:49:35 -0500 Subject: STORM-1980 Added a floater displaying a countdown timer. Removed most of the previous changes. --- indra/newview/llfloaterregionrestarting.h | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 indra/newview/llfloaterregionrestarting.h (limited to 'indra/newview/llfloaterregionrestarting.h') diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h new file mode 100644 index 0000000000..84f1bc65fb --- /dev/null +++ b/indra/newview/llfloaterregionrestarting.h @@ -0,0 +1,55 @@ +/** + * @file llfloaterregionrestarting.h + * @brief Shows countdown timer during region restart + * + * $LicenseInfo:firstyear=2006&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERREGIONRESTARTING_H +#define LL_LLFLOATERREGIONRESTARTING_H + +#include "llfloater.h" +#include "lltextbox.h" +#include "lleventtimer.h" + +class LLFloaterRegionRestarting : public LLFloater, public LLEventTimer +{ + friend class LLFloaterReg; + +public: + static void close(); + static void updateTime(U32 time); + +private: + LLFloaterRegionRestarting(const LLSD& key); + virtual ~LLFloaterRegionRestarting(); + virtual BOOL postBuild(); + virtual BOOL tick(); + virtual void refresh(); + virtual void regionChange(); + + LLTextBox* mRestartSeconds; + + std::string mName; +}; + +#endif // LL_LLFLOATERREGIONRESTARTING_H -- cgit v1.2.3 From 590630a32fee3205861e61438a88de0944d9c996 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 16 Nov 2013 10:54:30 -0500 Subject: STORM-1980 Code cleanup and an attempt to fix a mac/linux compile error --- indra/newview/llfloaterregionrestarting.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llfloaterregionrestarting.h') diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h index 84f1bc65fb..fef0dcddfe 100644 --- a/indra/newview/llfloaterregionrestarting.h +++ b/indra/newview/llfloaterregionrestarting.h @@ -37,7 +37,7 @@ class LLFloaterRegionRestarting : public LLFloater, public LLEventTimer public: static void close(); - static void updateTime(U32 time); + static void updateTime(S32 time); private: LLFloaterRegionRestarting(const LLSD& key); @@ -47,8 +47,6 @@ private: virtual void refresh(); virtual void regionChange(); - LLTextBox* mRestartSeconds; - std::string mName; }; -- cgit v1.2.3 From 5f635f7942130ab25f74f5c6aaeb5b135d0cb43e Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 2 Jan 2014 13:40:16 -0500 Subject: STORM-1980 Remove callback in destructor. Shrink floater and add a "!" icon in the top left corner. --- indra/newview/llfloaterregionrestarting.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llfloaterregionrestarting.h') diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h index fef0dcddfe..6ff067e0a8 100644 --- a/indra/newview/llfloaterregionrestarting.h +++ b/indra/newview/llfloaterregionrestarting.h @@ -48,6 +48,8 @@ private: virtual void regionChange(); std::string mName; + + boost::signals2::connection mRegionChangedConnection; }; #endif // LL_LLFLOATERREGIONRESTARTING_H -- cgit v1.2.3 From d15cc2dadc34c757d1ac6aef66d5baa38fb80968 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 3 Jan 2014 13:31:51 -0500 Subject: STORM-1980 Add shake effect --- indra/newview/llfloaterregionrestarting.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llfloaterregionrestarting.h') diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h index 6ff067e0a8..95fe772a28 100644 --- a/indra/newview/llfloaterregionrestarting.h +++ b/indra/newview/llfloaterregionrestarting.h @@ -45,11 +45,24 @@ private: virtual BOOL postBuild(); virtual BOOL tick(); virtual void refresh(); + virtual void draw(); virtual void regionChange(); std::string mName; + U32 mIterations; + LLTimer mShakeTimer; boost::signals2::connection mRegionChangedConnection; + + enum + { + SHAKE_START, + SHAKE_LEFT, + SHAKE_UP, + SHAKE_RIGHT, + SHAKE_DOWN, + SHAKE_DONE + }; }; #endif // LL_LLFLOATERREGIONRESTARTING_H -- cgit v1.2.3 From 05a313f546c4f943a74ec2214cabf4df747eda5a Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 3 Jan 2014 18:19:25 -0500 Subject: change shaking to decay exponentially --- indra/newview/llfloaterregionrestarting.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterregionrestarting.h') diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h index 95fe772a28..46416db2c8 100644 --- a/indra/newview/llfloaterregionrestarting.h +++ b/indra/newview/llfloaterregionrestarting.h @@ -49,7 +49,8 @@ private: virtual void regionChange(); std::string mName; - U32 mIterations; + U32 mShakeIterations; + F32 mShakeMagnitude; LLTimer mShakeTimer; boost::signals2::connection mRegionChangedConnection; -- cgit v1.2.3