Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
8319b4f4
Commit
8319b4f4
authored
Apr 30, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed cursor position before <atom>s
parent
cab41362
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
38 deletions
+1
-38
src/script/script_manager.cpp
src/script/script_manager.cpp
+0
-37
src/util/tagged_string.cpp
src/util/tagged_string.cpp
+1
-1
No files found.
src/script/script_manager.cpp
View file @
8319b4f4
...
...
@@ -316,42 +316,5 @@ void SetScriptManager::alsoUpdate(deque<ToUpdate>& to_update, const vector<Depen
}
default
:
assert
(
false
);
}
/* if (d.type == DependendScript.setField) {
// from set data
ValueP value = set->data.at(ds.index);
toUpdate.push_back(ToUpdate(&*value));
} else if (ds.type == DependendScript.cardField) {
// from the same card's data
assert(card);
ValueP value = card->data.at(ds.index);
toUpdate.push_back(ToUpdate(&*value, card));
} else if (ds.type == DependendScript.cardsField) {
// something invalidates a card value for all cards, so all cards need updating
FOR_EACH(card, set)->cards {
ValueP value = card->data.at(ds.index);
toUpdate.push_back(ToUpdate(&*value, card));
}
} else if (ds.type >= DependendScript.choiceImage) {
// a generated image has become invalid, there is not much we can do
// because the index is not exact enough, it only gives the field
// TODO : Indicate what style
//CardStyleP style = set->styleOf(card) // WRONG?
CardStyle* style = CardStyle.getByIndex(ds.type - DependendScript.choiceImage);
StyleP s = style->cardStyle.at(ds.index);
s->invalidate();
// something changed, send event
ScriptStyleEvent change(&*s);
set->actions.tellListeners(change);
} else if (ds.type == DependendScript.cardCopyDep) {
// propagate dependencies from another field
FieldP f = game->cardFields#(ds.index);
alsoUpdate(toUpdate, f->dependendScripts, card);
} else if (ds.type == DependendScript.setCopyDep) {
// propagate dependencies from another field
FieldP f = game->setFields#(ds.index);
alsoUpdate(toUpdate, f->dependendScripts, card);
} else {
assert(false); // only setField, cardField and cardsField should be possible
}*/
}
}
src/util/tagged_string.cpp
View file @
8319b4f4
...
...
@@ -264,7 +264,7 @@ void cursor_to_index_range(const String& str, size_t cursor, size_t& start, size
// a tag
if
(
is_substr
(
str
,
i
,
_
(
"<atom"
))
||
is_substr
(
str
,
i
,
_
(
"<sep"
)))
{
// never move the end over an atom/sep
if
(
cur
>=
cursor
)
break
;
if
(
cur
>=
cursor
)
{
++
i
;
break
;
}
// skip tag contents, tag counts as a single 'character'
i
=
match_close_tag_end
(
str
,
i
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment