public void SwitchFocus(GraphicalInterface component) { FocusedComponent.focused = false; FocusedComponent.OnUnfocused(); FocusedComponent = component; FocusedComponent.focused = true; FocusedComponent.OnFocused(); }
public void Refresh() { Console.ResetColor(); Console.Clear(); foreach (GraphicalInterface component in Components) { CurrentlyUpdating = component; component.Update(); } CurrentlyUpdating = null; }
public void RemoveFocus(GraphicalInterface component) { FocusedComponent = Components [Components.Count - 1]; FocusedComponent.Focus(); }
public void RemoveComponent(GraphicalInterface component) { this.Components.Remove(component); //Redraw the screen after the component is removed Refresh(); }
public void AddComponent(GraphicalInterface component) { this.Components.Add(component); //Redraw the screen after the new component is added Refresh(); }
public void RefreshComponent(GraphicalInterface component) { CurrentlyUpdating = component; component.Update(); CurrentlyUpdating = null; }