/// <summary> /// Set cell's vertical alignment /// </summary> /// <param name="value"></param> public void setVerticallAlign(alignment value) { if (value >= alignment.TOP && value <= alignment.BOTTOM) { _vertical = value; } }
public CText(string aText = "noText", alignment aAlign = alignment.CENTER, int aFontSize = 38, string aFontName = "Beast") { mSprite = new GameObject(); mSprite.name = aText; mText = mSprite.AddComponent <Text>(); GameObject canvas = GameObject.Find("Canvas"); mSprite.transform.SetParent(canvas.transform); mSprite.transform.localScale = new Vector3(1, 1, 1); Font font = Resources.Load("Fonts/" + aFontName, typeof(Font)) as Font; mText.text = aText; mText.font = font; mText.fontSize = aFontSize; mText.rectTransform.sizeDelta = new Vector2(400, 400); mTransform = mSprite.transform; if (aAlign == alignment.CENTER) { mText.rectTransform.pivot = new Vector2(0.5f, 0.5f); mText.alignment = TextAnchor.MiddleCenter; } else if (aAlign == alignment.TOP_CENTER) { mText.rectTransform.pivot = new Vector2(0f, 1.0f); mText.alignment = TextAnchor.UpperLeft; } render(); }
/// <summary> /// Default Ctor /// </summary> public TDocumentTableCell() { this.ColumnSpan = 1; this.Horizontal = alignment.LEFT; this.Vertical = alignment.MIDDLE; this.Type = alignment.DATA; }
//// Set Objects Alignment public void setAlignment(alignment value) { if (value >= alignment.LEFT && value <= alignment.RIGHT) { align = value; } }
public GameObject CreateButton(string name, Transform parent, alignment align, Vector2 size, Vector3 position, Color?color = null) { if (color == null) { color = new Color(0, 0, 0); } GameObject Button = new GameObject(name); RectTransform brt = Button.AddComponent <RectTransform> (); Button.AddComponent <CanvasRenderer>(); brt.sizeDelta = size; Button.transform.SetParent(parent); Button.transform.SetAsLastSibling(); //push it to the bottom so it should render last Set_Anchor_Preset(align, brt); brt.anchoredPosition = position; Image img = Button.AddComponent <Image>(); img.type = Image.Type.Sliced; img.color = (Color32)color; Button btn = Button.AddComponent <Button>(); btn.onClick.AddListener(() => { ButtonClickListener(Button); }); return(Button); }
public MovilizerQuestion() { this.timeoutField = ((short)(0)); this.backNavigationAllowedField = true; this.sortAnswersByClientKeyField = false; this.sortColumnIndexField = ((sbyte)(-1)); this.groupColumnIndexField = ((sbyte)(-1)); this.tableRowDetailsEnabledField = true; this.tableOptionsEnabledField = true; this.intermoveletMoveletKeyExtensionField = ""; this.labelAlignmentField = alignment.LEFT; this.valueAlignmentField = alignment.LEFT; this.labelFontSizeField = fontSize.NORMAL; this.labelFontStyleField = fontStyle.NORMAL; this.valueFontSizeField = fontSize.NORMAL; this.valueFontStyleField = fontStyle.NORMAL; this.portalMayDeleteField = true; this.portalMayEditField = true; this.portalMayMoveField = true; }
public MovilizerMoveletTableColumnDefinition() { this.columnSearchableField = false; this.columnSortableField = true; this.columnSortDefaultOrderField = columnSorting.NONE; this.labelAlignmentField = alignment.LEFT; this.labelTextWrapField = false; this.valueAlignmentField = alignment.LEFT; this.valueTextWrapField = false; }
/// <summary> /// Set cell horizontal alignment /// </summary> /// <param name="value"></param> public void setHorizontalAlign(alignment value) { _horizontal = value; }
/// <summary> /// Ctor /// </summary> /// <param name="type"></param> public CHTMLTableCell(alignment type) { _type = type; }
public MovilizerMetaMovelet() { this.autoExecuteTimeoutField = ((short)(0)); this.titleAlignmentField = alignment.LEFT; this.titleFontSizeField = fontSize.NORMAL; this.titleFontStyleField = fontStyle.NORMAL; this.questionTextAlignmentField = alignment.LEFT; this.questionTextFontSizeField = fontSize.LARGE; this.questionTextFontStyleField = fontStyle.BOLD; this.backTextFontSizeField = fontSize.NORMAL; this.backTextFontStyleField = fontStyle.NORMAL; this.okTextFontSizeField = fontSize.NORMAL; this.okTextFontStyleField = fontStyle.NORMAL; }
public templatesBlockWordwrap() { this.alignField = alignment.near; this.valignField = alignment.near; this.shrinktofitField = proxyBoolean.False; }
//Anchor presets void Set_Anchor_Preset(alignment align, RectTransform rt) { switch (align) { case alignment.StretchAll: Anchor_Presets_StretchAll(rt); break; case alignment.StretchRight: Anchor_Presets_StretchRight(rt); break; case alignment.StretchCenter: Anchor_Presets_StretchCenter(rt); break; case alignment.StretchLeft: Anchor_Presets_StretchLeft(rt); break; case alignment.TopStretch: Anchor_Presets_TopStretch(rt); break; case alignment.MiddleStretch: Anchor_Presets_MiddleStretch(rt); break; case alignment.BottomStretch: Anchor_Presets_BottomStretch(rt); break; case alignment.TopLeft: Anchor_Presets_TopLeft(rt); break; case alignment.TopCenter: Anchor_Presets_TopCenter(rt); break; case alignment.TopRight: Anchor_Presets_TopRight(rt); break; case alignment.MiddleLeft: Anchor_Presets_MiddleLeft(rt); break; case alignment.MiddleCenter: Anchor_Presets_MiddleCenter(rt); break; case alignment.MiddleRight: Anchor_Presets_MiddleRight(rt); break; case alignment.BottomLeft: Anchor_Presets_BottomLeft(rt); break; case alignment.BottomCenter: Anchor_Presets_BottomCenter(rt); break; case alignment.BottomRight: Anchor_Presets_BottomRight(rt); break; } }
public templatesBlockWordwrap() { this.alignField = alignment.near; this.valignField = alignment.near; this.shrinktofitField = proxyBoolean.False; }
/// <summary> /// Ctor /// </summary> /// <param name="type"></param> public TDocumentTableCell(alignment type) { this.Type = type; }
/// Constructor public TDocumentElement() { DocumentElements = new List <TDocumentElement>(5); this.Align = alignment.LEFT; this.BackgroundColor = "0xFF000000L"; }