コード例 #1
0
ファイル: OSCPanelPacket.cs プロジェクト: cgfarmer4/ConductAR
        protected override void DrawContent(Rect contentRect)
        {
            if (_selectedMessage == null)
            {
                GUILayout.BeginHorizontal(EditorStyles.toolbar);
                GUILayout.FlexibleSpace();
                GUILayout.EndHorizontal();

                EditorGUILayout.LabelField(_packetNotSelectedContent, OSCEditorStyles.CenterLabel, GUILayout.Height(contentRect.height));

                return;
            }

            if (_selectedMessage != null)
            {
                GUILayout.BeginHorizontal(EditorStyles.toolbar);

                GUILayout.FlexibleSpace();

                var debugButton = GUILayout.Button(_openInDebugContent, EditorStyles.toolbarButton);
                if (debugButton)
                {
                    OSCWindowDebug.OpenPacket(SelecedMessage.Packet);
                }

                GUILayout.EndHorizontal();

                _scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition);
                _packetDrawer.DrawLayout(_selectedMessage.Packet);

                EditorGUILayout.EndScrollView();
            }
        }
コード例 #2
0
        private static void OpenInDebugCallback(object menuData)
        {
            var consoleMessage = menuData as OSCConsolePacket;

            if (consoleMessage == null)
            {
                return;
            }

            OSCWindowDebug.OpenPacket(consoleMessage.Packet);
        }