Added dummy keyword panel; fixed directory finding; added more controls to style panel

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@86 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-21 16:26:22 +00:00
parent 7148d90bcb
commit 11a0276232
18 changed files with 204 additions and 32 deletions
+3 -6
View File
@@ -11,6 +11,7 @@
#include <data/game.hpp>
#include <data/stylesheet.hpp>
#include <data/symbol_font.hpp>
#include <wx/stdpaths.h>
// ----------------------------------------------------------------------------- : IncludePackage
@@ -34,16 +35,12 @@ IMPLEMENT_REFLECTION(IncludePackage) {
// ----------------------------------------------------------------------------- : PackageManager
String program_dir() {
return wxGetCwd(); //TODO
}
PackageManager packages;
PackageManager::PackageManager() {
void PackageManager::init() {
// determine data directory
data_directory = program_dir();
data_directory = wxStandardPaths::Get().GetDataDir();
// check if this is the actual data directory, especially during debugging,
// the data may be higher up:
// exe path = mse/build/debug/mse.exe
+7 -7
View File
@@ -23,7 +23,12 @@ DECLARE_POINTER_TYPE(Packaged);
*/
class PackageManager {
public:
PackageManager();
/// Initialize the package manager
void init();
/// Empty the list of packages.
/** This function MUST be called before the program terminates, otherwise
* we could get into fights with pool allocators used by ScriptValues */
void destroy();
/// Open a package with the specified name (including extension)
template <typename T>
@@ -55,12 +60,7 @@ class PackageManager {
// Open a file from a package, with a name encoded as "package/file"
InputStreamP openFileFromPackage(const String& name);
/// Empty the list of packages.
/** This function MUST be called before the program terminates, otherwise
* we could get into fights with pool allocators used by ScriptValues */
void destroy();
private:
map<String, PackagedP> loaded_packages;
String data_directory;