コード例 #1
0
 public void Draw()
 {
     if (!initialized)
     {
         initialized = true;
         InitGUI();
     }
     if (safeDisplay)
     {
         playerWindowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6707 + Client.WINDOW_OFFSET, playerWindowRect, DrawPlayerContent, "DarkMultiPlayer - Craft Library", windowStyle, playerLayoutOptions));
     }
     if (safeDisplay && selectedPlayer != null)
     {
         //Sanity check
         if (playersWithCrafts.Contains(selectedPlayer) || selectedPlayer == dmpSettings.playerName)
         {
             libraryWindowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6708 + Client.WINDOW_OFFSET, libraryWindowRect, DrawLibraryContent, "DarkMultiPlayer - " + selectedPlayer + " Craft Library", windowStyle, libraryLayoutOptions));
         }
         else
         {
             selectedPlayer = null;
         }
     }
     CheckWindowLock();
 }
コード例 #2
0
 private void Draw()
 {
     if (!colorEventHandled)
     {
         playerNameStyle   = new Dictionary <string, GUIStyle>();
         colorEventHandled = true;
     }
     if (!initialized)
     {
         initialized = true;
         InitGUI();
     }
     if (display)
     {
         //Calculate the minimum size of the minimize window by drawing it off the screen
         if (!calculatedMinSize)
         {
             minWindowRect = GUILayout.Window(6701 + Client.WINDOW_OFFSET, minWindowRect, DrawMaximize, "DMP", windowStyle, minLayoutOptions);
         }
         if (!safeMinimized)
         {
             windowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6703 + Client.WINDOW_OFFSET, windowRect, DrawContent, "DarkMultiPlayer - Status", windowStyle, layoutOptions));
         }
         else
         {
             minWindowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6703 + Client.WINDOW_OFFSET, minWindowRect, DrawMaximize, "DMP", windowStyle, minLayoutOptions));
         }
     }
     CheckWindowLock();
 }
コード例 #3
0
        private void Draw()
        {
            if (!initialized)
            {
                initialized = true;
                InitGUI();
            }
            if (display)
            {
                Vector2 mousePos = Input.mousePosition;
                mousePos.y = Screen.height - mousePos.y;
                bool shouldLock = windowRect.Contains(mousePos);

                if (shouldLock && !isWindowLocked)
                {
                    InputLockManager.SetControlLock(ControlTypes.ALLBUTCAMERAS, "DMP_GroupWindowLock");
                    isWindowLocked = true;
                }
                if (!shouldLock && isWindowLocked)
                {
                    RemoveWindowLock();
                }
                windowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6713 + Client.WINDOW_OFFSET, windowRect, DrawContent, "DarkMultiPlayer - Groups", windowStyle, layoutOptions));
            }
        }
コード例 #4
0
 public void Draw()
 {
     if (safeDisplay)
     {
         if (!initialized)
         {
             initialized = true;
             InitGUI();
         }
         windowRect.width = WINDOW_WIDTH * Screen.width;
         if (servers != null)
         {
             float groupSpacing = Screen.height * GROUP_HEIGHT_SPACING_PERCENT;
             if (groupSpacing < 22f)
             {
                 groupSpacing = 22f;
             }
             windowRect.height = (3 + displayedServers) * groupSpacing;
         }
         if (windowRect.height < MIN_WINDOW_HEIGHT * Screen.height)
         {
             windowRect.height = MIN_WINDOW_HEIGHT * Screen.height;
         }
         if (windowRect.height > MAX_WINDOW_HEIGHT * Screen.height)
         {
             windowRect.height = MAX_WINDOW_HEIGHT * Screen.height;
         }
         windowRect = DMPGuiUtil.PreventOffscreenWindow(GUI.Window(6715 + Client.WINDOW_OFFSET, windowRect, DrawContent, string.Empty, windowStyle));
     }
     CheckWindowLock();
 }
コード例 #5
0
 private void Draw()
 {
     if (!initialized)
     {
         initialized = true;
         InitGUI();
     }
     if (display)
     {
         windowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6702 + Client.WINDOW_OFFSET, windowRect, DrawContent, "DarkMultiPlayer " + version(), windowStyle, layoutOptions));
     }
 }
コード例 #6
0
 public void Draw()
 {
     if (safeDisplay)
     {
         if (!initialized)
         {
             initialized = true;
             InitGUI();
         }
         windowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6706 + Client.WINDOW_OFFSET, windowRect, DrawContent, "DarkMultiPlayer - Mod Control", windowStyle, layoutOptions));
     }
 }
コード例 #7
0
 public void Draw()
 {
     if (!initialized)
     {
         initialized = true;
         InitGUI();
     }
     if (safeDisplay)
     {
         windowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6712 + Client.WINDOW_OFFSET, windowRect, DrawContent, "Universe Converter", windowStyle, layoutOptions));
     }
 }
コード例 #8
0
 private void Draw()
 {
     if (!initialized)
     {
         initialized = true;
         InitGUI();
     }
     if (safeDisplay)
     {
         windowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6710 + Client.WINDOW_OFFSET, windowRect, DrawContent, "Screenshots", windowStyle, windowLayoutOption));
     }
     CheckWindowLock();
 }
コード例 #9
0
 public void Draw()
 {
     if (!initialized)
     {
         InitGUI();
         initialized = true;
     }
     if (safeDisplay)
     {
         bool pressedChatShortcutKey = (Event.current.type == EventType.KeyDown && Event.current.keyCode == dmpSettings.chatKey);
         if (pressedChatShortcutKey)
         {
             ignoreChatInput = true;
             selectTextBox   = true;
         }
         windowRect = DMPGuiUtil.PreventOffscreenWindow(GUILayout.Window(6704 + Client.WINDOW_OFFSET, windowRect, DrawContent, "DarkMultiPlayer Chat", windowStyle, windowLayoutOptions));
     }
     CheckWindowLock();
 }