|
@@ -35,22 +35,23 @@ public class SmartArcheryView : JCUnityLib.ViewBase
|
|
|
// Update is called once per frame
|
|
// Update is called once per frame
|
|
|
void OnChangeSmartArcheryButton(int index)
|
|
void OnChangeSmartArcheryButton(int index)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+ bool _selected = false;
|
|
|
for (int i = 0; i < smartArcheryButtons.Count; i++)
|
|
for (int i = 0; i < smartArcheryButtons.Count; i++)
|
|
|
{
|
|
{
|
|
|
Button _button = smartArcheryButtons[i];
|
|
Button _button = smartArcheryButtons[i];
|
|
|
- Color32 _white;
|
|
|
|
|
|
|
+ // Color32 _white;
|
|
|
Color32 _buttonTitle;
|
|
Color32 _buttonTitle;
|
|
|
if (index == i)
|
|
if (index == i)
|
|
|
{
|
|
{
|
|
|
- _white = new Color32(255, 255, 255, 255);
|
|
|
|
|
|
|
+ _selected = true;
|
|
|
|
|
+ //_white = new Color32(255, 255, 255, 255);
|
|
|
_buttonTitle = new Color32(16, 194, 198, 255);
|
|
_buttonTitle = new Color32(16, 194, 198, 255);
|
|
|
_button.transform.Find("right/arrow").GetComponent<Image>().sprite = arrowImages[1];
|
|
_button.transform.Find("right/arrow").GetComponent<Image>().sprite = arrowImages[1];
|
|
|
_button.GetComponent<Image>().material = materialGreen;
|
|
_button.GetComponent<Image>().material = materialGreen;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- _white = new Color32(59, 59, 59, 255);
|
|
|
|
|
|
|
+ //_white = new Color32(59, 59, 59, 255);
|
|
|
_buttonTitle = new Color32(0, 0, 0, 255);
|
|
_buttonTitle = new Color32(0, 0, 0, 255);
|
|
|
_button.transform.Find("right/arrow").GetComponent<Image>().sprite = arrowImages[0];
|
|
_button.transform.Find("right/arrow").GetComponent<Image>().sprite = arrowImages[0];
|
|
|
_button.GetComponent<Image>().material = materialGrey;
|
|
_button.GetComponent<Image>().material = materialGrey;
|
|
@@ -59,17 +60,13 @@ public class SmartArcheryView : JCUnityLib.ViewBase
|
|
|
//MaterialPropertyBlock propertyBlock = new MaterialPropertyBlock();
|
|
//MaterialPropertyBlock propertyBlock = new MaterialPropertyBlock();
|
|
|
//propertyBlock.SetColor("_BorderColor", _buttonTitle);
|
|
//propertyBlock.SetColor("_BorderColor", _buttonTitle);
|
|
|
//_button.GetComponent<Renderer>().SetPropertyBlock(propertyBlock);
|
|
//_button.GetComponent<Renderer>().SetPropertyBlock(propertyBlock);
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- if (index == i)
|
|
|
|
|
- {
|
|
|
|
|
- //进入选中的页面
|
|
|
|
|
- AudioMgr.ins.PlayBtn();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (_selected)
|
|
|
|
|
+ {
|
|
|
|
|
+ //进入选中的页面
|
|
|
|
|
+ AudioMgr.ins.PlayBtn();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void OnClick_Back()
|
|
public void OnClick_Back()
|