mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Implemented NewSetWindow, added events to GalleryList
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@48 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+7
-1
@@ -8,17 +8,23 @@
|
||||
|
||||
#include <data/set.hpp>
|
||||
#include <data/game.hpp>
|
||||
#include <data/stylesheet.hpp>
|
||||
#include <data/card.hpp>
|
||||
#include <data/field.hpp>
|
||||
#include <script/value.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- : Set
|
||||
|
||||
Set::Set() {}
|
||||
|
||||
Set::Set(const GameP& game)
|
||||
: game(game)
|
||||
{}
|
||||
|
||||
Set::Set() {}
|
||||
Set::Set(const StyleSheetP& stylesheet)
|
||||
: stylesheet(stylesheet)
|
||||
, game(stylesheet->game)
|
||||
{}
|
||||
|
||||
String Set::typeName() const { return _("set"); }
|
||||
|
||||
|
||||
+4
-2
@@ -17,7 +17,7 @@
|
||||
DECLARE_POINTER_TYPE(Card);
|
||||
DECLARE_POINTER_TYPE(Set);
|
||||
DECLARE_POINTER_TYPE(Game);
|
||||
DECLARE_POINTER_TYPE(Stylesheet);
|
||||
DECLARE_POINTER_TYPE(StyleSheet);
|
||||
DECLARE_POINTER_TYPE(Field);
|
||||
DECLARE_POINTER_TYPE(Value);
|
||||
|
||||
@@ -30,11 +30,13 @@ class Set : public Packaged {
|
||||
Set();
|
||||
/// Create a set using the given game
|
||||
Set(const GameP& game);
|
||||
/// Create a set using the given stylesheet, and its game
|
||||
Set(const StyleSheetP& stylesheet);
|
||||
|
||||
/// The game this set uses
|
||||
GameP game;
|
||||
/// The default stylesheet
|
||||
StylesheetP stylesheet;
|
||||
StyleSheetP stylesheet;
|
||||
/// The values on the fields of the set
|
||||
/** The indices should correspond to the set_fields in the Game */
|
||||
IndexMap<FieldP, ValueP> data;
|
||||
|
||||
@@ -37,7 +37,7 @@ IMPLEMENT_REFLECTION(ColumnSettings) {
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION(GameSettings) {
|
||||
REFLECT(default_style);
|
||||
REFLECT(default_stylesheet);
|
||||
REFLECT(default_export);
|
||||
// REFLECT_N("cardlist columns", columns);
|
||||
REFLECT(sort_cards_by);
|
||||
|
||||
@@ -43,7 +43,7 @@ class ColumnSettings {
|
||||
/// Settings for a Game
|
||||
class GameSettings {
|
||||
public:
|
||||
String default_style;
|
||||
String default_stylesheet;
|
||||
String default_export;
|
||||
map<String, ColumnSettings> columns;
|
||||
String sort_cards_by;
|
||||
|
||||
@@ -8,4 +8,7 @@
|
||||
|
||||
#include <data/stylesheet.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- :
|
||||
// ----------------------------------------------------------------------------- : StyleSheet
|
||||
|
||||
String StyleSheet::typeNameStatic() { return _("style"); }
|
||||
String StyleSheet::typeName() const { return _("style"); }
|
||||
|
||||
@@ -17,10 +17,17 @@ DECLARE_POINTER_TYPE(Game);
|
||||
// ----------------------------------------------------------------------------- : StyleSheet
|
||||
|
||||
/// A collection of style information for card and set fields
|
||||
class StyleSheet : Packaged {
|
||||
class StyleSheet : public Packaged {
|
||||
public:
|
||||
GameP game;
|
||||
|
||||
static String typeNameStatic();
|
||||
virtual String typeName() const;
|
||||
virtual String fullName() const;
|
||||
virtual InputStreamP openIconFile();
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
Reference in New Issue
Block a user