mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Basic text rendering working;
Added Font (done) and SymbolFont (skeleton); Added styling to set; Added CountourMap; Some script fixes git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@73 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -19,6 +19,7 @@ DECLARE_POINTER_TYPE(Card);
|
||||
DECLARE_POINTER_TYPE(Set);
|
||||
DECLARE_POINTER_TYPE(Game);
|
||||
DECLARE_POINTER_TYPE(StyleSheet);
|
||||
DECLARE_POINTER_TYPE(Styling);
|
||||
DECLARE_POINTER_TYPE(Field);
|
||||
DECLARE_POINTER_TYPE(Value);
|
||||
class ScriptManager;
|
||||
@@ -44,6 +45,9 @@ class Set : public Packaged {
|
||||
/// The values on the fields of the set
|
||||
/** The indices should correspond to the set_fields in the Game */
|
||||
IndexMap<FieldP, ValueP> data;
|
||||
/// Extra values for specitic stylesheets, indexed by stylesheet name
|
||||
DECLARE_POINTER_TYPE(Styling);
|
||||
map<String, StylingP> styling_data;
|
||||
/// The cards in the set
|
||||
vector<CardP> cards;
|
||||
/// Code to use for apprentice (Magic only)
|
||||
@@ -57,10 +61,15 @@ class Set : public Packaged {
|
||||
/// A context for performing scripts on a particular card
|
||||
/** Should only be used from the main thread! */
|
||||
Context& getContext(const Card& card);
|
||||
/// Update styles for a card
|
||||
void updateFor(const CardP& card);
|
||||
|
||||
/// Stylesheet to use for a particular card
|
||||
StyleSheetP stylesheetFor(const CardP& card);
|
||||
|
||||
/// Styling information for a particular stylesheet
|
||||
IndexMap<FieldP, ValueP>& stylingDataFor(const StyleSheet&);
|
||||
|
||||
protected:
|
||||
virtual String typeName() const;
|
||||
virtual void validate(Version);
|
||||
@@ -71,6 +80,9 @@ class Set : public Packaged {
|
||||
scoped_ptr<ScriptManager> script_manager;
|
||||
};
|
||||
|
||||
inline int item_count(const Set& set) {
|
||||
return (int)set.cards.size();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : SetView
|
||||
|
||||
|
||||
Reference in New Issue
Block a user