public override void Render(GBitmap screen) { if (IsFocused) { if (_isLastAddition > 0) { GFont.Write(screen, "<", 2, X, Y); GFont.Write(screen, " >", 1, X, Y + GFont.GetLetterDimension(2) / 4); } else if (_isLastSubtraction > 0) { GFont.Write(screen, "<", 1, X, Y + GFont.GetLetterDimension(2) / 4); GFont.Write(screen, " >", 2, X, Y); } else { GFont.Write(screen, "< >", 2, X, Y); } } int xOffset = 0; if (Value.ToString().Length < 3) { xOffset = GFont.GetStringWidth(" ", 2) / 2; } if (Value.ToString().Length < 2) { xOffset += GFont.GetStringWidth(" ", 2) / 2; } GFont.Write(screen, " " + Value, 2, X + xOffset, Y); }
public override void Render(GBitmap screen) { int yo = Y; foreach (string line in Lines) { if (X > 0) { GFont.Write(screen, line, 1, X, yo); } else { GFont.WriteXCenter(screen, line, 1, yo); } yo += 15; } }
public override void Render(Gfx.GBitmap screen) { if (Text != null) { switch (Alignment) { case TextAlignment.CenterScreen: GFont.WriteXCenter(screen, Text, Size, Y); break; case TextAlignment.Left: GFont.Write(screen, Text, Size, X, Y); break; case TextAlignment.Right: GFont.WriteRight(screen, Text, Size, X, Y, Width); break; case TextAlignment.Center: GFont.WriteCenter(screen, Text, Size, X, Y, Width); break; } } }
public override void Render(GBitmap screen) { GFont.Write(screen, "<" + Values[CurrentIndex] + ">", 1, X, Y); }