Cleaned up Set::Styling/Card::Styling by spliting that functionality into a 'DelayedIndexMaps' class;

Added 'right' and 'bottom' properties to style as an alternative way of specifying width/height;
Added content_width, content_height and content_lines properties that give feedback on text rendering;
Always show warnings when showing errors and vice-versa, this prevents script errors from appearing before the reader/parse error that caused them;
Finally some preliminairy work on export templates

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@428 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-06-22 23:12:41 +00:00
parent 97e0e8d6d6
commit e46cbe66b2
33 changed files with 384 additions and 138 deletions
+13 -3
View File
@@ -54,7 +54,17 @@ void DataViewer::draw(RotatedDC& dc, const Color& background) {
} catch (const Error& e) {
handle_error(e, false, false);
}
// draw values
// prepare viewers
FOR_EACH(v, viewers) { // draw low z index fields first
if (v->getStyle()->visible) {
try {
v->prepare(dc);
} catch (const Error& e) {
handle_error(e, false, false);
}
}
}
// draw viewers
FOR_EACH(v, viewers) { // draw low z index fields first
if (v->getStyle()->visible) {// visible
try {
@@ -133,8 +143,8 @@ void DataViewer::addStyles(IndexMap<FieldP,StyleP>& styles) {
FOR_EACH(s, styles) {
if ((s->visible || s->visible.isScripted()) &&
nativeLook() || (
(s->width || s->width .isScripted()) &&
(s->height || s->height .isScripted()))) {
(s->width || s->width .isScripted() || s->right || s->right .isScripted()) &&
(s->height || s->height .isScripted() || s->bottom || s->bottom.isScripted()))) {
// no need to make a viewer for things that are always invisible
ValueViewerP viewer = makeViewer(s);
if (viewer) viewers.push_back(viewer);