Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

NoteSkinManager.h

Go to the documentation of this file.
00001 #ifndef NoteSkinMANAGER_H 00002 #define NoteSkinMANAGER_H 00003 00004 #include "Command.h" 00005 #include "RageTypes.h" 00006 #include "PlayerNumber.h" 00007 #include "IniFile.h" 00008 #include <map> 00009 #include <deque> 00010 00011 class Game; 00012 00013 class NoteSkinManager 00014 { 00015 public: 00016 NoteSkinManager(); 00017 ~NoteSkinManager(); 00018 00019 void RefreshNoteSkinData( const Game* game ); 00020 void GetNoteSkinNames( const Game* game, CStringArray &AddTo, bool bFilterDefault=true ); 00021 void GetNoteSkinNames( CStringArray &AddTo ); // looks up current const Game* in GAMESTATE 00022 bool DoesNoteSkinExist( const CString &sSkinName ); // looks up current const Game* in GAMESTATE 00023 00024 CString GetPathToFromNoteSkinAndButton( const CString &sNoteSkin, const CString &sButtonName, const CString &sElement, bool bOptional=false ); 00025 00026 CString GetMetric( const CString &sNoteSkinName, const CString &sButtonName, const CString &sValue ); 00027 int GetMetricI( const CString &sNoteSkinName, const CString &sButtonName, const CString &sValueName ); 00028 float GetMetricF( const CString &sNoteSkinName, const CString &sButtonName, const CString &sValueName ); 00029 bool GetMetricB( const CString &sNoteSkinName, const CString &sButtonName, const CString &sValueName ); 00030 RageColor GetMetricC( const CString &sNoteSkinName, const CString &sButtonName, const CString &sValueName ); 00031 Commands GetMetricA( const CString &sNoteSkinName, const CString &sButtonName, const CString &sValueName ); 00032 00033 CString GetNoteSkinDir( const CString &sSkinName ); 00034 00035 protected: 00036 CString GetPathToFromDir( const CString &sDir, const CString &sFileName ); 00037 00038 struct NoteSkinData 00039 { 00040 CString sName; 00041 IniFile metrics; 00042 00043 // When looking for an element, search these dirs from head to tail. 00044 deque<CString> vsDirSearchOrder; 00045 }; 00046 void LoadNoteSkinData( const CString &sNoteSkinName, NoteSkinData& data_out ); 00047 void LoadNoteSkinDataRecursive( const CString &sNoteSkinName, NoteSkinData& data_out ); 00048 map<CString,NoteSkinData> m_mapNameToData; 00049 const Game* m_pCurGame; 00050 }; 00051 00052 00053 00054 extern NoteSkinManager* NOTESKIN; // global and accessable from anywhere in our program 00055 00056 #endif 00057 00058 /* 00059 * (c) 2003-2004 Chris Danford 00060 * All rights reserved. 00061 * 00062 * Permission is hereby granted, free of charge, to any person obtaining a 00063 * copy of this software and associated documentation files (the 00064 * "Software"), to deal in the Software without restriction, including 00065 * without limitation the rights to use, copy, modify, merge, publish, 00066 * distribute, and/or sell copies of the Software, and to permit persons to 00067 * whom the Software is furnished to do so, provided that the above 00068 * copyright notice(s) and this permission notice appear in all copies of 00069 * the Software and that both the above copyright notice(s) and this 00070 * permission notice appear in supporting documentation. 00071 * 00072 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00073 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00074 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00075 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00076 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00077 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00078 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00079 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00080 * PERFORMANCE OF THIS SOFTWARE. 00081 */

Generated on Thu Jan 27 20:57:26 2005 for StepMania by doxygen 1.3.7