mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
combined_editor function, and improved dependency handling (removing duplicates), viewer refreshes on events from script manager
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@147 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -95,8 +95,11 @@ String TextValue::toString() const {
|
||||
}
|
||||
bool TextValue::update(Context& ctx) {
|
||||
Value::update(ctx);
|
||||
return field().default_script.invokeOnDefault(ctx, value)
|
||||
| field(). script.invokeOn(ctx, value);
|
||||
WITH_DYNAMIC_ARG(last_update_age, last_update.get());
|
||||
bool change = field().default_script.invokeOnDefault(ctx, value)
|
||||
| field(). script.invokeOn(ctx, value);
|
||||
if (change) last_update.update();
|
||||
return change;
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION_NAMELESS(TextValue) {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <util/prec.hpp>
|
||||
#include <util/defaultable.hpp>
|
||||
#include <util/rotation.hpp>
|
||||
#include <util/age.hpp>
|
||||
#include <data/field.hpp>
|
||||
#include <data/font.hpp>
|
||||
#include <data/symbol_font.hpp>
|
||||
@@ -88,6 +89,7 @@ class TextValue : public Value {
|
||||
|
||||
typedef Defaultable<String> ValueType;
|
||||
ValueType value; ///< The text of this value
|
||||
Age last_update; ///< When was the text last changed?
|
||||
|
||||
virtual String toString() const;
|
||||
virtual bool update(Context&);
|
||||
|
||||
Reference in New Issue
Block a user