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); }