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