mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Implement unique IDs and card linking
This commit is contained in:
@@ -78,7 +78,7 @@ private:
|
||||
if (is_tag(text, tag_start, _( "<b"))) bold += 1;
|
||||
else if (is_tag(text, tag_start, _("</b"))) bold -= 1;
|
||||
else if (is_tag(text, tag_start, _( "<i"))) italic += 1;
|
||||
else if (is_tag(text, tag_start, _("</i"))) italic -= 1;
|
||||
else if (is_tag(text, tag_start, _("</i"))) italic -= 1;
|
||||
else if (is_tag(text, tag_start, _("<u"))) underline += 1;
|
||||
else if (is_tag(text, tag_start, _("</u"))) underline -= 1;
|
||||
else if (is_tag(text, tag_start, _( "<sym"))) symbol += 1;
|
||||
@@ -301,7 +301,7 @@ private:
|
||||
(kwpph > 0 ? FONT_SOFT : FONT_NORMAL) |
|
||||
(code > 0 ? FONT_CODE : FONT_NORMAL) |
|
||||
(code_kw > 0 ? FONT_CODE_KW : FONT_NORMAL) |
|
||||
(code_string > 0 ? FONT_CODE_STRING : FONT_NORMAL),
|
||||
(code_string > 0 ? FONT_CODE_STRING : FONT_NORMAL),
|
||||
underline > 0,
|
||||
fonts.empty() ? nullptr : &fonts.back(),
|
||||
param > 0 || param_ref > 0
|
||||
|
||||
@@ -49,9 +49,10 @@ bool prepare_choice_viewer(RotatedDC& dc, ValueViewer& viewer, ChoiceStyle& styl
|
||||
RealSize size;
|
||||
img.generateCached(img_options, &style.mask, &combine, &bitmap, &image, &size);
|
||||
// store content properties
|
||||
if (style.content_width != size.width || style.content_height != size.height) {
|
||||
style.content_width = size.width / dc.getZoom();
|
||||
style.content_height = size.height / dc.getZoom();
|
||||
double zoom = dc.getZoom();
|
||||
if (style.content_width != size.width / zoom || style.content_height != size.height / zoom) {
|
||||
style.content_width = size.width / zoom;
|
||||
style.content_height = size.height / zoom;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ Bitmap ImageValueViewer::imagePlaceholder(const Rotation& rot, UInt w, UInt h, c
|
||||
if (!default_image.Ok()) {
|
||||
draw_checker(dc, rect);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
if (default_image.HasAlpha()) bmp.UseAlpha(true);
|
||||
dc.DrawImage(default_image, RealPoint(0,0));
|
||||
}
|
||||
|
||||
@@ -34,16 +34,16 @@ void InfoValueViewer::draw(RotatedDC& dc) {
|
||||
style().padding_top,
|
||||
-style().padding_left - style().padding_right,
|
||||
-style().padding_top - style().padding_bottom
|
||||
);
|
||||
// for some reason, while inside the style tab, this value is empty
|
||||
// so as a hack for now, if the value is empty, go fetch the caption instead
|
||||
if (value().value.empty()) {
|
||||
RealSize size = dc.GetTextExtent(field().caption.get());
|
||||
dc.DrawText(field().caption.get(), align_in_rect(style().alignment, size, rect));
|
||||
}
|
||||
// this is what should happen
|
||||
else {
|
||||
RealSize size = dc.GetTextExtent(value().value);
|
||||
dc.DrawText(value().value, align_in_rect(style().alignment, size, rect));
|
||||
);
|
||||
// for some reason, while inside the style tab, this value is empty
|
||||
// so as a hack for now, if the value is empty, go fetch the caption instead
|
||||
if (value().value.empty()) {
|
||||
RealSize size = dc.GetTextExtent(field().caption.get());
|
||||
dc.DrawText(field().caption.get(), align_in_rect(style().alignment, size, rect));
|
||||
}
|
||||
// this is what should happen
|
||||
else {
|
||||
RealSize size = dc.GetTextExtent(value().value);
|
||||
dc.DrawText(value().value, align_in_rect(style().alignment, size, rect));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user