예제 #1
0
        private void displayBreakpointList
            (ScreenBreakpointClient sb_client, List <string> method_names)
        {
            if (KeyLabels == null)
            {
                GUIContent[] Labels =
                {
                    dimension_text, breakpoint_text, callback_text
                };
                KeyLabels = new List <GUIContent>(Labels);
            }
            MyStandardEditorUI.RenderPreListHeaders(header_text, KeyLabels);

            GUILayoutOption max_button_width_opt = GUILayout.MaxWidth(50.0f);

            if (sb_client.BreakpointEntries != null)
            {
                foreach (BreakpointEntry entry in sb_client.BreakpointEntries)
                {
                    bool should_delete_element
                        = renderBreakpointEntry(entry, method_names, max_button_width_opt);
                    if (should_delete_element)
                    {
                        items_to_delete.Push(entry);
                    }
                }
            }
            while (items_to_delete.Count > 0)
            {
                BreakpointEntry item_to_delete = items_to_delete.Pop();
                sb_client.BreakpointEntries.Remove(item_to_delete);
                MSEM.RemoveEntry(item_to_delete);
            }
            EditorGUI.indentLevel--;

            bool should_add_element = MSEM.RenderListButtons();

            if (should_add_element)
            {
                BreakpointEntry new_entry = new BreakpointEntry();
                if (sb_client.BreakpointEntries == null)
                {
                    Debug.Log("sb_client not started yet (but why?). Starting it now");
                    sb_client.Start();
                }
                sb_client.BreakpointEntries.Add(new_entry);
                MSEM.SetMemberSelection(new_entry, DEFAULT_METHOD_INDEX);
                EditorUtility.SetDirty(this);
            }
        }
        public void OnInspectorGUI()
        {
            serializedObject.Update();

            //Debug.Log("Drawing ScreenBreakpointClient");

            EditorGUILayout.LabelField("LunaShroom Editor", EditorStyles.centeredGreyMiniLabel);
            MyStandardEditorUI.RenderScriptDisplay(Switchboard);
            RenderOutputObjectSelector(Switchboard);
            RenderRegistryKeyTypeSelector(Switchboard);
            //RenderCordCircuitList(Switchboard, TargetMethodSelectionLabels);
            Debug.Assert(reorderableList != null);
            reorderableList.DoLayoutList();
        }
예제 #3
0
 private void renderScriptDisplay()
 {
     MyStandardEditorUI.RenderScriptDisplay(sb_client);
 }