private static void DrawGizmo(SectionDrawer scr, GizmoType gizmoType) { if (!SectionDrawer.DrawGizmos) { return; } Vector3 start = Camera.current.ScreenToWorldPoint(Vector3.zero); // bottom left Vector3 end = Camera.current.ScreenToWorldPoint(new Vector3(Camera.current.pixelWidth, Camera.current.pixelHeight)); for (int y = Mathf.RoundToInt(start.y); y < Mathf.RoundToInt(end.y + 1); y++) { // for(int x = Mathf.RoundToInt(start.x); x < Mathf.RoundToInt(end.x + 1); x++) { // var node = MatrixOld.Matrix.At(x, y, false); // // if(node != null) { // foreach(Section section in SectionData.Sections) { // if(node.Section == section) { // Gizmos.color = section.color; // Gizmos.DrawCube(new Vector3(x, y, 0), Vector3.one); // } // } // } // } } }
static ConsoleSettingsEditor() { ConsoleSettingsEditor.inputScrollPosition = new Vector2(); ConsoleSettingsEditor.testInputAnimationFeedback = new List <GUITimer>(); ConsoleSettingsEditor.sectionGeneral = new SectionDrawer(typeof(GeneralSettings)); ConsoleSettingsEditor.sectionLog = new SectionDrawer(typeof(LogSettings)); ConsoleSettingsEditor.sectionStackTrace = new SectionDrawer(typeof(StackTraceSettings)); }
/// <summary> /// Initialize drawer /// </summary> /// <param name="upperSectionMinSize">Upper section's minimum size</param> /// <param name="upperSectionGUIStyle">Upper section's GUI style</param> /// <param name="lowerSectionMinSize">Lower section's minimum size</param> /// <param name="lowerSectionGUIStyle">Lower section's GUI style</param> /// <param name="sliderPos">Slider's default position</param> public TwoSectionWithSliderDrawer(int upperSectionMinSize, int lowerSectionMinSize, int sliderPos) { upperSection = new SectionDrawer(upperSectionMinSize, SectionDrawer.PositionTab.Upper); lowerSection = new SectionDrawer(lowerSectionMinSize, SectionDrawer.PositionTab.Lower); sliderDrawer = new SliderDrawer(); sliderDrawer.SliderPos = sliderPos; }