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
d02b12fc
Commit
d02b12fc
authored
Mar 18, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for informational headings in native look editor.
parent
dbb4bcac
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
395 additions
and
15 deletions
+395
-15
Makefile.am
Makefile.am
+3
-0
data/magic.mse-game/game
data/magic.mse-game/game
+6
-0
src/data/field.cpp
src/data/field.cpp
+2
-0
src/data/field/information.cpp
src/data/field/information.cpp
+77
-0
src/data/field/information.hpp
src/data/field/information.hpp
+79
-0
src/gui/control/native_look_editor.cpp
src/gui/control/native_look_editor.cpp
+21
-14
src/gui/value/editor.cpp
src/gui/value/editor.cpp
+2
-0
src/gui/value/editor.hpp
src/gui/value/editor.hpp
+3
-1
src/gui/value/information.cpp
src/gui/value/information.cpp
+17
-0
src/gui/value/information.hpp
src/gui/value/information.hpp
+28
-0
src/mse.vcproj
src/mse.vcproj
+90
-0
src/render/value/information.cpp
src/render/value/information.cpp
+36
-0
src/render/value/information.hpp
src/render/value/information.hpp
+29
-0
src/render/value/viewer.cpp
src/render/value/viewer.cpp
+2
-0
No files found.
Makefile.am
View file @
d02b12fc
...
@@ -30,6 +30,7 @@ magicseteditor_SOURCES += ./src/render/value/text.cpp
...
@@ -30,6 +30,7 @@ magicseteditor_SOURCES += ./src/render/value/text.cpp
magicseteditor_SOURCES
+=
./src/render/value/symbol.cpp
magicseteditor_SOURCES
+=
./src/render/value/symbol.cpp
magicseteditor_SOURCES
+=
./src/render/value/multiple_choice.cpp
magicseteditor_SOURCES
+=
./src/render/value/multiple_choice.cpp
magicseteditor_SOURCES
+=
./src/render/value/choice.cpp
magicseteditor_SOURCES
+=
./src/render/value/choice.cpp
magicseteditor_SOURCES
+=
./src/render/value/information.cpp
magicseteditor_SOURCES
+=
./src/gfx/rotate_image.cpp
magicseteditor_SOURCES
+=
./src/gfx/rotate_image.cpp
magicseteditor_SOURCES
+=
./src/gfx/color.cpp
magicseteditor_SOURCES
+=
./src/gfx/color.cpp
magicseteditor_SOURCES
+=
./src/gfx/bezier.cpp
magicseteditor_SOURCES
+=
./src/gfx/bezier.cpp
...
@@ -73,6 +74,7 @@ magicseteditor_SOURCES += ./src/gui/value/symbol.cpp
...
@@ -73,6 +74,7 @@ magicseteditor_SOURCES += ./src/gui/value/symbol.cpp
magicseteditor_SOURCES
+=
./src/gui/value/multiple_choice.cpp
magicseteditor_SOURCES
+=
./src/gui/value/multiple_choice.cpp
magicseteditor_SOURCES
+=
./src/gui/value/editor.cpp
magicseteditor_SOURCES
+=
./src/gui/value/editor.cpp
magicseteditor_SOURCES
+=
./src/gui/value/choice.cpp
magicseteditor_SOURCES
+=
./src/gui/value/choice.cpp
magicseteditor_SOURCES
+=
./src/gui/value/information.cpp
magicseteditor_SOURCES
+=
./src/gui/util.cpp
magicseteditor_SOURCES
+=
./src/gui/util.cpp
magicseteditor_SOURCES
+=
./src/gui/card_select_window.cpp
magicseteditor_SOURCES
+=
./src/gui/card_select_window.cpp
magicseteditor_SOURCES
+=
./src/gui/about_window.cpp
magicseteditor_SOURCES
+=
./src/gui/about_window.cpp
...
@@ -101,6 +103,7 @@ magicseteditor_SOURCES += ./src/data/field/text.cpp
...
@@ -101,6 +103,7 @@ magicseteditor_SOURCES += ./src/data/field/text.cpp
magicseteditor_SOURCES
+=
./src/data/field/symbol.cpp
magicseteditor_SOURCES
+=
./src/data/field/symbol.cpp
magicseteditor_SOURCES
+=
./src/data/field/multiple_choice.cpp
magicseteditor_SOURCES
+=
./src/data/field/multiple_choice.cpp
magicseteditor_SOURCES
+=
./src/data/field/choice.cpp
magicseteditor_SOURCES
+=
./src/data/field/choice.cpp
magicseteditor_SOURCES
+=
./src/data/field/information.cpp
magicseteditor_SOURCES
+=
./src/data/format/clipboard.cpp
magicseteditor_SOURCES
+=
./src/data/format/clipboard.cpp
magicseteditor_SOURCES
+=
./src/data/format/image.cpp
magicseteditor_SOURCES
+=
./src/data/format/image.cpp
magicseteditor_SOURCES
+=
./src/data/format/html.cpp
magicseteditor_SOURCES
+=
./src/data/format/html.cpp
...
...
data/magic.mse-game/game
View file @
d02b12fc
...
@@ -227,6 +227,9 @@ init script:
...
@@ -227,6 +227,9 @@ init script:
############################################################## Set fields
############################################################## Set fields
set field:
type: info
name: Set Information
set field:
set field:
type: text
type: text
name: title
name: title
...
@@ -244,6 +247,9 @@ set field:
...
@@ -244,6 +247,9 @@ set field:
type: symbol
type: symbol
name: symbol
name: symbol
description: The symbol for this set, double click to edit
description: The symbol for this set, double click to edit
set field:
type: info
name: Defaults and Automation
set field:
set field:
type: color
type: color
name: border color
name: border color
...
...
src/data/field.cpp
View file @
d02b12fc
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include <data/field/image.hpp>
#include <data/field/image.hpp>
#include <data/field/symbol.hpp>
#include <data/field/symbol.hpp>
#include <data/field/color.hpp>
#include <data/field/color.hpp>
#include <data/field/information.hpp>
#include <util/error.hpp>
#include <util/error.hpp>
// ----------------------------------------------------------------------------- : Field
// ----------------------------------------------------------------------------- : Field
...
@@ -69,6 +70,7 @@ shared_ptr<Field> read_new<Field>(Reader& reader) {
...
@@ -69,6 +70,7 @@ shared_ptr<Field> read_new<Field>(Reader& reader) {
else
if
(
type
==
_
(
"image"
))
return
new_shared
<
ImageField
>
();
else
if
(
type
==
_
(
"image"
))
return
new_shared
<
ImageField
>
();
else
if
(
type
==
_
(
"symbol"
))
return
new_shared
<
SymbolField
>
();
else
if
(
type
==
_
(
"symbol"
))
return
new_shared
<
SymbolField
>
();
else
if
(
type
==
_
(
"color"
))
return
new_shared
<
ColorField
>
();
else
if
(
type
==
_
(
"color"
))
return
new_shared
<
ColorField
>
();
else
if
(
type
==
_
(
"info"
))
return
new_shared
<
InfoField
>
();
else
{
else
{
throw
ParseError
(
_
(
"Unsupported field type: '"
)
+
type
+
_
(
"'"
));
throw
ParseError
(
_
(
"Unsupported field type: '"
)
+
type
+
_
(
"'"
));
}
}
...
...
src/data/field/information.cpp
0 → 100644
View file @
d02b12fc
//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
// ----------------------------------------------------------------------------- : Includes
#include <data/field/information.hpp>
#include <util/tagged_string.hpp>
#include <script/script.hpp>
// ----------------------------------------------------------------------------- : InfoField
IMPLEMENT_FIELD_TYPE
(
Info
)
String
InfoField
::
typeName
()
const
{
return
_
(
"info"
);
}
void
InfoField
::
initDependencies
(
Context
&
ctx
,
const
Dependency
&
dep
)
const
{
Field
::
initDependencies
(
ctx
,
dep
);
script
.
initDependencies
(
ctx
,
dep
);
}
IMPLEMENT_REFLECTION
(
InfoField
)
{
REFLECT_BASE
(
Field
);
REFLECT
(
script
);
}
// ----------------------------------------------------------------------------- : InfoStyle
InfoStyle
::
InfoStyle
(
const
InfoFieldP
&
field
)
:
Style
(
field
)
,
alignment
(
ALIGN_TOP_LEFT
)
,
padding_left
(
2
)
,
padding_right
(
2
)
,
padding_top
(
2
)
,
padding_bottom
(
2
)
,
background_color
(
255
,
255
,
255
)
{}
bool
InfoStyle
::
update
(
Context
&
ctx
)
{
return
Style
::
update
(
ctx
)
|
font
.
update
(
ctx
);
}
void
InfoStyle
::
initDependencies
(
Context
&
ctx
,
const
Dependency
&
dep
)
const
{
Style
::
initDependencies
(
ctx
,
dep
);
// font .initDependencies(ctx, dep);
}
IMPLEMENT_REFLECTION
(
InfoStyle
)
{
REFLECT_BASE
(
Style
);
REFLECT
(
font
);
REFLECT
(
alignment
);
REFLECT
(
padding_left
);
REFLECT
(
padding_right
);
REFLECT
(
padding_top
);
REFLECT
(
padding_bottom
);
REFLECT
(
background_color
);
}
// ----------------------------------------------------------------------------- : InfoValue
String
InfoValue
::
toString
()
const
{
return
value
;
}
bool
InfoValue
::
update
(
Context
&
ctx
)
{
Value
::
update
(
ctx
);
if
(
value
.
empty
())
value
=
field
().
name
;
return
field
().
script
.
invokeOn
(
ctx
,
value
);
}
IMPLEMENT_REFLECTION_NAMELESS
(
InfoValue
)
{
// never save
}
src/data/field/information.hpp
0 → 100644
View file @
d02b12fc
//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_DATA_FIELD_INFORMATION
#define HEADER_DATA_FIELD_INFORMATION
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <util/defaultable.hpp>
#include <data/field.hpp>
#include <data/font.hpp>
#include <script/scriptable.hpp>
// ----------------------------------------------------------------------------- : InfoField
DECLARE_POINTER_TYPE
(
InfoField
);
DECLARE_POINTER_TYPE
(
InfoStyle
);
DECLARE_POINTER_TYPE
(
InfoValue
);
/// A field for informational values.
/** These values are not editable, they are just headers, icons, labels, etc.
*/
class
InfoField
:
public
Field
{
public:
InfoField
()
{}
DECLARE_FIELD_TYPE
(
Text
);
OptionalScript
script
;
///< Script to apply to all values
virtual
void
initDependencies
(
Context
&
,
const
Dependency
&
)
const
;
private:
DECLARE_REFLECTION
();
};
// ----------------------------------------------------------------------------- : InfoStyle
/// The Style for a InfoField
class
InfoStyle
:
public
Style
{
public:
InfoStyle
(
const
InfoFieldP
&
);
DECLARE_STYLE_TYPE
(
Info
);
Font
font
;
///< Font to use for the text
Alignment
alignment
;
///< Alignment inside the box
double
padding_left
,
padding_right
;
///< Padding
double
padding_top
,
padding_bottom
;
Color
background_color
;
virtual
bool
update
(
Context
&
);
virtual
void
initDependencies
(
Context
&
,
const
Dependency
&
)
const
;
private:
DECLARE_REFLECTION
();
};
// ----------------------------------------------------------------------------- : InfoValue
/// The Value in a InfoField
class
InfoValue
:
public
Value
{
public:
inline
InfoValue
(
const
InfoFieldP
&
field
)
:
Value
(
field
)
{}
DECLARE_HAS_FIELD
(
Info
)
String
value
;
virtual
String
toString
()
const
;
virtual
bool
update
(
Context
&
);
private:
DECLARE_REFLECTION
();
};
// ----------------------------------------------------------------------------- : EOF
#endif
src/gui/control/native_look_editor.cpp
View file @
d02b12fc
...
@@ -30,18 +30,21 @@ void NativeLookEditor::draw(DC& dc) {
...
@@ -30,18 +30,21 @@ void NativeLookEditor::draw(DC& dc) {
}
}
void
NativeLookEditor
::
drawViewer
(
RotatedDC
&
dc
,
ValueViewer
&
v
)
{
void
NativeLookEditor
::
drawViewer
(
RotatedDC
&
dc
,
ValueViewer
&
v
)
{
if
(
!
shouldDraw
(
v
))
return
;
if
(
!
shouldDraw
(
v
))
return
;
// draw background
ValueEditor
*
e
=
v
.
getEditor
();
Style
&
s
=
*
v
.
getStyle
();
if
(
!
e
||
e
->
drawLabel
())
{
dc
.
SetPen
(
*
wxTRANSPARENT_PEN
);
// draw background
dc
.
SetBrush
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_WINDOW
));
Style
&
s
=
*
v
.
getStyle
();
dc
.
DrawRectangle
(
s
.
getRect
().
grow
(
1
));
dc
.
SetPen
(
*
wxTRANSPARENT_PEN
);
// draw label
dc
.
SetBrush
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_WINDOW
));
dc
.
SetFont
(
*
wxNORMAL_FONT
);
dc
.
DrawRectangle
(
s
.
getRect
().
grow
(
1
));
// TODO : tr using stylesheet or using game?
// draw label
dc
.
DrawText
(
tr
(
*
set
->
game
,
s
.
fieldP
->
name
,
capitalize_sentence
(
s
.
fieldP
->
name
)),
dc
.
SetFont
(
*
wxNORMAL_FONT
);
RealPoint
(
margin_left
,
s
.
top
+
1
));
// TODO : tr using stylesheet or using game?
// draw 3D border
dc
.
DrawText
(
tr
(
*
set
->
game
,
s
.
fieldP
->
name
,
capitalize_sentence
(
s
.
fieldP
->
name
)),
draw_control_border
(
this
,
dc
.
getDC
(),
RealRect
(
s
.
left
-
1
,
s
.
top
-
1
,
s
.
width
+
2
,
s
.
height
+
2
));
RealPoint
(
margin_left
,
s
.
top
+
1
));
// draw 3D border
draw_control_border
(
this
,
dc
.
getDC
(),
RealRect
(
s
.
left
-
1
,
s
.
top
-
1
,
s
.
width
+
2
,
s
.
height
+
2
));
}
// draw viewer
// draw viewer
v
.
draw
(
dc
);
v
.
draw
(
dc
);
}
}
...
@@ -55,11 +58,15 @@ void NativeLookEditor::resizeViewers() {
...
@@ -55,11 +58,15 @@ void NativeLookEditor::resizeViewers() {
// Set editor sizes
// Set editor sizes
FOR_EACH
(
v
,
viewers
)
{
FOR_EACH
(
v
,
viewers
)
{
StyleP
s
=
v
->
getStyle
();
StyleP
s
=
v
->
getStyle
();
s
->
left
=
margin
+
label_width
;
ValueEditor
*
e
=
v
->
getEditor
();
if
(
!
e
||
e
->
drawLabel
())
{
s
->
left
=
margin
+
label_width
;
}
else
{
s
->
left
=
margin
;
}
s
->
top
=
y
;
s
->
top
=
y
;
s
->
width
=
w
-
s
->
left
-
margin
;
s
->
width
=
w
-
s
->
left
-
margin
;
s
->
height
=
default_height
;
s
->
height
=
default_height
;
ValueEditor
*
e
=
v
->
getEditor
();
if
(
e
)
e
->
determineSize
();
if
(
e
)
e
->
determineSize
();
y
+=
s
->
height
+
vspace
;
y
+=
s
->
height
+
vspace
;
}
}
...
...
src/gui/value/editor.cpp
View file @
d02b12fc
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <gui/value/image.hpp>
#include <gui/value/image.hpp>
#include <gui/value/symbol.hpp>
#include <gui/value/symbol.hpp>
#include <gui/value/color.hpp>
#include <gui/value/color.hpp>
#include <gui/value/information.hpp>
// ----------------------------------------------------------------------------- : ValueEditor
// ----------------------------------------------------------------------------- : ValueEditor
...
@@ -30,3 +31,4 @@ IMPLEMENT_MAKE_EDITOR(MultipleChoice);
...
@@ -30,3 +31,4 @@ IMPLEMENT_MAKE_EDITOR(MultipleChoice);
IMPLEMENT_MAKE_EDITOR
(
Color
);
IMPLEMENT_MAKE_EDITOR
(
Color
);
IMPLEMENT_MAKE_EDITOR
(
Image
);
IMPLEMENT_MAKE_EDITOR
(
Image
);
IMPLEMENT_MAKE_EDITOR
(
Symbol
);
IMPLEMENT_MAKE_EDITOR
(
Symbol
);
IMPLEMENT_MAKE_EDITOR
(
Info
);
src/gui/value/editor.hpp
View file @
d02b12fc
...
@@ -98,8 +98,10 @@ class ValueEditor {
...
@@ -98,8 +98,10 @@ class ValueEditor {
/// The cursor type to use when the mouse is over this control
/// The cursor type to use when the mouse is over this control
virtual
wxCursor
cursor
()
const
{
return
wxCursor
();
}
virtual
wxCursor
cursor
()
const
{
return
wxCursor
();
}
///
d
etermines prefered size in the native look, update the style
///
D
etermines prefered size in the native look, update the style
virtual
void
determineSize
(
bool
force_fit
=
false
)
{}
virtual
void
determineSize
(
bool
force_fit
=
false
)
{}
/// Should a label and control border be drawn in the native look?
virtual
bool
drawLabel
()
const
{
return
true
;
}
/// The editor is shown or hidden
/// The editor is shown or hidden
virtual
void
onShow
(
bool
)
{}
virtual
void
onShow
(
bool
)
{}
...
...
src/gui/value/information.cpp
0 → 100644
View file @
d02b12fc
//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
// ----------------------------------------------------------------------------- : Includes
#include <gui/value/information.hpp>
// ----------------------------------------------------------------------------- : InfoValueEditor
IMPLEMENT_VALUE_EDITOR
(
Info
)
{}
void
InfoValueEditor
::
determineSize
(
bool
)
{
style
().
height
=
26
;
}
src/gui/value/information.hpp
0 → 100644
View file @
d02b12fc
//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_GUI_VALUE_INFORMATION
#define HEADER_GUI_VALUE_INFORMATION
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <gui/value/editor.hpp>
#include <render/value/information.hpp>
// ----------------------------------------------------------------------------- : InfoValueEditor
/// An editor 'control' for editing InfoValues
class
InfoValueEditor
:
public
InfoValueViewer
,
public
ValueEditor
{
public:
DECLARE_VALUE_EDITOR
(
Info
);
virtual
void
determineSize
(
bool
);
virtual
bool
drawLabel
()
const
{
return
false
;
}
};
// ----------------------------------------------------------------------------- : EOF
#endif
src/mse.vcproj
View file @
d02b12fc
...
@@ -1045,6 +1045,12 @@
...
@@ -1045,6 +1045,12 @@
<File
<File
RelativePath=
".\gui\value\image.hpp"
>
RelativePath=
".\gui\value\image.hpp"
>
</File>
</File>
<File
RelativePath=
".\gui\value\information.cpp"
>
</File>
<File
RelativePath=
".\gui\value\information.hpp"
>
</File>
<File
<File
RelativePath=
".\gui\value\multiple_choice.cpp"
>
RelativePath=
".\gui\value\multiple_choice.cpp"
>
<FileConfiguration
<FileConfiguration
...
@@ -1492,6 +1498,48 @@
...
@@ -1492,6 +1498,48 @@
<File
<File
RelativePath=
".\data\field\image.hpp"
>
RelativePath=
".\data\field\image.hpp"
>
</File>
</File>
<File
RelativePath=
".\data\field\information.cpp"
>
<FileConfiguration
Name=
"Debug|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)1.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Release|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)1.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Debug Unicode|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)1.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Release Unicode|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)1.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Release Profile Unicode|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)1.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Release Unicode fast build|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)1.obj"
/>
</FileConfiguration>
</File>
<File
RelativePath=
".\data\field\information.hpp"
>
</File>
<File
<File
RelativePath=
".\data\field\multiple_choice.cpp"
>
RelativePath=
".\data\field\multiple_choice.cpp"
>
</File>
</File>
...
@@ -2283,6 +2331,48 @@
...
@@ -2283,6 +2331,48 @@
<File
<File
RelativePath=
".\render\value\image.hpp"
>
RelativePath=
".\render\value\image.hpp"
>
</File>
</File>
<File
RelativePath=
".\render\value\information.cpp"
>
<FileConfiguration
Name=
"Debug|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)2.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Release|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)2.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Debug Unicode|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)2.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Release Unicode|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)2.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Release Profile Unicode|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)2.obj"
/>
</FileConfiguration>
<FileConfiguration
Name=
"Release Unicode fast build|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
ObjectFile=
"$(IntDir)/$(InputName)2.obj"
/>
</FileConfiguration>
</File>
<File
RelativePath=
".\render\value\information.hpp"
>
</File>
<File
<File
RelativePath=
".\render\value\multiple_choice.cpp"
>
RelativePath=
".\render\value\multiple_choice.cpp"
>
<FileConfiguration
<FileConfiguration
...
...
src/render/value/information.cpp
0 → 100644
View file @
d02b12fc
//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
// ----------------------------------------------------------------------------- : Includes
#include <render/value/information.hpp>
#include <render/card/viewer.hpp>
// ----------------------------------------------------------------------------- : InfoValueViewer
void
InfoValueViewer
::
draw
(
RotatedDC
&
dc
)
{
if
(
nativeLook
())
{
dc
.
SetTextForeground
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_WINDOWTEXT
));
dc
.
SetBrush
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_APPWORKSPACE
));
dc
.
SetFont
(
wxFont
(
16
,
wxFONTFAMILY_SWISS
,
wxFONTSTYLE_NORMAL
,
wxFONTWEIGHT_NORMAL
,
false
,
_
(
"Arial"
)));
}
else
{
dc
.
SetTextForeground
(
style
().
font
.
color
);
dc
.
SetBrush
(
style
().
background_color
);
dc
.
SetFont
(
style
().
font
.
font
,
style
().
font
.
size
);
}
// draw background
RealRect
rect
=
style
().
getRect
();
dc
.
DrawRectangle
(
rect
.
grow
(
2
));
// draw text
rect
=
rect
.
move
(
style
().
padding_left
,
style
().
padding_top
,
-
style
().
padding_left
-
style
().
padding_right
,
-
style
().
padding_top
-
style
().
padding_bottom
);
RealSize
size
=
dc
.
GetTextExtent
(
value
().
value
);
dc
.
DrawText
(
value
().
value
,
align_in_rect
(
style
().
alignment
,
size
,
rect
));
}
src/render/value/information.hpp
0 → 100644
View file @
d02b12fc
//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_RENDER_VALUE_INFORMATION
#define HEADER_RENDER_VALUE_INFORMATION
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <render/value/viewer.hpp>
#include <render/text/viewer.hpp>
#include <data/field/information.hpp>
// ----------------------------------------------------------------------------- : InfoValueViewer
/// Viewer that displays a text value
class
InfoValueViewer
:
public
ValueViewer
{
public:
DECLARE_VALUE_VIEWER
(
Info
)
:
ValueViewer
(
parent
,
style
)
{}
virtual
void
draw
(
RotatedDC
&
dc
);
};
// ----------------------------------------------------------------------------- : EOF
#endif
src/render/value/viewer.cpp
View file @
d02b12fc
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <render/value/image.hpp>
#include <render/value/image.hpp>
#include <render/value/symbol.hpp>
#include <render/value/symbol.hpp>
#include <render/value/color.hpp>
#include <render/value/color.hpp>
#include <render/value/information.hpp>
#include <render/card/viewer.hpp>
#include <render/card/viewer.hpp>
// ----------------------------------------------------------------------------- : ValueViewer
// ----------------------------------------------------------------------------- : ValueViewer
...
@@ -68,3 +69,4 @@ IMPLEMENT_MAKE_VIEWER(MultipleChoice);
...
@@ -68,3 +69,4 @@ IMPLEMENT_MAKE_VIEWER(MultipleChoice);
IMPLEMENT_MAKE_VIEWER
(
Color
);
IMPLEMENT_MAKE_VIEWER
(
Color
);
IMPLEMENT_MAKE_VIEWER
(
Image
);
IMPLEMENT_MAKE_VIEWER
(
Image
);
IMPLEMENT_MAKE_VIEWER
(
Symbol
);
IMPLEMENT_MAKE_VIEWER
(
Symbol
);
IMPLEMENT_MAKE_VIEWER
(
Info
);
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