예제 #1
0
 public static void BringWindowToFront(Core.Window window)
 {
     if (mOpenWindows.Contains(window))
     {
         SwitchWindows(mOpenWindows.IndexOf(window), mOpenWindows.Count - 1);
     }
 }
예제 #2
0
 private static void SwitchWindows(int oldSlot, int newSlot)
 {
     if (mOpenWindows.Count > oldSlot && mOpenWindows.Count > newSlot)
     {
         Core.Window temp = mOpenWindows[oldSlot];
         mOpenWindows[oldSlot] = mOpenWindows[newSlot];
         mOpenWindows[newSlot] = temp;
     }
 }
예제 #3
0
 public static void RemoveWindowQuick(Core.Window windowToRemove)
 {
     if (windowToRemove != null)
     {
         Globals.GameScreen.TaskBar.RemoveButton(windowToRemove);
         mOpenWindows.Remove(windowToRemove);
         windowToRemove = null;
     }
 }
예제 #4
0
 public static bool IsWindowTopMost(Core.Window window)
 {
     if (mOpenWindows.Count > 0)
     {
         return(window == mOpenWindows[mOpenWindows.Count - 1]);
     }
     else
     {
         return(false);
     }
 }
예제 #5
0
 public static void AddWindow(Core.Window windowToAdd)
 {
     if (windowToAdd != null && mOpenWindows.Contains(windowToAdd) == false)
     {
         bool autoSwitch = false;
         if (mOpenWindows.Count > 0)
         {
             if (mOpenWindows[mOpenWindows.Count - 1].AlwaysOnTop)
             {
                 autoSwitch = true;
             }
         }
         mOpenWindows.Add(windowToAdd);
         if (autoSwitch)
         {
             SwitchWindows(mOpenWindows.Count - 2, mOpenWindows.Count - 1);
         }
         if (windowToAdd.ShowInTaskBar && windowToAdd.TaskBarText != "")
         {
             Globals.GameScreen.TaskBar.AddButton(new Client.Logic.Gui.TaskBar.TaskBarButton(windowToAdd));
         }
     }
 }
예제 #6
0
 public static bool IsWindowOpen(Core.Window windowToCheck)
 {
     return(mOpenWindows.Contains(windowToCheck));
 }