chat: correction de la couleur de sélection.
Une fois le chat selectionné, la nouvelle image de fond change de couleur elle aussi.
This commit is contained in:
parent
9b316060ca
commit
88233f1474
|
@ -8,6 +8,7 @@ public class tchat_anim : MonoBehaviour {
|
||||||
public Text charac_nb;
|
public Text charac_nb;
|
||||||
public InputField myfield;
|
public InputField myfield;
|
||||||
public Text timer;
|
public Text timer;
|
||||||
|
public Image img_bg;
|
||||||
float timer_sec;
|
float timer_sec;
|
||||||
int max_timer;
|
int max_timer;
|
||||||
|
|
||||||
|
@ -31,8 +32,12 @@ public class tchat_anim : MonoBehaviour {
|
||||||
|
|
||||||
//print (machine.GetInteger("etat_chat"));
|
//print (machine.GetInteger("etat_chat"));
|
||||||
|
|
||||||
|
if (myfield.isFocused) {
|
||||||
|
img_bg.color = Color.green;
|
||||||
|
} else
|
||||||
|
img_bg.color = Color.white;
|
||||||
|
|
||||||
if(machine.GetInteger("etat_chat")==0){
|
if(machine.GetInteger("etat_chat")==0){
|
||||||
myfield.textComponent.resizeTextForBestFit=false;
|
|
||||||
myfield.gameObject.SetActive(true);
|
myfield.gameObject.SetActive(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -74,7 +79,6 @@ public class tchat_anim : MonoBehaviour {
|
||||||
//En cas de validation du message
|
//En cas de validation du message
|
||||||
if(Input.GetKeyDown("space") && myfield.isFocused){
|
if(Input.GetKeyDown("space") && myfield.isFocused){
|
||||||
|
|
||||||
myfield.gameObject.SetActive(false);
|
|
||||||
myfield.text=" ";
|
myfield.text=" ";
|
||||||
charac_nb.text="";
|
charac_nb.text="";
|
||||||
print ("space pressed");
|
print ("space pressed");
|
||||||
|
|
Loading…
Reference in New Issue