Ejemplo n.º 1
0
        public static void Show(Rect buttonScreenRect)
        {
            Rect rect = new Rect(buttonScreenRect.x, buttonScreenRect.yMax, 300, 50);
            AttachToPlayerPlayerIPWindow w = EditorWindow.GetWindowWithRect <AttachToPlayerPlayerIPWindow>(rect, true, Content.EnterPlayerIPWindowName);

            w.position = rect;
            w.m_Parent.window.m_DontSaveToLayout = true;
        }
Ejemplo n.º 2
0
 void AddConnectionViaEnterIPWindow(ConnectionTreeViewWindow menuOptions, Rect buttonScreenRect,
                                    Func <bool> disabler = null)
 {
     menuOptions.AddItem(new ConnectionDropDownItem(Content.EnterIPText.text, -2, Content.DirectConnection, ConnectionDropDownItem.ConnectionMajorGroup.Direct, () => false, () =>
     {
         AttachToPlayerPlayerIPWindow.Show(buttonScreenRect);
         GUIUtility.ExitGUI(); // clear the gui state to prevent hot control issues
     }));
 }
Ejemplo n.º 3
0
        void AddLastConnectedIP(GenericMenu menuOptions, ref bool hasOpenConnection)
        {
            string lastIP = AttachToPlayerPlayerIPWindow.GetLastIPString();

            if (string.IsNullOrEmpty(lastIP))
            {
                return;
            }

            bool isConnected = ProfilerDriver.connectedProfiler == PLAYER_DIRECT_IP_CONNECT_GUID;

            hasOpenConnection |= isConnected;
            menuOptions.AddItem(new GUIContent(lastIP), isConnected, () => DirectIPConnect(lastIP));
        }
Ejemplo n.º 4
0
        void AddLastConnectedIP(ConnectionTreeViewWindow menuOptions, ref bool hasOpenConnection)
        {
            string lastIP = AttachToPlayerPlayerIPWindow.GetLastIPString();

            if (string.IsNullOrEmpty(lastIP))
            {
                return;
            }

            bool isConnected = ProfilerDriver.connectedProfiler == PLAYER_DIRECT_IP_CONNECT_GUID;

            hasOpenConnection |= isConnected;
            menuOptions.AddItem(new ConnectionDropDownItem(lastIP, PLAYER_DIRECT_IP_CONNECT_GUID,
                                                           Content.DirectConnection, ConnectionDropDownItem.ConnectionMajorGroup.Direct, () => ProfilerDriver.connectedProfiler == PLAYER_DIRECT_IP_CONNECT_GUID,
                                                           () => DirectIPConnect(lastIP)));
        }
Ejemplo n.º 5
0
 void AddConnectionViaEnterIPWindow(GenericMenu menuOptions, Rect buttonScreenRect)
 {
     menuOptions.AddItem(Content.EnterIPText, false, () => AttachToPlayerPlayerIPWindow.Show(buttonScreenRect));
 }