// public float barX; static public void Draw(TC_Layer layer, ref Vector2 startOffset, float activeMulti, bool drawMethod, bool isFirst, bool isLast) { TC_GlobalSettings g = TC_Settings.instance.global; bool isCulled = false; TC_LayerGroupGUI.DrawLayerOrLayerGroup(layer, ref startOffset, g.colLayer, ref isCulled, activeMulti, drawMethod, isFirst, isLast); if (!layer.active) { activeMulti *= 0.75f; } // DropDownMenu(rect, layer); bool hideSelectNodes = false; if (layer.outputId != TC.heightOutput) { if (layer.selectItemGroup.totalActive <= 1) { hideSelectNodes = true; } } TC_NodeGroupGUI.Draw(layer.maskNodeGroup, ref startOffset, g.colMaskNodeGroup, g.colMaskNode, g.colLayer, activeMulti, layer.nodeFoldout, false, false, false); if (!hideSelectNodes) { TC_NodeGroupGUI.Draw(layer.selectNodeGroup, ref startOffset, g.colSelectNodeGroup, g.colSelectNode, g.colLayer, activeMulti, layer.nodeFoldout, false, layer.outputId != TC.heightOutput, hideSelectNodes); } if (layer.selectItemGroup != null && layer.outputId != TC.heightOutput) { TC_SelectItemGroupGUI.Draw(layer.selectItemGroup, ref startOffset, TC_Settings.instance.global.colSelectItemGroup, TC_Settings.instance.global.colSelectItem, g.colLayer, activeMulti); } }
static public void DrawLayerGroup(TC_TerrainLayer terrainLayer, int index, ref Vector2 pos, ref float scrollY) { TC_GlobalSettings g = TC_Settings.instance.global; Event eventCurrent = Event.current; TC_LayerGroup layerGroup = terrainLayer.layerGroups[index]; if (layerGroup == null) { return; } Vector2 posOld = pos; float t = 0; TC_LayerGroupGUI.Draw(layerGroup, false, ref pos, 1, false, false, ref t); Rect rect; rect = new Rect(posOld.x + 50, posOld.y - 18, 400, 100); TD.DrawTextureScaled(posOld.x - 44, posOld.y, 100, TD.texLineHorizontal, g.colLayerGroup); Color buttonColor; if (layerGroup.visible) { if (layerGroup.active) { buttonColor = Color.green; } else { buttonColor = Color.red; } } else { buttonColor = Color.white; } if (TD.DrawButton(rect, TC.outputNames[layerGroup.outputId], 64, true, Color.white, TD.editorSkinMulti == 1 ? buttonColor : new Color(buttonColor.r * 0.4f, buttonColor.g * 0.4f, buttonColor.b * 0.4f, 1))) { // Debug.Log("Clicked Button"); TD.ClickOutputButton(layerGroup); eventCurrent.Use(); } for (int i = 0; i < 3; i++) { rect = TD.GetRectScaled(pos.x - 32 + 25, pos.y + 33 + (i * 32), 32, 32); rect.xMin = 0; TD.DrawTexture(rect, TD.texSeparatorCenter, new Color(1, 1, 1, 0.5f)); rect = TD.GetRectScaled(pos.x + 25, pos.y + 33 + (i * 32), 32, 32); TD.DrawTexture(rect, TD.texSeparatorRight, new Color(1, 1, 1, 0.5f)); } pos.y += TD.cardHeight; pos.y += g.outputVSpace; // scrollY += startY - startOffset.y; // else GlobalManager.singleton.scrollAdd.y = 0; pos.x = posOld.x; }