mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Delayed updating of scripts on keyword changes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@383 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -58,9 +58,12 @@ class SetScriptManager : public SetScriptContext, public ActionListener {
|
||||
SetScriptManager(Set& set);
|
||||
~SetScriptManager();
|
||||
|
||||
// Update all styles for a particular card
|
||||
/// Update all styles for a particular card
|
||||
void updateStyles(const CardP& card);
|
||||
|
||||
/// Update expensive things that were previously delayed
|
||||
void updateDelayed();
|
||||
|
||||
/// Update all fields of all cards
|
||||
/** Update all set info fields
|
||||
* Doesn't update styles
|
||||
@@ -93,6 +96,13 @@ class SetScriptManager : public SetScriptContext, public ActionListener {
|
||||
/// Schedule all things in deps to be updated by adding them to to_update
|
||||
void alsoUpdate(deque<ToUpdate>& to_update, const vector<Dependency>& deps, const CardP& card);
|
||||
|
||||
/// Delayed update for (bitmask)...
|
||||
enum Delay
|
||||
{ DELAY_KEYWORDS = 0x01
|
||||
, DELAY_CARDS = 0x02
|
||||
};
|
||||
int delay;
|
||||
|
||||
protected:
|
||||
/// Respond to actions by updating scripts
|
||||
void onAction(const Action&, bool undone);
|
||||
|
||||
Reference in New Issue
Block a user