public PlainTextParser(string buildString) { BuildString = buildString; PowerSets = new UniqueList <string>(); CharacterInfo = new RawCharacterInfo(); BuilderApp = new BuilderApp(); }
void PatchGlyph(RawCharacterInfo character, int textureHeight, int textureWidth, ref Glyph g) { var scaleH = textureWidth / textureHeight > 1 ? textureWidth / textureHeight : 1; var scaleW = textureHeight / textureWidth > 1 ? textureHeight / textureWidth : 1; g.glyphRect = new GlyphRect( character.X * scaleW, (textureHeight - character.Y - character.Height) * scaleH, character.Width * scaleW, character.Height * scaleH ); g.metrics = new GlyphMetrics( character.Width, character.Height, character.Xoffset, -character.Yoffset, character.Xadvance ); }
public ImportFromBuildsave(string buildString) { BuildString = buildString; PowerSets = new UniqueList <string>(); CharacterInfo = new RawCharacterInfo(); }