修改细节

This commit is contained in:
Caiyanpeng committed 2021-04-27 19:29:22 +08:00
1 parent 1002b0433a
commit 86a5b68317
39 files changed
+3489 -2760

No files matched your search

+10 -1
View File
@@ -72,11 +72,20 @@ namespace Assets.Scripts.UI.Control
{
mOnValueChange(i);
}
SetWhite(i);
outline.enabled = false;
});
SetWhite(this.GetComponent<Dropdown>().value);
outline = transform.GetComponent<Outline>();
}
public void SetWhite(int index)
{
if (index != -1 && this.GetComponent<Dropdown>().interactable)
{
this.GetComponent<Dropdown>().captionText.color = Utils.HexToColorHtml("#ffffff");
}
}
public void SetValidate()
{
outline.enabled = true;
@@ -136,7 +145,7 @@ namespace Assets.Scripts.UI.Control
public void OnPointerClick(PointerEventData eventData)
{
if (GetComponent<Dropdown>().value == -1) return;
if (GetComponent<Dropdown>().value == -1 || !GetComponent<Dropdown>().interactable) return;
var x = transform.Find("Dropdown List").GetComponent<ScrollRect>().content;
x.GetChild(SelectedIndex + 1).Find("Item Label").GetComponent<Text>().color = Utils.HexToColorHtml("#f93086");
}
+1
View File
@@ -65,6 +65,7 @@ namespace Assets.Scripts.UI.Control
if (!string.IsNullOrWhiteSpace(Tooltips))
{
//
//tooltips.GetComponent<RectTransform>().localPosition.
tooltips.transform.Find("Text").GetComponent<Text>().text = Tooltips;
}
tooltips.SetActive(false);