Exemplo n.º 1
0
 private static void Button(Lists.Structures.Button Tool)
 {
     // Desenha o botão
     if (Tool.Texture_Num < Tex_Button.Length)
     {
         Render(Win_Interface, Tex_Button[Tool.Texture_Num], Tool.Position, new SFML.Graphics.Color(255, 255, 225, 225));
     }
 }
Exemplo n.º 2
0
 private static void Button(BinaryWriter Data, Lists.Structures.Button Tool)
 {
     // Escreve os dados
     Data.Write(Tool.Name);
     Data.Write(Tool.Position.X);
     Data.Write(Tool.Position.Y);
     Data.Write(Tool.Visible);
     Data.Write((byte)Tool.Window);
     Data.Write(Tool.Texture_Num);
 }
Exemplo n.º 3
0
 private static Lists.Structures.Button Button(BinaryReader Data)
 {
     // Lê os dados
     Lists.Structures.Button Tool = new Lists.Structures.Button
     {
         Name        = Data.ReadString(),
         Position    = new System.Drawing.Point(Data.ReadInt32(), Data.ReadInt32()),
         Visible     = Data.ReadBoolean(),
         Window      = (Globals.Windows)Data.ReadByte(),
         Texture_Num = Data.ReadByte()
     };
     return(Tool);
 }
Exemplo n.º 4
0
    private void butConfirm_Click(object sender, EventArgs e)
    {
        // Adiciona uma nova ferramenta
        Lists.Structures.Tool Tool = new Lists.Structures.Tool();
        switch ((Globals.Tools_Types)cmbType.SelectedIndex)
        {
        case Globals.Tools_Types.Button: Tool = new Lists.Structures.Button(); break;

        case Globals.Tools_Types.Panel: Tool = new Lists.Structures.Panel(); break;

        case Globals.Tools_Types.CheckBox: Tool = new Lists.Structures.CheckBox(); break;

        case Globals.Tools_Types.TextBox: Tool = new Lists.Structures.TextBox(); break;
        }
        Lists.Tool.Nodes[cmbWindows.SelectedIndex].Nodes.Add("[" + ((Globals.Tools_Types)cmbType.SelectedIndex).ToString() + "] ");
        Tool.Window = (Globals.Windows)cmbWindows.SelectedIndex;
        Lists.Tool.Nodes[cmbWindows.SelectedIndex].LastNode.Tag = Tool;
        grpNew.Visible = false;
    }