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
1 changed files with 6 additions and 2 deletions
|
@ -8,6 +8,7 @@ public class tchat_anim : MonoBehaviour {
|
|||
public Text charac_nb;
|
||||
public InputField myfield;
|
||||
public Text timer;
|
||||
public Image img_bg;
|
||||
float timer_sec;
|
||||
int max_timer;
|
||||
|
||||
|
@ -31,8 +32,12 @@ public class tchat_anim : MonoBehaviour {
|
|||
|
||||
//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){
|
||||
myfield.textComponent.resizeTextForBestFit=false;
|
||||
myfield.gameObject.SetActive(true);
|
||||
|
||||
}
|
||||
|
@ -74,7 +79,6 @@ public class tchat_anim : MonoBehaviour {
|
|||
//En cas de validation du message
|
||||
if(Input.GetKeyDown("space") && myfield.isFocused){
|
||||
|
||||
myfield.gameObject.SetActive(false);
|
||||
myfield.text=" ";
|
||||
charac_nb.text="";
|
||||
print ("space pressed");
|
||||
|
|
Loading…
Add table
Reference in a new issue