mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Added dummy CardEditor, implemented Stylesheet loading
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@50 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+26
-3
@@ -11,23 +11,46 @@
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <util/io/package.hpp>
|
||||
#include <script/scriptable.hpp>
|
||||
|
||||
DECLARE_POINTER_TYPE(Game);
|
||||
DECLARE_POINTER_TYPE(StyleSheet);
|
||||
DECLARE_POINTER_TYPE(Field);
|
||||
DECLARE_POINTER_TYPE(Style);
|
||||
|
||||
// ----------------------------------------------------------------------------- : StyleSheet
|
||||
|
||||
/// A collection of style information for card and set fields
|
||||
class StyleSheet : public Packaged {
|
||||
public:
|
||||
GameP game;
|
||||
double card_width; ///< The width of a card in pixels
|
||||
double card_height; ///< The height of a card in pixels
|
||||
StyleSheet();
|
||||
|
||||
GameP game; ///< The game this stylesheet is made for
|
||||
String full_name; ///< Name of this game, for menus etc.
|
||||
String icon_filename; ///< Filename of icon to use in NewWindow
|
||||
OptionalScript init_script; ///< Script of variables available to other scripts in this stylesheet
|
||||
double card_width; ///< The width of a card in pixels
|
||||
double card_height; ///< The height of a card in pixels
|
||||
double card_dpi; ///< The resolution of a card in dots per inch
|
||||
Color card_background; ///< The background color of cards
|
||||
/// The styling for card fields
|
||||
/** The indices should correspond to the set_fields in the Game */
|
||||
IndexMap<FieldP, StyleP> card_style;
|
||||
/// The styling for set info fields
|
||||
/** The indices should correspond to the set_fields in the Game */
|
||||
IndexMap<FieldP, StyleP> set_info_style;
|
||||
|
||||
static String typeNameStatic();
|
||||
virtual String typeName() const;
|
||||
virtual String fullName() const;
|
||||
virtual InputStreamP openIconFile();
|
||||
|
||||
/// Load a StyleSheet, given a Game and the name of the StyleSheet
|
||||
static StyleSheetP byGameAndName(const Game& game, const String& name);
|
||||
|
||||
/// name of the package without the game name
|
||||
String styleName();
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user