修改细节
This commit is contained in:
1 parent
ca938ab6f5
commit
952e5038ed
19 files changed
+1542
-286
No files matched your search
@@ -26,6 +26,7 @@ public class RaceListScript : RaceScript
|
||||
{
|
||||
base.Show();
|
||||
handleAvatar();
|
||||
//Refresh();
|
||||
}
|
||||
//筛选条件
|
||||
void Start()
|
||||
@@ -44,24 +45,66 @@ public class RaceListScript : RaceScript
|
||||
var button = t.GetComponent<Button>();
|
||||
var image = t.GetComponent<Image>();
|
||||
var text = t.Find("Text").GetComponent<Text>();
|
||||
UIManager.AddEvent(button.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
if (t.name == "Btn1")
|
||||
{
|
||||
Color c1 = Utils.HexToColorHtml("#23232D");
|
||||
if (image.color.r == c1.r && image.color.g == c1.g && image.color.b == c1.b)
|
||||
image.color = Utils.HexToColorHtml("#F93086");
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
UIManager.AddEvent(button.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
image.color = Utils.HexToColorHtml("#F93086");
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Add(RaceFilterOptions.statusDict[text.text]);
|
||||
}
|
||||
else
|
||||
foreach (Transform t1 in statusOptionContainer)
|
||||
{
|
||||
var image1 = t1.GetComponent<Image>();
|
||||
var text1 = t1.Find("Text").GetComponent<Text>();
|
||||
if (t1.name == t.name)
|
||||
{
|
||||
image1.color = Utils.HexToColorHtml("#F93086");
|
||||
text1.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
image1.color = Utils.HexToColorHtml("#23232D");
|
||||
text1.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
}
|
||||
statusOptions.Clear();
|
||||
scroll.GetComponent<ScrollRect>().verticalNormalizedPosition = 1;
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.AddEvent(button.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
image.color = c1;
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Remove(RaceFilterOptions.statusDict[text.text]);
|
||||
}
|
||||
scroll.GetComponent<ScrollRect>().verticalNormalizedPosition = 1;
|
||||
Refresh();
|
||||
});
|
||||
Color c1 = Utils.HexToColorHtml("#23232D");
|
||||
if (image.color.r == c1.r && image.color.g == c1.g && image.color.b == c1.b)
|
||||
{
|
||||
image.color = Utils.HexToColorHtml("#F93086");
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Add(RaceFilterOptions.statusDict[text.text]);
|
||||
}
|
||||
else
|
||||
{
|
||||
image.color = c1;
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Remove(RaceFilterOptions.statusDict[text.text]);
|
||||
}
|
||||
Transform t1 = statusOptionContainer.GetChild(0);
|
||||
var image1 = t1.GetComponent<Image>();
|
||||
var text1 = t1.Find("Text").GetComponent<Text>();
|
||||
if (statusOptions.Count == 0)
|
||||
{
|
||||
image1.color = Utils.HexToColorHtml("#F93086");
|
||||
text1.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
image1.color = Utils.HexToColorHtml("#23232D");
|
||||
text1.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
scroll.GetComponent<ScrollRect>().verticalNormalizedPosition = 1;
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
reserveContainer = transform.Find("ListContainer/Conditions/ReserveContainer");
|
||||
@@ -98,7 +141,11 @@ public class RaceListScript : RaceScript
|
||||
searchInput = transform.Find("ListContainer/Conditions/SearchInput");
|
||||
if (searchInput != null)
|
||||
{
|
||||
UIManager.AddEvent(searchInput.Find("Button").gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
//UIManager.AddEvent(searchInput.Find("Button").gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
//{
|
||||
// //onEndEdit();
|
||||
//});
|
||||
searchInput.GetComponent<InputField>().onEndEdit.AddListener((string s) =>
|
||||
{
|
||||
onEndEdit();
|
||||
});
|
||||
@@ -114,7 +161,6 @@ public class RaceListScript : RaceScript
|
||||
};
|
||||
});
|
||||
}
|
||||
handleAvatar();
|
||||
Refresh();
|
||||
}
|
||||
|
||||
@@ -143,10 +189,10 @@ public class RaceListScript : RaceScript
|
||||
OnEndDrag(null);
|
||||
}
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Return))
|
||||
{
|
||||
onEndEdit();
|
||||
}
|
||||
//if (Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Return))
|
||||
//{
|
||||
// onEndEdit();
|
||||
//}
|
||||
}
|
||||
|
||||
private void OnEndDrag(BaseEventData arg0)
|
||||
|
||||
Reference in new issue
Block a user