public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var text = m_Text.GetValueFromBag(bag, cc); ((RedButton)ve).Init(text); }
/// <summary> /// Initialize <see cref="id"/> properties using values from the attribute bag. /// </summary> /// <param name="ve">The object to initialize.</param> /// <param name="bag">The attribute bag.</param> /// <param name="cc">The creation context; unused.</param> public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); ((View)ve).id = m_Id.GetValueFromBag(bag, cc); ((View)ve).isDefault = m_Default.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var sceneName = m_StartScene.GetValueFromBag(bag, cc); ((TitleScreenManager)ve).Init(sceneName); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var suggestOption = (SuggestOption)ve; suggestOption.DisplayName = m_displayName.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var helpBox = (HelpBox)ve; helpBox.AddIcon(messageType.GetValueFromBag(bag, cc)); helpBox.AddLabel(text.GetValueFromBag(bag, cc)); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var customVec2 = ve as CustomVector2Field; customVec2.xLabel = m_xLabel.GetValueFromBag(bag, cc); customVec2.yLabel = m_yLabel.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var assetLink = (AssetLink)ve; assetLink.AssetPath = m_assetPath.GetValueFromBag(bag, cc); assetLink.SelectAsset = m_selectAsset.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var path = m_Path.GetValueFromBag(bag, cc); var key = m_Key.GetValueFromBag(bag, cc); ((LocalizedTextField)ve).Init(path, key); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); TabButton item = ve as TabButton; item.m_Label.text = m_Text.GetValueFromBag(bag, cc); item.TargetId = m_Target.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); EnumField enumField = (EnumField)ve; ParseEnumValues(enumField, m_Type.GetValueFromBag(bag, cc), m_Value.GetValueFromBag(bag, cc)); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var button = ve as DropdownButton; button.Label.text = m_Text.GetValueFromBag(bag, cc); button.StatusIcon.pickingMode = PickingMode.Ignore; }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var tagField = (TagField)ve; tagField.SetValueWithoutNotify(m_Value.GetValueFromBag(bag, cc)); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var ate = ve as MyUi1; ate.stringAttr = m_String.GetValueFromBag(bag, cc); ate.intAttr = m_Int.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); Alert alert = (Alert)ve; alert.AlertMessage.text = m_Text.GetValueFromBag(bag); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var ate = ve as TGWindow; ate.titleLabel.text = title.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var label = ve as EditableLabel; label.SetValueWithoutNotify(m_Value.GetValueFromBag(bag, cc)); label.isDelayed = m_IsDelayed.GetValueFromBag(bag, cc); label.multiline = m_Multiline.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var ate = ve as FAButton; ate.faCode = faCode.GetValueFromBag(bag, cc); ate.buttonText = btnText.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); string mode = m_Mode.GetValueFromBag(bag, cc); var selector = ve as BoundarySelector; selector.BoundaryMode = mode; }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var button = ve as IconButton; var name = _icon.GetValueFromBag(bag, cc); button.SetIcon(name); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var helpBox = ve as HelpBox; helpBox.text = m_Text.GetValueFromBag(bag, cc); helpBox.messageType = m_MessageType.GetValueFromBag(bag, cc); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var ate = ve as BuilderAttributesTestElement; ate.Clear(); ate.stringAttr = m_String.GetValueFromBag(bag, cc); ate.Add(new TextField("String") { value = ate.stringAttr }); ate.floatAttr = m_Float.GetValueFromBag(bag, cc); ate.Add(new FloatField("Float") { value = ate.floatAttr }); ate.doubleAttr = m_Double.GetValueFromBag(bag, cc); ate.Add(new DoubleField("Double") { value = ate.doubleAttr }); ate.intAttr = m_Int.GetValueFromBag(bag, cc); ate.Add(new IntegerField("Integer") { value = ate.intAttr }); ate.longAttr = m_Long.GetValueFromBag(bag, cc); ate.Add(new LongField("Long") { value = ate.longAttr }); ate.boolAttr = m_Bool.GetValueFromBag(bag, cc); ate.Add(new Toggle("Toggle") { value = ate.boolAttr }); ate.colorAttr = m_Color.GetValueFromBag(bag, cc); ate.Add(new ColorField("Color") { value = ate.colorAttr }); ate.enumAttr = m_Enum.GetValueFromBag(bag, cc); var en = new EnumField("Enum"); en.Init(m_Enum.defaultValue); en.value = ate.enumAttr; ate.Add(en); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var ate = ve as VideoPlayerElement; ate.Clear(); ate.urlAttr = m_Url.GetValueFromBag(bag, cc); }
public override void Init(VisualElement visualElement, IUxmlAttributes bag, CreationContext cc) { base.Init(visualElement, bag, cc); var contentPresenter = (ContentPresenter)visualElement; contentPresenter.ConfigMethod = m_configMethod.GetValueFromBag(bag, cc); contentPresenter.EnableDebug = m_enableDebug.GetValueFromBag(bag, cc); contentPresenter.Template = m_template.GetValueFromBag(bag, cc); }
public override void Init(VisualElement element, IUxmlAttributes bag, CreationContext cc) { base.Init(element, bag, cc); var field = element as ComboBoxField; var options = _options.GetValueFromBag(bag, cc); var value = _value.GetValueFromBag(bag, cc); field.Setup(value, options.Split(',').ToList()); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var chart = (PieChart)ve; chart.EnableLabels = m_EnableLabels.GetValueFromBag(bag, cc); chart.EnableLegend = m_EnableLegend.GetValueFromBag(bag, cc); chart.AllowLabelsOverflow = m_AllowLabelsOverflow.GetValueFromBag(bag, cc); chart.Title = m_Title.GetValueFromBag(bag, cc); }
public override void Init(VisualElement element, IUxmlAttributes bag, CreationContext cc) { base.Init(element, bag, cc); var field = element as ScenePickerField; var path = _path.GetValueFromBag(bag, cc); var guid = AssetDatabase.AssetPathToGUID(path); field.Setup(new AssetReference(guid), null); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var initValue = m_Value.GetValueFromBag(bag); var text = m_Label.GetValueFromBag(bag); ((PropertyControl <TType>)ve).value = ((PropertyControl <TType>)ve).StringToValue(initValue); ((PropertyControl <TType>)ve).label = text; }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var fixedPaneIndex = m_fixedPaneIndex.GetValueFromBag(bag, cc); var fixedPaneInitialSize = m_fixedPaneInitialSize.GetValueFromBag(bag, cc); var orientationStr = m_orientation.GetValueFromBag(bag, cc); var orientation = orientationStr == "horizontal" ? Orientation.Horizontal : Orientation.Vertical; ((TwoPaneSplitView)ve).Init(fixedPaneIndex, fixedPaneInitialSize, orientation); }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var initValue = m_Value.GetValueFromBag(bag, cc); ((PropertyControl <TType>)ve).SetValueWithoutNotify(((PropertyControl <TType>)ve).StringToValue(initValue)); ((PropertyControl <TType>)ve).label = ((BaseField <TType>)ve).label; ((BaseField <TType>)ve).label = null; }
public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) { base.Init(ve, bag, cc); var itemsControl = (ItemsControl)ve; itemsControl.ConfigMethod = m_configMethod.GetValueFromBag(bag, cc); itemsControl.EnableDebug = m_enableDebug.GetValueFromBag(bag, cc); itemsControl.Template = m_template.GetValueFromBag(bag, cc); }