- Bring text to text buttons (not fully working)

- Refactoring of unity element creation
- copy Vocaluxe.UI.dll to unity assets automatically
This commit is contained in:
lukeIam committed 2018-09-07 17:12:16 +02:00
1 parent 4373f82935
commit c6d221d6c0
8 files changed
+21 -149

No files matched your search

+4 -1
View File
@@ -105,7 +105,7 @@ public class ScreenHandler : MonoBehaviour
button.GetComponent<Image>().color = Color.green;
var buttonText = button.GetComponentInChildren<Text>().gameObject;
SetProperties((CUiElementText)buttonInfo.AsQueryable().FirstOrDefault(x => x is CUiElementText), buttonText);
SetProperties((CUiElementText)buttonInfo.FirstOrDefault(x => x is CUiElementText), buttonText);
}
private GameObject CreateElement(CUiElementText textInfo)
@@ -117,6 +117,9 @@ public class ScreenHandler : MonoBehaviour
private void SetProperties(CUiElementText textInfo, GameObject text)
{
var textComponent = text.GetComponent<Text>();
// Add text to the text component
textComponent.text = textInfo.Controller.Text;
PositionElement(textInfo, text);
}