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
9c5f0a41
Commit
9c5f0a41
authored
May 13, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
script for match string of keywords
parent
e1e6d9fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
0 deletions
+6
-0
src/data/game.cpp
src/data/game.cpp
+1
-0
src/data/game.hpp
src/data/game.hpp
+1
-0
src/gui/set/keywords_panel.cpp
src/gui/set/keywords_panel.cpp
+1
-0
src/script/script_manager.cpp
src/script/script_manager.cpp
+3
-0
No files found.
src/data/game.cpp
View file @
9c5f0a41
...
@@ -49,6 +49,7 @@ IMPLEMENT_REFLECTION(Game) {
...
@@ -49,6 +49,7 @@ IMPLEMENT_REFLECTION(Game) {
REFLECT_NO_SCRIPT
(
statistics_dimensions
);
REFLECT_NO_SCRIPT
(
statistics_dimensions
);
REFLECT_NO_SCRIPT
(
statistics_categories
);
REFLECT_NO_SCRIPT
(
statistics_categories
);
REFLECT_NO_SCRIPT
(
pack_types
);
REFLECT_NO_SCRIPT
(
pack_types
);
REFLECT_NO_SCRIPT
(
keyword_match_script
);
REFLECT
(
has_keywords
);
REFLECT
(
has_keywords
);
REFLECT
(
keyword_modes
);
REFLECT
(
keyword_modes
);
REFLECT
(
keyword_parameter_types
);
REFLECT
(
keyword_parameter_types
);
...
...
src/data/game.hpp
View file @
9c5f0a41
...
@@ -44,6 +44,7 @@ class Game : public Packaged {
...
@@ -44,6 +44,7 @@ class Game : public Packaged {
vector
<
PackTypeP
>
pack_types
;
///< Types of random card packs to generate
vector
<
PackTypeP
>
pack_types
;
///< Types of random card packs to generate
bool
has_keywords
;
///< Does this game use keywords?
bool
has_keywords
;
///< Does this game use keywords?
OptionalScript
keyword_match_script
;
///< For the keyword editor
vector
<
KeywordParamP
>
keyword_parameter_types
;
///< Types of keyword parameters
vector
<
KeywordParamP
>
keyword_parameter_types
;
///< Types of keyword parameters
vector
<
KeywordModeP
>
keyword_modes
;
///< Modes of keywords
vector
<
KeywordModeP
>
keyword_modes
;
///< Modes of keywords
vector
<
KeywordP
>
keywords
;
///< Keywords for use in text
vector
<
KeywordP
>
keywords
;
///< Keywords for use in text
...
...
src/gui/set/keywords_panel.cpp
View file @
9c5f0a41
...
@@ -259,6 +259,7 @@ void KeywordsPanel::onChangeSet() {
...
@@ -259,6 +259,7 @@ void KeywordsPanel::onChangeSet() {
match
->
getStyle
().
font
.
size
=
12
;
match
->
getStyle
().
font
.
size
=
12
;
match
->
getStyle
().
padding_bottom
=
1
;
match
->
getStyle
().
padding_bottom
=
1
;
match
->
updateSize
();
match
->
updateSize
();
match
->
getField
().
script
=
set
->
game
->
keyword_match_script
;
reminder
->
setSet
(
set
);
reminder
->
setSet
(
set
);
reminder
->
getStyle
().
padding_bottom
=
2
;
reminder
->
getStyle
().
padding_bottom
=
2
;
match
->
getStyle
().
font
.
size
=
10
;
match
->
getStyle
().
font
.
size
=
10
;
...
...
src/script/script_manager.cpp
View file @
9c5f0a41
...
@@ -136,6 +136,9 @@ void SetScriptManager::onAction(const Action& action, bool undone) {
...
@@ -136,6 +136,9 @@ void SetScriptManager::onAction(const Action& action, bool undone) {
KeywordTextValue
*
value
=
dynamic_cast
<
KeywordTextValue
*>
(
action
.
valueP
.
get
());
KeywordTextValue
*
value
=
dynamic_cast
<
KeywordTextValue
*>
(
action
.
valueP
.
get
());
if
(
value
)
{
if
(
value
)
{
if
(
value
->
underlying
==
&
value
->
keyword
.
match
)
{
if
(
value
->
underlying
==
&
value
->
keyword
.
match
)
{
// script
Context
&
ctx
=
getContext
(
set
.
stylesheet
);
value
->
update
(
ctx
);
// changed the 'match' string of a keyword, rebuild database and regex so matching is correct
// changed the 'match' string of a keyword, rebuild database and regex so matching is correct
value
->
keyword
.
prepare
(
set
.
game
->
keyword_parameter_types
,
true
);
value
->
keyword
.
prepare
(
set
.
game
->
keyword_parameter_types
,
true
);
set
.
keyword_db
.
clear
();
set
.
keyword_db
.
clear
();
...
...
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