private static Buttons.Structure Button(BinaryReader Data) { // Lê os dados Buttons.Structure Tool = new Buttons.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.Texture_Num = Data.ReadByte(); return(Tool); }
private static void Button(Buttons.Structure Tool) { byte Alpha = 225; // Define a transparência do botão pelo seu estado switch (Tool.State) { case Buttons.States.Above: Alpha = 250; break; case Buttons.States.Click: Alpha = 200; break; } // Desenha o botão Render(Tex_Button[Tool.Texture_Num], Tool.Position, new SFML.Graphics.Color(255, 255, 225, Alpha)); }