mirror of
https://github.com/dcronqvist/DotTiled.git
synced 2025-05-08 22:06:03 +03:00
Merge 586ce5b26f
into 7f78a971f9
This commit is contained in:
commit
06266bb644
1 changed files with 6 additions and 6 deletions
|
@ -244,13 +244,13 @@ public abstract partial class TmxReaderBase
|
||||||
// Attributes
|
// Attributes
|
||||||
var fontFamily = _reader.GetOptionalAttribute("fontfamily") ?? "sans-serif";
|
var fontFamily = _reader.GetOptionalAttribute("fontfamily") ?? "sans-serif";
|
||||||
var pixelSize = _reader.GetOptionalAttributeParseable<int>("pixelsize") ?? 16;
|
var pixelSize = _reader.GetOptionalAttributeParseable<int>("pixelsize") ?? 16;
|
||||||
var wrap = _reader.GetOptionalAttributeParseable<bool>("wrap") ?? false;
|
var wrap = _reader.GetOptionalAttributeParseable<uint>("wrap").GetValueOr(0) == 1;
|
||||||
var color = _reader.GetOptionalAttributeClass<Color>("color") ?? Color.Parse("#000000", CultureInfo.InvariantCulture);
|
var color = _reader.GetOptionalAttributeClass<Color>("color") ?? Color.Parse("#000000", CultureInfo.InvariantCulture);
|
||||||
var bold = _reader.GetOptionalAttributeParseable<bool>("bold") ?? false;
|
var bold = _reader.GetOptionalAttributeParseable<uint>("bold").GetValueOr(0) == 1;
|
||||||
var italic = _reader.GetOptionalAttributeParseable<bool>("italic") ?? false;
|
var italic = _reader.GetOptionalAttributeParseable<uint>("italic").GetValueOr(0) == 1;
|
||||||
var underline = _reader.GetOptionalAttributeParseable<bool>("underline") ?? false;
|
var underline = _reader.GetOptionalAttributeParseable<uint>("underline").GetValueOr(0) == 1;
|
||||||
var strikeout = _reader.GetOptionalAttributeParseable<bool>("strikeout") ?? false;
|
var strikeout = _reader.GetOptionalAttributeParseable<uint>("strikeout").GetValueOr(0) == 1;
|
||||||
var kerning = _reader.GetOptionalAttributeParseable<bool>("kerning") ?? true;
|
var kerning = _reader.GetOptionalAttributeParseable<uint>("kerning").GetValueOr(1) == 1;
|
||||||
var hAlign = _reader.GetOptionalAttributeEnum<TextHorizontalAlignment>("halign", s => s switch
|
var hAlign = _reader.GetOptionalAttributeEnum<TextHorizontalAlignment>("halign", s => s switch
|
||||||
{
|
{
|
||||||
"left" => TextHorizontalAlignment.Left,
|
"left" => TextHorizontalAlignment.Left,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue