private static void Interface_Specific(Tools.Structure Tool) { // Interações especificas if (!(Tool is Panels.Structure)) { return; } switch (Tool.Name) { case "SelectCharacter": SelectCharacter_Class(); break; case "CreateCharacter": CreateCharacter_Class(); break; case "Hotbar": Game_Hotbar((Panels.Structure)Tool); break; case "Menu_Character": Game_Menu_Character((Panels.Structure)Tool); break; case "Menu_Inventory": Game_Menu_Inventory((Panels.Structure)Tool); break; case "Bars": Game_Bars(); break; case "Information": Panel_Informations(); break; case "Party_Invitation": Party_Invitation((Panels.Structure)Tool); break; } }
private static void Tools(Tools.Order_Structure Parent, ref List <Tools.Order_Structure> Node, BinaryReader Data) { // Lê todos os filhos byte Size = Data.ReadByte(); for (byte i = 0; i < Size; i++) { // Lê a ferramenta Tools.Structure Temp_Tool = new Tools.Structure(); switch ((Tools.Types)Data.ReadByte()) { case global::Tools.Types.Button: Temp_Tool = Button(Data); Buttons.List.Add((Buttons.Structure)Temp_Tool); break; case global::Tools.Types.TextBox: Temp_Tool = TextBox(Data); TextBoxes.List.Add((TextBoxes.Structure)Temp_Tool); break; case global::Tools.Types.Panel: Temp_Tool = Panel(Data); Panels.List.Add((Panels.Structure)Temp_Tool); break; case global::Tools.Types.CheckBox: Temp_Tool = CheckBox(Data); CheckBoxes.List.Add((CheckBoxes.Structure)Temp_Tool); break; } // Adiciona à lista Tools.Order_Structure Temp_Order = new Tools.Order_Structure(); Temp_Order.Nodes = new List <Tools.Order_Structure>(); Temp_Order.Parent = Parent; Temp_Order.Data = Temp_Tool; Node.Add(Temp_Order); // Pula pro próximo Tools(Node[i], ref Node[i].Nodes, Data); } }