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