mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -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:
@@ -33,6 +33,8 @@ void DataViewer::draw(RotatedDC& dc) {
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.SetBrush(set->stylesheet->card_background);
|
||||
dc.DrawRectangle(dc.getInternalRect());
|
||||
// update style scripts
|
||||
if (card) set->updateFor(card);
|
||||
// draw values
|
||||
FOR_EACH(v, viewers) { // draw low z index fields first
|
||||
if (v->getStyle()->visible) {// visible
|
||||
@@ -52,10 +54,11 @@ Context& DataViewer::getContext() const { return set->getContext(); }
|
||||
|
||||
// ----------------------------------------------------------------------------- : Setting data
|
||||
|
||||
void DataViewer::setCard(Card& card) {
|
||||
void DataViewer::setCard(const CardP& card) {
|
||||
assert(set);
|
||||
this->card = card;
|
||||
setStyles(set->stylesheet->card_style);
|
||||
setData(card.data);
|
||||
setData(card->data);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Viewers
|
||||
|
||||
@@ -54,7 +54,7 @@ class DataViewer : public SetView {
|
||||
// --------------------------------------------------- : Setting data
|
||||
|
||||
/// Display a card in this viewer
|
||||
void setCard(Card& card);
|
||||
void setCard(const CardP& card);
|
||||
|
||||
// --------------------------------------------------- : The viewers
|
||||
protected:
|
||||
@@ -74,7 +74,8 @@ class DataViewer : public SetView {
|
||||
virtual void onChange() {}
|
||||
|
||||
private:
|
||||
vector<ValueViewerP> viewers; ///< The viewers for the different values in the data
|
||||
vector<ValueViewerP> viewers; ///< The viewers for the different values in the data
|
||||
CardP card; ///< The card that is currently displayed, if any
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
Reference in New Issue
Block a user