public Sleek2AssetReferenceInspector() { base.name = "Asset_Reference_Inspector"; this.referenceButton = new Sleek2ImageLabelButton(); this.referenceButton.transform.anchorMin = new Vector2(0f, 0f); this.referenceButton.transform.anchorMax = new Vector2(1f, 1f); this.referenceButton.transform.offsetMin = new Vector2(0f, 0f); this.referenceButton.transform.offsetMax = new Vector2(-100f, 0f); base.valuePanel.addElement(this.referenceButton); DragableDestination dragableDestination = this.referenceButton.gameObject.AddComponent <DragableDestination>(); this.destination = new DragableAssetDestination <T>(); this.destination.assetReferenceDocked += this.handleAssetReferenceDocked; dragableDestination.dropHandler = this.destination; this.browseButton = new Sleek2ImageLabelButton(); this.browseButton.transform.anchorMin = new Vector2(1f, 0f); this.browseButton.transform.anchorMax = new Vector2(1f, 1f); this.browseButton.transform.offsetMin = new Vector2(-100f, 0f); this.browseButton.transform.offsetMax = new Vector2(-50f, 0f); this.browseButton.label.textComponent.text = "->"; this.browseButton.clicked += this.handleBrowseButtonClicked; base.valuePanel.addElement(this.browseButton); this.clearButton = new Sleek2ImageLabelButton(); this.clearButton.transform.anchorMin = new Vector2(1f, 0f); this.clearButton.transform.anchorMax = new Vector2(1f, 1f); this.clearButton.transform.offsetMin = new Vector2(-50f, 0f); this.clearButton.transform.offsetMax = new Vector2(0f, 0f); this.clearButton.label.textComponent.text = "x"; this.clearButton.clicked += this.handleClearButtonClicked; base.valuePanel.addElement(this.clearButton); }
public Sleek2TypeReferenceInspector() { base.name = "Type_Reference_Inspector"; this.button = new Sleek2ImageLabelButton(); this.button.transform.reset(); base.valuePanel.addElement(this.button); DragableDestination dragableDestination = this.button.gameObject.AddComponent <DragableDestination>(); this.destination = new DragableTypeDestination <T>(); this.destination.typeReferenceDocked += this.handleTypeReferenceDocked; dragableDestination.dropHandler = this.destination; }