fix button color issue

This commit is contained in:
xpeng
2022-10-07 17:52:07 +02:00
parent 390c807f6c
commit 97e2812c19
2 changed files with 3 additions and 3 deletions
+3 -1
View File
@@ -23,12 +23,14 @@ public class PanelButton : MonoBehaviour
private int _insideColliderCount = 0;
private Renderer cr;
private Color orgColor;
//public GameObject camera; // just generating warnings lmao
public AudioSource audioSrc;
void Start()
{
cr = GetComponent<Renderer>();
orgColor = cr.material.color;
if (isToggle)
{
@@ -90,6 +92,6 @@ public class PanelButton : MonoBehaviour
keybd_event(System.Convert.ToByte(key), (byte)MapVirtualKey((uint)key, 0), 2, UIntPtr.Zero);
keybd_event(System.Convert.ToByte(key2), (byte)MapVirtualKey((uint)key2, 0), 2, UIntPtr.Zero);
if (!isToggle)
cr.material.color = Color.gray;
cr.material.color = orgColor;
}
}