|
|
|
@ -27,7 +27,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
|
|
|
|
public ScrollRect scrollrect;
|
|
|
|
|
//public InputField myfield;
|
|
|
|
|
GameObject chat_input;
|
|
|
|
|
TchatAnim tchatAnim;
|
|
|
|
|
Gui_TchatAnim tchatAnim;
|
|
|
|
|
string message_old;
|
|
|
|
|
|
|
|
|
|
//tentative d'ajout des notifications:
|
|
|
|
@ -38,7 +38,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
|
|
|
|
void Start() {
|
|
|
|
|
//PopulateList ();
|
|
|
|
|
chat_input = GameObject.Find("tchat_complet");
|
|
|
|
|
tchatAnim = chat_input.GetComponent<TchatAnim> ();
|
|
|
|
|
tchatAnim = chat_input.GetComponent<Gui_TchatAnim> ();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -46,7 +46,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
|
|
|
|
void PopulateList() {
|
|
|
|
|
foreach(var item in itemList) {
|
|
|
|
|
GameObject newButton = Instantiate(sampleButton) as GameObject;
|
|
|
|
|
SampleButton button = newButton.GetComponent <SampleButton> ();
|
|
|
|
|
Gui_SampleButton button = newButton.GetComponent <Gui_SampleButton> ();
|
|
|
|
|
button.nameLabel.text = item.name;
|
|
|
|
|
button.icon.sprite = item.icon;
|
|
|
|
|
button.message.text = item.message;
|
|
|
|
@ -67,7 +67,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
|
|
|
|
|
|
|
|
|
scrollrect.verticalNormalizedPosition = 0;
|
|
|
|
|
GameObject myNewButton = Instantiate(sampleButton) as GameObject;
|
|
|
|
|
SampleButton button = myNewButton.GetComponent<SampleButton> ();
|
|
|
|
|
Gui_SampleButton button = myNewButton.GetComponent<Gui_SampleButton> ();
|
|
|
|
|
button.nameLabel.text = name;
|
|
|
|
|
button.message.text = tchatAnim.message;
|
|
|
|
|
button.icon.sprite = portrait.sprite;
|
|
|
|
@ -80,7 +80,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
|
|
|
|
|
|
|
|
|
scrollrect.verticalNormalizedPosition = 0;
|
|
|
|
|
GameObject myNewButton = Instantiate(logNotification) as GameObject;
|
|
|
|
|
LogNotification notif = myNewButton.GetComponent<LogNotification> ();
|
|
|
|
|
Gui_LogNotification notif = myNewButton.GetComponent<Gui_LogNotification> ();
|
|
|
|
|
notif.message.text = message;
|
|
|
|
|
myNewButton.transform.SetParent(contentPanel);
|
|
|
|
|
}
|
|
|
|
|