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
b3f79483
Commit
b3f79483
authored
Dec 20, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stylesheet and export template have a dependency on the game
parent
18110496
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
0 deletions
+21
-0
src/data/export_template.cpp
src/data/export_template.cpp
+9
-0
src/data/export_template.hpp
src/data/export_template.hpp
+1
-0
src/data/stylesheet.cpp
src/data/stylesheet.cpp
+9
-0
src/data/stylesheet.hpp
src/data/stylesheet.hpp
+2
-0
No files found.
src/data/export_template.cpp
View file @
b3f79483
...
@@ -20,6 +20,15 @@ ExportTemplate::ExportTemplate()
...
@@ -20,6 +20,15 @@ ExportTemplate::ExportTemplate()
String
ExportTemplate
::
typeNameStatic
()
{
return
_
(
"export-template"
);
}
String
ExportTemplate
::
typeNameStatic
()
{
return
_
(
"export-template"
);
}
String
ExportTemplate
::
typeName
()
const
{
return
_
(
"export-template"
);
}
String
ExportTemplate
::
typeName
()
const
{
return
_
(
"export-template"
);
}
void
ExportTemplate
::
validate
(
Version
)
{
if
(
!
game
)
{
throw
Error
(
_ERROR_
(
"no game specified for export template"
));
}
// an export template depends on the game it is made for
requireDependency
(
game
.
get
());
}
IMPLEMENT_REFLECTION
(
ExportTemplate
)
{
IMPLEMENT_REFLECTION
(
ExportTemplate
)
{
REFLECT_BASE
(
Packaged
);
REFLECT_BASE
(
Packaged
);
REFLECT
(
game
);
REFLECT
(
game
);
...
...
src/data/export_template.hpp
View file @
b3f79483
...
@@ -35,6 +35,7 @@ class ExportTemplate : public Packaged {
...
@@ -35,6 +35,7 @@ class ExportTemplate : public Packaged {
static
String
typeNameStatic
();
static
String
typeNameStatic
();
virtual
String
typeName
()
const
;
virtual
String
typeName
()
const
;
virtual
void
validate
(
Version
=
app_version
);
private:
private:
DECLARE_REFLECTION
();
DECLARE_REFLECTION
();
};
};
...
...
src/data/stylesheet.cpp
View file @
b3f79483
...
@@ -63,6 +63,15 @@ String StyleSheet::stylesheetName() const {
...
@@ -63,6 +63,15 @@ String StyleSheet::stylesheetName() const {
String
StyleSheet
::
typeNameStatic
()
{
return
_
(
"style"
);
}
String
StyleSheet
::
typeNameStatic
()
{
return
_
(
"style"
);
}
String
StyleSheet
::
typeName
()
const
{
return
_
(
"style"
);
}
String
StyleSheet
::
typeName
()
const
{
return
_
(
"style"
);
}
void
StyleSheet
::
validate
(
Version
)
{
if
(
!
game
)
{
throw
Error
(
_ERROR_
(
"no game specified for stylesheet"
));
}
// a stylsheet depends on the game it is made for
requireDependency
(
game
.
get
());
}
StyleP
StyleSheet
::
styleFor
(
const
FieldP
&
field
)
{
StyleP
StyleSheet
::
styleFor
(
const
FieldP
&
field
)
{
if
(
card_style
.
containsKey
(
field
))
{
if
(
card_style
.
containsKey
(
field
))
{
return
card_style
[
field
];
return
card_style
[
field
];
...
...
src/data/stylesheet.hpp
View file @
b3f79483
...
@@ -64,6 +64,8 @@ class StyleSheet : public Packaged {
...
@@ -64,6 +64,8 @@ class StyleSheet : public Packaged {
static
String
typeNameStatic
();
static
String
typeNameStatic
();
virtual
String
typeName
()
const
;
virtual
String
typeName
()
const
;
/// Validate the stylesheet
virtual
void
validate
(
Version
=
app_version
);
protected:
protected:
...
...
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