public virtual void Init() { _components = new List <UIComponet>(GetComponentsInChildren <UIComponet>()); for (int i = 0; i < _components.Count; i++) { _components[i].Init(); } _controllerManager = gameObject.AddComponent <ControllerGroup>(); _controllerManager.Init(); CalculateAnimation(); if (HideOnEnable) { Hide(); return; } if (AutoShow) { Show(); } }
private void addGroup(ControllerGroup group) { ControllerGroupView groupView = new ControllerGroupView(group); groupsFlowPanel.Controls.Add(groupView); addGroupBtn.Enabled = groupsFlowPanel.Controls.Count < 10; removeGroupBtn.Enabled = true; }
private void crosshair_WindowSelected(object sender, IntPtr handle) { SelectWindowCrosshair crosshair = (SelectWindowCrosshair)sender; ControllerGroup controllerGroup = (ControllerGroup)crosshair.Parent.Tag; ToontownController controller = (crosshair.Tag == leftToonCrosshair.Tag) ? controllerGroup.LeftController : controllerGroup.RightController; controller.TTWindowHandle = handle; }
internal ControllerGroupView(ControllerGroup controllerGroup) : this() { ControllerGroup = controllerGroup; groupBox.Text += (Multicontroller.Instance.ControllerGroups.IndexOf(controllerGroup) + 1); pairsLayoutPanel.Controls.Clear(); foreach (ControllerPair pair in controllerGroup.ControllerPairs) { AddPair(pair); } AdjustNumberOfPairs(); }