mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Added <soft> tag that takes up no space for alignment purposes;
used this tag for magic creature types; Added correct handling of Tribal sub types; Fixed sort_index use by spoiler export template git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@637 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -42,10 +42,16 @@ enum LineBreak
|
||||
|
||||
/// Information on a character in a TextElement
|
||||
struct CharInfo {
|
||||
RealSize size;
|
||||
LineBreak break_after;
|
||||
RealSize size; ///< Size of this character
|
||||
LineBreak break_after : 31; ///< How/when to break after it?
|
||||
bool soft : 1; ///< Is this a 'soft' character? soft characters are ignored for alignment
|
||||
|
||||
inline CharInfo(RealSize size, LineBreak break_after) : size(size), break_after(break_after) {}
|
||||
explicit CharInfo()
|
||||
: break_after(BREAK_NO), soft(true)
|
||||
{}
|
||||
inline CharInfo(RealSize size, LineBreak break_after, bool soft = false)
|
||||
: size(size), break_after(break_after), soft(soft)
|
||||
{}
|
||||
};
|
||||
|
||||
/// A section of text that can be rendered using a TextViewer
|
||||
@@ -74,7 +80,7 @@ class TextElement : public IntrusivePtrBase<TextElement> {
|
||||
// ----------------------------------------------------------------------------- : TextElements
|
||||
|
||||
/// A list of text elements
|
||||
class TextElements : public vector<TextElementP> {
|
||||
class TextElements {
|
||||
public:
|
||||
/// Draw all the elements (as need to show the range start..end)
|
||||
void draw (RotatedDC& dc, double scale, const RealRect& rect, const double* xs, DrawWhat what, size_t start, size_t end) const;
|
||||
|
||||
Reference in New Issue
Block a user