/// <summary> /// Set all properties on the engine instance. The base implementation already sets position and orientation, /// so there is nothing else to do here /// </summary> public override void SetEngineInstanceBaseProperties() { base.SetEngineInstanceBaseProperties(); UpdateLayout(); EngineInstanceUIShape.SetUIKey(m_UIKey); EngineInstanceUIShape.SetOrder(Order); // EngineInstanceUIShape.UpdateEntityProperties(); }
void OnPropertyChanged(object sender, PropertyChangedArgs e) { if (EngineInstanceUIShape == null) { return; } if (e._propertyName == "PosX" || e._propertyName == "PosY") { EngineInstanceUIShape.SetPosition(PosX, PosY, 0.0f); } else if (e._propertyName == "SizeX" || e._propertyName == "SizeY") { EngineInstanceUIShape.SetSize(SizeX, SizeY); } else if (e._propertyName == "UIKey") { EngineInstanceUIShape.SetUIKey(UIKey); } else if (e._propertyName == "Order") { EngineInstanceUIShape.SetOrder(Order); } else { if (e._component is bool) { UIEditorMessageService.GetInstance().OnPropertyChanged(e._propertyName, (bool)e._component); } else if (e._component is int) { UIEditorMessageService.GetInstance().OnPropertyChanged(e._propertyName, (int)e._component); } else if (e._component is float) { UIEditorMessageService.GetInstance().OnPropertyChanged(e._propertyName, (float)e._component); } else if (e._component is string) { UIEditorMessageService.GetInstance().OnPropertyChanged(e._propertyName, (string)e._component); } } }
public void LoadLayout() { EngineInstanceUIShape.SetPosition(PosX, PosY, 0.0f); EngineInstanceUIShape.SetSize(SizeX, SizeY); }
public virtual void UpdateProperties() { StringDictionary propertyDict = _uiProperties.GetPropertyDict(SerializationHelper.ENGINEVECTOR_SEPARATOR); EngineInstanceUIShape.UpdateProperties(propertyDict); }