mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
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:
@@ -6,9 +6,9 @@
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/action_stack.hpp>
|
||||
#include <util/for_each.hpp>
|
||||
#include <algorithm>
|
||||
#include "action_stack.hpp"
|
||||
#include "for_each.hpp"
|
||||
|
||||
// ----------------------------------------------------------------------------- : Action stack
|
||||
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <util/string.hpp>
|
||||
#include <vector>
|
||||
#include "string.hpp"
|
||||
|
||||
// ----------------------------------------------------------------------------- : Action
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -141,6 +141,9 @@ enum ChildMenuID {
|
||||
|
||||
// Statistics
|
||||
, ID_FIELD_LIST = 3101
|
||||
|
||||
// Style
|
||||
, ID_STYLE_USE_FOR_ALL = 3201
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user