public static void Sort(Aligned <Gfx2D> tiles) { tiles.Components.Sort(delegate(Gfx2D p1, Gfx2D p2) { return(Codes[p1].CompareTo(Codes[p2])); }); tiles.Align(); }
public static void Add(String Code, Aligned <Gfx2D> tiles) { Gfx2D g = new Gfx2D(new Rectangle(0, 0, 50, 80)); Codes.Add(g, Code); g.RegisterDrawAct(() => { g.Draw(Color.White); if (g.ContainsCursor()) { g.Draw(Color.Blue); } StandAlone.DrawString(Code, g.Center - new REMOPoint(5, 5), Color.Red); }); tiles.Add(g); tiles.Align(); }
private static void AddCircle() { Cirles.Add(new Gfx2D("Circle", new Rectangle(0, 0, 40, 40))); Cirles.Align(); }
public static void Align() { Tiles.Align(); }