[SerializeField] private LabelParts[] labelPartsArray; // ラベルパーツ配列 // Use this for initialization void Start() { if (0 >= labelPartsCount) { return; } GameObject uiRoot = GameObject.Find("UI Root"); if (!uiRoot) { return; } // ラベルパーツ配列を生成 labelPartsArray = new LabelParts[labelPartsCount]; // UIルートにラベルパーツを追加 for (int i = 0; i < labelPartsCount; i++) { LabelParts labelParts = NGUITools.AddChild(uiRoot, labelPartsPrefab).GetComponent <LabelParts>(); if (labelParts) { labelPartsArray[i] = labelParts; } } // ラベルパーツ毎にテキストテーブルを生成 List <string>[] textTableListArray = new List <string> [labelPartsCount]; for (int i = 0; i < labelPartsCount; i++) { textTableListArray[i] = new List <string>(); } // テキストを振り分ける for (int i = 0; i < textTable.Length; i++) { textTableListArray[i % labelPartsCount].Add(textTable[i]); } // ラベルパーツを初期化 for (int i = 0; i < labelPartsCount; i++) { labelPartsArray[i].textTable = textTableListArray[i].ToArray(); labelPartsArray[i].goal = new Vector3(0, goalY, 0); labelPartsArray[i].start = new Vector3(0, startY - (i * (400 / labelPartsCount)), 0); labelPartsArray[i].moveSpeed = moveSpeed; labelPartsArray[i].SendMessage("Start"); } }
private void WordsClickHandle(LabelParts parts) { SetTitle(parts.Name); // proxy.GetGraphByNode(parts.identify); }
/// <summary> /// Creates a new instance of TextSymbolizer /// </summary> public LabelSymbolizer() { _angle = 0; _borderEnabled = false; _borderColor = Color.Black; _backColor = Color.AntiqueWhite; _backColorEnabled = false; _dropShadowColor = Color.FromArgb(20, 0, 0, 0); _dropShadowEnabled = false; _dropShadowGeographicOffset = new Coordinate(0, 0); _dropShadowPixelOffset = new PointF(2F, 2F); _fontSize = 10F; _fontFamily = "Arial Unicode MS"; _fontStyle = FontStyle.Regular; _fontColor = Color.Black; _haloColor = Color.White; _haloEnabled = false; _scaleMode = ScaleModes.Symbolic; _labelMethod = LabelMethod.Centroid; _labelParts = LabelParts.LabelLargestPart; _preventCollisions = true; _priorityField = "FID"; }
private void ClickLabelHandler(LabelParts parts) { //Debug.LogWarning(parts.label.text + "---" + parts.identify); DFNotifyManager.SendNotify(Enum.DFNotifyType.OnNodeHighlight, new PairInfo(identify, parts.identify)); }