public void HideLabel( [FriendlyName("Text", "The text you want to display.")] string Text, [FriendlyName("Font Size", "The size of the font.")] [DefaultValue(16), SocketState(false, false)] int FontSize, [FriendlyName("Font Style", "The font style (Normal,Bold, Italic, BoldAndItalic).")] [SocketState(false, false)] UnityEngine.FontStyle FontStyle, [FriendlyName("Color", "The color of the font.")] [SocketState(false, false)] UnityEngine.Color FontColor, [FriendlyName("Alignment", "The position of the text on the screen.")] [SocketState(false, false)] UnityEngine.TextAnchor textAnchor, [FriendlyName("Edge Padding", "The number of pixels tp offset the text from the edge of the screen.")] [DefaultValue(8), SocketState(false, false)] int EdgePadding, [FriendlyName("Remove After", "The amount of time (in seconds) to wait before automatically removing the text.")] [DefaultValue(0.0f), SocketState(false, false)] float time ) { m_DisplayText = false; }
public static int set_alignment_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Text ret = get_obj(nThisPtr); UnityEngine.TextAnchor arg0 = (UnityEngine.TextAnchor)(FCLibHelper.fc_get_int(L, 0)); ret.alignment = arg0; } catch (Exception e) { Debug.LogException(e); } return(0); }
static void TextMesh_anchor(JSVCall vc) { if (vc.bGet) { UnityEngine.TextMesh _this = (UnityEngine.TextMesh)vc.csObj; var result = _this.anchor; JSApi.setEnum((int)JSApi.SetType.Rval, (int)result); } else { UnityEngine.TextAnchor arg0 = (UnityEngine.TextAnchor)JSApi.getEnum((int)JSApi.GetType.Arg); UnityEngine.TextMesh _this = (UnityEngine.TextMesh)vc.csObj; _this.anchor = arg0; } }
static void GUIStyle_alignment(JSVCall vc) { if (vc.bGet) { UnityEngine.GUIStyle _this = (UnityEngine.GUIStyle)vc.csObj; var result = _this.alignment; JSApi.setEnum((int)JSApi.SetType.Rval, (int)result); } else { UnityEngine.TextAnchor arg0 = (UnityEngine.TextAnchor)JSApi.getEnum((int)JSApi.GetType.Arg); UnityEngine.GUIStyle _this = (UnityEngine.GUIStyle)vc.csObj; _this.alignment = arg0; } }
public static int GetTextAnchorPivot_wrap(long L) { try { UnityEngine.TextAnchor arg0 = (UnityEngine.TextAnchor)(FCLibHelper.fc_get_int(L, 0)); Vector2 ret = UnityEngine.UI.Text.GetTextAnchorPivot(arg0); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); Vector2 temp_ret = ret; FCLibHelper.fc_set_value_vector2(ret_ptr, ref temp_ret); } catch (Exception e) { Debug.LogException(e); } return(0); }
static void TextGenerationSettings_textAnchor(JSVCall vc) { if (vc.bGet) { UnityEngine.TextGenerationSettings _this = (UnityEngine.TextGenerationSettings)vc.csObj; var result = _this.textAnchor; JSApi.setEnum((int)JSApi.SetType.Rval, (int)result); } else { UnityEngine.TextAnchor arg0 = (UnityEngine.TextAnchor)JSApi.getEnum((int)JSApi.GetType.Arg); UnityEngine.TextGenerationSettings _this = (UnityEngine.TextGenerationSettings)vc.csObj; _this.textAnchor = arg0; JSMgr.changeJSObj(vc.jsObjID, _this); } }
public void OnDrop(PointerEventData eventData) { EasyDrag d = eventData.pointerDrag.GetComponent <EasyDrag>(); if (d != null && d.active) { if (d.cardType == EasyDrag.CardType.Number && this.transform.gameObject.name == "Answer2") { d.gameObject.GetComponent <CanvasGroup>().alpha = 1f; } else if (d.cardType == EasyDrag.CardType.Operator && (this.transform.gameObject.name == "Answer1" || this.transform.gameObject.name == "Answer3")) { } else if (d.cardType == EasyDrag.CardType.Answer && d.GetComponentInChildren <Text>().text == "") { } else if ((this.gameObject.name == "Answer1" && (d.gameObject.name == "Answer2")) || (this.gameObject.name == "Answer3" && (d.gameObject.name == "Answer2") || (this.gameObject.name == "Answer2" && (d.gameObject.name == "Answer1" || d.gameObject.name == "Answer3")))) { } else if (d.cardType == EasyDrag.CardType.Answer) { string text = this.transform.gameObject.GetComponentInChildren <Text>().text; UnityEngine.FontStyle fontStyle = this.transform.gameObject.GetComponentInChildren <Text>().fontStyle; int fontSize = this.transform.gameObject.GetComponentInChildren <Text>().fontSize; UnityEngine.TextAnchor align = this.transform.gameObject.GetComponentInChildren <Text>().alignment; this.transform.gameObject.GetComponentInChildren <Text>().text = d.transform.gameObject.GetComponentInChildren <Text>().text; this.transform.gameObject.GetComponentInChildren <Text>().fontStyle = d.transform.gameObject.GetComponentInChildren <Text>().fontStyle; this.transform.gameObject.GetComponentInChildren <Text>().fontSize = d.transform.gameObject.GetComponentInChildren <Text>().fontSize; this.transform.gameObject.GetComponentInChildren <Text>().alignment = d.transform.gameObject.GetComponentInChildren <Text>().alignment; this.gameObject.GetComponent <CanvasGroup>().alpha = 1f; d.transform.gameObject.GetComponentInChildren <Text>().text = text; d.transform.gameObject.GetComponentInChildren <Text>().fontStyle = fontStyle; d.transform.gameObject.GetComponentInChildren <Text>().fontSize = fontSize; d.transform.gameObject.GetComponentInChildren <Text>().alignment = align; d.gameObject.GetComponent <CanvasGroup>().alpha = 1f; d.active = true; d.droppedToLocation = true; } else { string num = this.transform.gameObject.GetComponentInChildren <Text>().text; this.transform.gameObject.GetComponentInChildren <Text>().text = d.transform.gameObject.GetComponentInChildren <Text>().text; this.transform.gameObject.GetComponentInChildren <Text>().fontStyle = d.transform.gameObject.GetComponentInChildren <Text>().fontStyle; this.transform.gameObject.GetComponentInChildren <Text>().fontSize = d.transform.gameObject.GetComponentInChildren <Text>().fontSize; this.transform.gameObject.GetComponentInChildren <Text>().alignment = d.transform.gameObject.GetComponentInChildren <Text>().alignment; this.transform.gameObject.GetComponent <CanvasGroup>().alpha = 1f; if (d.cardType == EasyDrag.CardType.Number) { d.gameObject.GetComponent <CanvasGroup>().alpha = 0.6f; d.active = false; d.droppedToLocation = true; if (game.numberOne.GetComponentInChildren <Text>().text == num && !game.numberOne.GetComponent <EasyDrag>().active) { game.numberOne.GetComponent <EasyDrag>().active = true; game.numberOne.GetComponent <EasyDrag>().GetComponent <CanvasGroup>().alpha = 1f; } else if (game.numberTwo.GetComponentInChildren <Text>().text == num && !game.numberTwo.GetComponent <EasyDrag>().active) { game.numberTwo.GetComponent <EasyDrag>().active = true; game.numberTwo.GetComponent <EasyDrag>().GetComponent <CanvasGroup>().alpha = 1f; } } else { d.gameObject.GetComponent <CanvasGroup>().alpha = 1f; d.active = true; } } } }
public void ShowLabel(string Text, int FontSize, UnityEngine.FontStyle FontStyle, UnityEngine.Color FontColor, UnityEngine.TextAnchor textAnchor, int EdgePadding, float time) { m_Text = Text; m_Width = Screen.width - EdgePadding; m_Height = Screen.height - EdgePadding; m_Style.fontSize = FontSize; m_Style.fontStyle = FontStyle; m_Style.alignment = textAnchor; m_Style.normal.textColor = FontColor; m_DisplayText = true; m_RemoveTime = time; }