private static CheckBoxes.Structure CheckBox(BinaryReader Data) { // Carrega os dados CheckBoxes.Structure Tool = new CheckBoxes.Structure(); Tool.Name = Data.ReadString(); Tool.Position.X = Data.ReadInt32(); Tool.Position.Y = Data.ReadInt32(); Tool.Visible = Data.ReadBoolean(); Tool.Window = (Tools.Windows)Data.ReadByte(); Tool.Text = Data.ReadString(); Tool.Checked = Data.ReadBoolean(); return(Tool); }
private static void CheckBox(CheckBoxes.Structure Tool) { // Define as propriedades dos retângulos Rectangle Rec_Source = new Rectangle(new Point(), new Size(TSize(Tex_CheckBox).Width / 2, TSize(Tex_CheckBox).Height)); Rectangle Rec_Destiny = new Rectangle(Tool.Position, Rec_Source.Size); // Desenha a textura do marcador pelo seu estado if (Tool.Checked) { Rec_Source.Location = new Point(TSize(Tex_CheckBox).Width / 2, 0); } // Desenha o marcador Render(Tex_CheckBox, Rec_Source, Rec_Destiny); DrawText(Tool.Text, Rec_Destiny.Location.X + TSize(Tex_CheckBox).Width / 2 + CheckBoxes.Margin, Rec_Destiny.Location.Y + 1, SFML.Graphics.Color.White); }