mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -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:
@@ -214,6 +214,12 @@ class ScriptMap : public ScriptValue {
|
||||
|
||||
// ----------------------------------------------------------------------------- : Objects
|
||||
|
||||
/// Number of items in some collection like object, can be overloaded
|
||||
template <typename T>
|
||||
int item_count(const T& v) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// Script value containing an object (pointer)
|
||||
template <typename T>
|
||||
class ScriptObject : public ScriptValue {
|
||||
@@ -239,6 +245,10 @@ class ScriptObject : public ScriptValue {
|
||||
}
|
||||
}
|
||||
}
|
||||
virtual int itemCount() const {
|
||||
int i = item_count(*value);
|
||||
return i >= 0 ? i : ScriptValue::itemCount();
|
||||
}
|
||||
private:
|
||||
T value; ///< The object
|
||||
ScriptValueP getDefault() const {
|
||||
|
||||
Reference in New Issue
Block a user