コード例 #1
0
ファイル: Bolt.cs プロジェクト: McSwaggens/Bolt
 public void SwitchFocus(GraphicalInterface component)
 {
     FocusedComponent.focused = false;
     FocusedComponent.OnUnfocused();
     FocusedComponent         = component;
     FocusedComponent.focused = true;
     FocusedComponent.OnFocused();
 }
コード例 #2
0
ファイル: Bolt.cs プロジェクト: McSwaggens/Bolt
 public void Refresh()
 {
     Console.ResetColor();
     Console.Clear();
     foreach (GraphicalInterface component in Components)
     {
         CurrentlyUpdating = component;
         component.Update();
     }
     CurrentlyUpdating = null;
 }
コード例 #3
0
ファイル: Bolt.cs プロジェクト: McSwaggens/Bolt
 public void RemoveFocus(GraphicalInterface component)
 {
     FocusedComponent = Components [Components.Count - 1];
     FocusedComponent.Focus();
 }
コード例 #4
0
ファイル: Bolt.cs プロジェクト: McSwaggens/Bolt
 public void RemoveComponent(GraphicalInterface component)
 {
     this.Components.Remove(component);
     //Redraw the screen after the component is removed
     Refresh();
 }
コード例 #5
0
ファイル: Bolt.cs プロジェクト: McSwaggens/Bolt
 public void AddComponent(GraphicalInterface component)
 {
     this.Components.Add(component);
     //Redraw the screen after the new component is added
     Refresh();
 }
コード例 #6
0
ファイル: Bolt.cs プロジェクト: McSwaggens/Bolt
 public void RefreshComponent(GraphicalInterface component)
 {
     CurrentlyUpdating = component;
     component.Update();
     CurrentlyUpdating = null;
 }