mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Basic text rendering working;
Added Font (done) and SymbolFont (skeleton); Added styling to set; Added CountourMap; Some script fixes git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@73 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -35,7 +35,7 @@ void ColorValueViewer::draw(RotatedDC& dc) {
|
||||
dc.DrawRectangle(RealRect(style().left, style().top, 40, style().height));
|
||||
dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.DrawRectangle(style().getRect() + RealRect(40, 0, -40, 0));
|
||||
dc.DrawRectangle(style().getRect().move(40, 0, -40, 0));
|
||||
dc.DrawText(color_name, style().getPos() + RealSize(43, 3));
|
||||
} else {
|
||||
// do we need clipping?
|
||||
|
||||
@@ -7,5 +7,19 @@
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <render/value/text.hpp>
|
||||
#include <render/card/viewer.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- :
|
||||
// ----------------------------------------------------------------------------- : TextValueViewer
|
||||
|
||||
void TextValueViewer::draw(RotatedDC& dc) {
|
||||
drawFieldBorder(dc);
|
||||
v.draw(dc, value().value(), style(), viewer.getContext(), DRAW_NORMAL);
|
||||
}
|
||||
|
||||
void TextValueViewer::onValueChange() {
|
||||
v.reset();
|
||||
}
|
||||
|
||||
void TextValueViewer::onStyleChange() {
|
||||
v.reset();
|
||||
}
|
||||
|
||||
@@ -10,8 +10,24 @@
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <render/value/viewer.hpp>
|
||||
#include <render/text/viewer.hpp>
|
||||
#include <data/field/text.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- :
|
||||
// ----------------------------------------------------------------------------- : TextValueViewer
|
||||
|
||||
/// Viewer that displays a text value
|
||||
class TextValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Text) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void onValueChange();
|
||||
virtual void onStyleChange();
|
||||
|
||||
private:
|
||||
TextViewer v;
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
@@ -78,11 +78,12 @@ ValueViewerP BooleanStyle ::makeViewer(DataViewer& parent, const StyleP& t
|
||||
ValueViewerP MultipleChoiceStyle::makeViewer(DataViewer& parent, const StyleP& thisP) { return ValueViewerP(); }
|
||||
//ValueViewerP ColorStyle ::makeViewer(DataViewer& parent, const StyleP& thisP) { return ValueViewerP(); }
|
||||
//ValueViewerP ImageStyle ::makeViewer(DataViewer& parent, const StyleP& thisP) { return ValueViewerP(); }
|
||||
IMPLEMENT_MAKE_VIEWER(Text);
|
||||
IMPLEMENT_MAKE_VIEWER(Choice);
|
||||
IMPLEMENT_MAKE_VIEWER(Color);
|
||||
IMPLEMENT_MAKE_VIEWER(Image);
|
||||
ValueViewerP SymbolStyle ::makeViewer(DataViewer& parent, const StyleP& thisP) { return ValueViewerP(); }
|
||||
ValueViewerP TextStyle ::makeViewer(DataViewer& parent, const StyleP& thisP) { return ValueViewerP(); }
|
||||
//ValueViewerP TextStyle ::makeViewer(DataViewer& parent, const StyleP& thisP) { return ValueViewerP(); }
|
||||
|
||||
ValueEditorP ChoiceStyle ::makeEditor(DataEditor& parent, const StyleP& thisP) { return ValueEditorP(); }
|
||||
ValueEditorP BooleanStyle ::makeEditor(DataEditor& parent, const StyleP& thisP) { return ValueEditorP(); }
|
||||
|
||||
Reference in New Issue
Block a user