[Opentnl-cvs] tnl/zap UIGame.cpp,1.49,1.50 barrier.cpp,1.17,1.18 loadoutSelect.cpp,1.14,1.15 loadout
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <mar...@us...> - 2004-10-19 22:19:50
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9198/zap Modified Files: UIGame.cpp barrier.cpp loadoutSelect.cpp loadoutSelect.h quickChat.cpp quickChat.h Log Message: Added disappear timer to loadout and chat menus Lightened the internal color of barriers Index: UIGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UIGame.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** UIGame.cpp 5 Oct 2004 23:41:59 -0000 1.49 --- UIGame.cpp 19 Oct 2004 22:19:39 -0000 1.50 *************** *** 111,114 **** --- 111,118 ---- } } + else if(mCurrentMode == VChatMode) + mVChat.idle(timeDelta); + else if(mCurrentMode == LoadoutMode) + mLoadout.idle(timeDelta); mVoiceRecorder.idle(timeDelta); mIdleTimeDelta[mFrameIndex % FPSAvgCount] = timeDelta; Index: loadoutSelect.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/loadoutSelect.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** loadoutSelect.h 2 Aug 2004 18:11:54 -0000 1.6 --- loadoutSelect.h 19 Oct 2004 22:19:39 -0000 1.7 *************** *** 30,33 **** --- 30,34 ---- #include "tnlTypes.h" using namespace TNL; + #include "timer.h" namespace Zap *************** *** 40,47 **** --- 41,53 ---- U32 mWeapon[3]; U32 mCurrentIndex; + Timer mIdleTimer; + enum { + MenuTimeout = 3500, + }; public: LoadoutHelper(); void render(); + void idle(U32 delta); void show(bool fromController); bool processKey(U32 key); Index: quickChat.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/quickChat.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** quickChat.h 30 May 2004 00:16:13 -0000 1.6 --- quickChat.h 19 Oct 2004 22:19:39 -0000 1.7 *************** *** 31,34 **** --- 31,35 ---- #include "UI.h" #include "tnlNetStringTable.h" + #include "timer.h" namespace Zap *************** *** 52,59 **** --- 53,65 ---- bool mFromController; VChatNode *mCurNode; + Timer mIdleTimer; + enum { + MenuTimeout = 3500, + }; public: VChatHelper(); + void idle(U32 delta); void render(); void show(bool fromController); Index: loadoutSelect.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/loadoutSelect.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** loadoutSelect.cpp 2 Aug 2004 18:11:54 -0000 1.14 --- loadoutSelect.cpp 19 Oct 2004 22:19:39 -0000 1.15 *************** *** 80,83 **** --- 80,84 ---- mFromController = fromController; mCurrentIndex = 0; + mIdleTimer.reset(MenuTimeout); } *************** *** 122,125 **** --- 123,132 ---- } + void LoadoutHelper::idle(U32 delta) + { + if(mIdleTimer.update(delta)) + gGameUserInterface.setPlayMode(); + } + bool LoadoutHelper::processKey(U32 key) { *************** *** 148,151 **** --- 155,159 ---- if(!list[index].text) return false; + mIdleTimer.reset(MenuTimeout); switch(mCurrentIndex) Index: quickChat.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/quickChat.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** quickChat.cpp 8 Oct 2004 00:17:47 -0000 1.18 --- quickChat.cpp 19 Oct 2004 22:19:39 -0000 1.19 *************** *** 145,148 **** --- 145,155 ---- mCurNode = &mChatTree[0]; mFromController = OptionsMenuUserInterface::joystickType != -1; + mIdleTimer.reset(MenuTimeout); + } + + void VChatHelper::idle(U32 delta) + { + if(mIdleTimer.update(delta)) + gGameUserInterface.setPlayMode(); } *************** *** 176,179 **** --- 183,187 ---- if(match && walk->depth == matchLevel) { + mIdleTimer.reset(MenuTimeout); // select it... mCurNode = walk; Index: barrier.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/barrier.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** barrier.cpp 19 Oct 2004 19:43:58 -0000 1.17 --- barrier.cpp 19 Oct 2004 22:19:39 -0000 1.18 *************** *** 204,208 **** void Barrier::render(U32 layerIndex) { ! Color b(0,0,0.075), f(0,0,1); //Color b(0.0,0.0,0.075), f(.3 ,0.3,0.8); --- 204,208 ---- void Barrier::render(U32 layerIndex) { ! Color b(0,0,0.15), f(0,0,1); //Color b(0.0,0.0,0.075), f(.3 ,0.3,0.8); |