| | 1 | | using DCL.Helpers; |
| | 2 | | using DCL.Models; |
| | 3 | | using System.Collections; |
| | 4 | | using System.Collections.Generic; |
| | 5 | | using DCL.Components.Interfaces; |
| | 6 | | using UnityEngine; |
| | 7 | | using UnityEngine.Assertions; |
| | 8 | | using UnityEngine.UI; |
| | 9 | | using Object = UnityEngine.Object; |
| | 10 | |
|
| | 11 | | namespace DCL.Components |
| | 12 | | { |
| | 13 | | [System.Serializable] |
| | 14 | | public struct UIValue |
| | 15 | | { |
| | 16 | | public enum Unit |
| | 17 | | { |
| | 18 | | PERCENT, |
| | 19 | | PIXELS |
| | 20 | | } |
| | 21 | |
|
| | 22 | | public float value; |
| | 23 | | public Unit type; |
| | 24 | |
|
| | 25 | | public void SetPixels(float value) |
| | 26 | | { |
| | 27 | | this.type = Unit.PIXELS; |
| | 28 | | this.value = value; |
| | 29 | | } |
| | 30 | |
|
| | 31 | | public void SetPercent(float value) |
| | 32 | | { |
| | 33 | | this.type = Unit.PERCENT; |
| | 34 | | this.value = value; |
| | 35 | | } |
| | 36 | |
|
| | 37 | | public UIValue(float value, Unit unitType = Unit.PIXELS) |
| | 38 | | { |
| | 39 | | this.value = value; |
| | 40 | | this.type = unitType; |
| | 41 | | } |
| | 42 | |
|
| | 43 | | public float GetScaledValue(float parentSize) |
| | 44 | | { |
| | 45 | | if (type == Unit.PIXELS) |
| | 46 | | return value; |
| | 47 | |
|
| | 48 | | // Prevent division by zero |
| | 49 | | if (parentSize <= Mathf.Epsilon) |
| | 50 | | parentSize = 1; |
| | 51 | |
|
| | 52 | | return value / 100 * parentSize; |
| | 53 | | } |
| | 54 | | } |
| | 55 | |
|
| | 56 | | public class UIShape<ReferencesContainerType, ModelType> : UIShape |
| | 57 | | where ReferencesContainerType : UIReferencesContainer |
| | 58 | | where ModelType : UIShape.Model |
| | 59 | | { |
| | 60 | | public const float RAYCAST_ALPHA_THRESHOLD = 0.01f; |
| | 61 | |
|
| | 62 | | public UIShape() { } |
| | 63 | |
|
| | 64 | | new public ModelType model { get { return base.model as ModelType; } set { base.model = value; } } |
| | 65 | |
|
| | 66 | | new public ReferencesContainerType referencesContainer { get { return base.referencesContainer as ReferencesCont |
| | 67 | |
|
| | 68 | | public override ComponentUpdateHandler CreateUpdateHandler() { return new UIShapeUpdateHandler<ReferencesContain |
| | 69 | |
|
| | 70 | | bool raiseOnAttached; |
| | 71 | | bool firstApplyChangesCall; |
| | 72 | |
|
| | 73 | | /// <summary> |
| | 74 | | /// This is called by UIShapeUpdateHandler before calling ApplyChanges. |
| | 75 | | /// </summary> |
| | 76 | | public void PreApplyChanges(BaseModel newModel) |
| | 77 | | { |
| | 78 | | model = (ModelType) newModel; |
| | 79 | |
|
| | 80 | | raiseOnAttached = false; |
| | 81 | | firstApplyChangesCall = false; |
| | 82 | |
|
| | 83 | | if (referencesContainer == null) |
| | 84 | | { |
| | 85 | | referencesContainer = InstantiateUIGameObject<ReferencesContainerType>(referencesContainerPrefabName); |
| | 86 | |
|
| | 87 | | raiseOnAttached = true; |
| | 88 | | firstApplyChangesCall = true; |
| | 89 | | } |
| | 90 | | else if (ReparentComponent(referencesContainer.rectTransform, model.parentComponent)) |
| | 91 | | { |
| | 92 | | raiseOnAttached = true; |
| | 93 | | } |
| | 94 | | } |
| | 95 | |
|
| | 96 | | public override void RaiseOnAppliedChanges() |
| | 97 | | { |
| | 98 | | RefreshDCLLayout(); |
| | 99 | |
|
| | 100 | | #if UNITY_EDITOR |
| | 101 | | SetComponentDebugName(); |
| | 102 | | #endif |
| | 103 | |
|
| | 104 | | // We hide the component visibility when it's created (first applychanges) |
| | 105 | | // as it has default values and appears in the middle of the screen |
| | 106 | | if (firstApplyChangesCall) |
| | 107 | | referencesContainer.canvasGroup.alpha = 0f; |
| | 108 | | else |
| | 109 | | referencesContainer.canvasGroup.alpha = model.visible ? model.opacity : 0f; |
| | 110 | |
|
| | 111 | | referencesContainer.canvasGroup.blocksRaycasts = model.visible && model.isPointerBlocker; |
| | 112 | |
|
| | 113 | | base.RaiseOnAppliedChanges(); |
| | 114 | |
|
| | 115 | | if (raiseOnAttached && parentUIComponent != null) |
| | 116 | | { |
| | 117 | | UIReferencesContainer[] parents = referencesContainer.GetComponentsInParent<UIReferencesContainer>(true) |
| | 118 | |
|
| | 119 | | for (int i = 0; i < parents.Length; i++) |
| | 120 | | { |
| | 121 | | UIReferencesContainer parent = parents[i]; |
| | 122 | | if (parent.owner != null) |
| | 123 | | { |
| | 124 | | parent.owner.OnChildAttached(parentUIComponent, this); |
| | 125 | | } |
| | 126 | | } |
| | 127 | | } |
| | 128 | | } |
| | 129 | | } |
| | 130 | |
|
| | 131 | | public class UIShape : BaseDisposable, IUIRefreshable |
| | 132 | | { |
| | 133 | |
|
| | 134 | | [System.Serializable] |
| | 135 | | public class Model : BaseModel |
| | 136 | | { |
| | 137 | | public string name; |
| | 138 | | public string parentComponent; |
| 612 | 139 | | public bool visible = true; |
| 612 | 140 | | public float opacity = 1f; |
| 612 | 141 | | public string hAlign = "center"; |
| 612 | 142 | | public string vAlign = "center"; |
| 612 | 143 | | public UIValue width = new UIValue(100f); |
| 612 | 144 | | public UIValue height = new UIValue(50f); |
| 612 | 145 | | public UIValue positionX = new UIValue(0f); |
| 612 | 146 | | public UIValue positionY = new UIValue(0f); |
| 612 | 147 | | public bool isPointerBlocker = true; |
| | 148 | | public string onClick; |
| | 149 | |
|
| 46 | 150 | | public override BaseModel GetDataFromJSON(string json) { return Utils.SafeFromJson<Model>(json); } |
| | 151 | | } |
| | 152 | |
|
| 146 | 153 | | public override string componentName => GetDebugName(); |
| 0 | 154 | | public virtual string referencesContainerPrefabName => ""; |
| | 155 | | public UIReferencesContainer referencesContainer; |
| | 156 | | public RectTransform childHookRectTransform; |
| | 157 | |
|
| 0 | 158 | | public bool isLayoutDirty { get; private set; } |
| | 159 | | protected System.Action OnLayoutRefresh; |
| | 160 | |
|
| 129 | 161 | | private BaseVariable<Vector2Int> screenSize => DataStore.i.screen.size; |
| 55 | 162 | | private BaseVariable<Dictionary<string, Queue<IUIRefreshable>>> dirtyShapesBySceneVariable => DataStore.i.HUDs.d |
| 0 | 163 | | public UIShape parentUIComponent { get; protected set; } |
| | 164 | |
|
| 122 | 165 | | public UIShape() |
| | 166 | | { |
| 122 | 167 | | screenSize.OnChange += OnScreenResize; |
| 122 | 168 | | model = new Model(); |
| 122 | 169 | | } |
| | 170 | |
|
| | 171 | | private void OnScreenResize(Vector2Int current, Vector2Int previous) |
| | 172 | | { |
| 2 | 173 | | if (GetRootParent() == this) |
| 2 | 174 | | RequestRefresh(); |
| 2 | 175 | | } |
| | 176 | |
|
| 0 | 177 | | public override int GetClassId() { return (int) CLASS_ID.UI_IMAGE_SHAPE; } |
| | 178 | |
|
| | 179 | | public string GetDebugName() |
| | 180 | | { |
| 146 | 181 | | Model model = (Model) this.model; |
| | 182 | |
|
| 146 | 183 | | if (string.IsNullOrEmpty(model.name)) |
| | 184 | | { |
| 139 | 185 | | return GetType().Name; |
| | 186 | | } |
| | 187 | | else |
| | 188 | | { |
| 7 | 189 | | return GetType().Name + " - " + model.name; |
| | 190 | | } |
| | 191 | | } |
| | 192 | |
|
| 0 | 193 | | public override IEnumerator ApplyChanges(BaseModel newJson) { return null; } |
| | 194 | |
|
| | 195 | | internal T InstantiateUIGameObject<T>(string prefabPath) where T : UIReferencesContainer |
| | 196 | | { |
| 78 | 197 | | Model model = (Model) this.model; |
| | 198 | |
|
| 78 | 199 | | GameObject uiGameObject = null; |
| | 200 | |
|
| 78 | 201 | | bool targetParentExists = !string.IsNullOrEmpty(model.parentComponent) && |
| | 202 | | scene.componentsManagerLegacy.HasSceneSharedComponent(model.parentComponent); |
| | 203 | |
|
| 78 | 204 | | if (targetParentExists) |
| | 205 | | { |
| 23 | 206 | | if (scene.componentsManagerLegacy.HasSceneSharedComponent(model.parentComponent)) |
| | 207 | | { |
| 23 | 208 | | parentUIComponent = (scene.componentsManagerLegacy.GetSceneSharedComponent(model.parentComponent) as |
| 23 | 209 | | } |
| | 210 | | else |
| | 211 | | { |
| 0 | 212 | | parentUIComponent = scene.componentsManagerLegacy.GetSceneSharedComponent<UIScreenSpace>(); |
| | 213 | | } |
| 0 | 214 | | } |
| | 215 | | else |
| | 216 | | { |
| 55 | 217 | | parentUIComponent = scene.componentsManagerLegacy.GetSceneSharedComponent<UIScreenSpace>(); |
| | 218 | | } |
| | 219 | |
|
| 78 | 220 | | uiGameObject = |
| | 221 | | Object.Instantiate( |
| | 222 | | Resources.Load(prefabPath), |
| | 223 | | parentUIComponent != null ? parentUIComponent.childHookRectTransform : null) as GameObject; |
| | 224 | |
|
| 78 | 225 | | referencesContainer = uiGameObject.GetComponent<T>(); |
| | 226 | |
|
| 78 | 227 | | referencesContainer.rectTransform.SetToMaxStretch(); |
| | 228 | |
|
| 78 | 229 | | childHookRectTransform = referencesContainer.childHookRectTransform; |
| | 230 | |
|
| 78 | 231 | | referencesContainer.owner = this; |
| | 232 | |
|
| 78 | 233 | | return referencesContainer as T; |
| | 234 | | } |
| | 235 | |
|
| | 236 | | public virtual void RequestRefresh() |
| | 237 | | { |
| 135 | 238 | | if (isLayoutDirty) return; |
| | 239 | |
|
| 55 | 240 | | isLayoutDirty = true; |
| | 241 | |
|
| 55 | 242 | | var dirtyShapesByScene = dirtyShapesBySceneVariable.Get(); |
| | 243 | |
|
| 55 | 244 | | string sceneDataID = scene.sceneData.id; |
| 55 | 245 | | if (string.IsNullOrEmpty(sceneDataID)) sceneDataID = "default"; |
| | 246 | |
|
| 55 | 247 | | if (!dirtyShapesByScene.ContainsKey(sceneDataID)) |
| | 248 | | { |
| 19 | 249 | | dirtyShapesByScene.Add(sceneDataID, new Queue<IUIRefreshable>()); |
| | 250 | | } |
| | 251 | |
|
| 55 | 252 | | dirtyShapesByScene[sceneDataID].Enqueue(this); |
| 55 | 253 | | } |
| | 254 | |
|
| | 255 | | private void RefreshRecursively() |
| | 256 | | { |
| | 257 | | // We are not using the _Internal here because the method is overridden |
| | 258 | | // by some UI shapes. |
| 55 | 259 | | RefreshDCLLayoutRecursively(refreshSize: true, refreshAlignmentAndPosition: false); |
| 55 | 260 | | FixMaxStretchRecursively(); |
| 55 | 261 | | RefreshDCLLayoutRecursively_Internal(refreshSize: false, refreshAlignmentAndPosition: true); |
| 55 | 262 | | } |
| | 263 | |
|
| | 264 | | public virtual void MarkLayoutDirty( System.Action OnRefresh = null ) |
| | 265 | | { |
| 93 | 266 | | UIShape rootParent = GetRootParent(); |
| | 267 | |
|
| 93 | 268 | | Assert.IsTrue(rootParent != null, "root parent must never be null"); |
| | 269 | |
|
| 93 | 270 | | if (rootParent.referencesContainer == null) |
| 0 | 271 | | return; |
| | 272 | |
|
| 93 | 273 | | rootParent.RequestRefresh(); |
| | 274 | |
|
| 93 | 275 | | if ( OnRefresh != null ) |
| 24 | 276 | | rootParent.OnLayoutRefresh += OnRefresh; |
| 93 | 277 | | } |
| | 278 | |
|
| | 279 | | public void RefreshDCLLayout(bool refreshSize = true, bool refreshAlignmentAndPosition = true) |
| | 280 | | { |
| 362 | 281 | | RectTransform parentRT = referencesContainer.GetComponentInParent<RectTransform>(); |
| | 282 | |
|
| 362 | 283 | | if (refreshSize) |
| | 284 | | { |
| 242 | 285 | | RefreshDCLSize(parentRT); |
| | 286 | | } |
| | 287 | |
|
| 362 | 288 | | if (refreshAlignmentAndPosition) |
| | 289 | | { |
| | 290 | | // Alignment (Alignment uses size so we should always align AFTER resizing) |
| 266 | 291 | | RefreshDCLAlignmentAndPosition(parentRT); |
| | 292 | | } |
| 362 | 293 | | } |
| | 294 | |
|
| | 295 | | protected virtual void RefreshDCLSize(RectTransform parentTransform = null) |
| | 296 | | { |
| 226 | 297 | | if (parentTransform == null) |
| 0 | 298 | | parentTransform = referencesContainer.GetComponentInParent<RectTransform>(); |
| | 299 | |
|
| 226 | 300 | | Model model = (Model) this.model; |
| | 301 | |
|
| 226 | 302 | | referencesContainer.layoutElementRT.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, |
| | 303 | | model.width.GetScaledValue(parentTransform.rect.width)); |
| 226 | 304 | | referencesContainer.layoutElementRT.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, |
| | 305 | | model.height.GetScaledValue(parentTransform.rect.height)); |
| 226 | 306 | | } |
| | 307 | |
|
| | 308 | | public void RefreshDCLAlignmentAndPosition(RectTransform parentTransform = null) |
| | 309 | | { |
| 266 | 310 | | if (parentTransform == null) |
| 0 | 311 | | parentTransform = referencesContainer.GetComponentInParent<RectTransform>(); |
| | 312 | |
|
| 266 | 313 | | referencesContainer.layoutElement.ignoreLayout = false; |
| 266 | 314 | | ConfigureAlignment(referencesContainer.layoutGroup); |
| 266 | 315 | | Utils.ForceRebuildLayoutImmediate(parentTransform); |
| 266 | 316 | | referencesContainer.layoutElement.ignoreLayout = true; |
| | 317 | |
|
| 266 | 318 | | Model model = (Model) this.model; |
| | 319 | |
|
| | 320 | | // Reposition |
| 266 | 321 | | Vector3 position = Vector3.zero; |
| 266 | 322 | | position.x = model.positionX.GetScaledValue(parentTransform.rect.width); |
| 266 | 323 | | position.y = model.positionY.GetScaledValue(parentTransform.rect.height); |
| | 324 | |
|
| 266 | 325 | | position = Utils.Sanitize(position); |
| 266 | 326 | | referencesContainer.layoutElementRT.localPosition += position; |
| 266 | 327 | | } |
| | 328 | |
|
| | 329 | | public virtual void RefreshDCLLayoutRecursively(bool refreshSize = true, |
| | 330 | | bool refreshAlignmentAndPosition = true) |
| | 331 | | { |
| 79 | 332 | | RefreshDCLLayoutRecursively_Internal(refreshSize, refreshAlignmentAndPosition); |
| 79 | 333 | | } |
| | 334 | |
|
| | 335 | | public void RefreshDCLLayoutRecursively_Internal(bool refreshSize = true, |
| | 336 | | bool refreshAlignmentAndPosition = true) |
| | 337 | | { |
| 134 | 338 | | UIShape rootParent = GetRootParent(); |
| | 339 | |
|
| 134 | 340 | | Assert.IsTrue(rootParent != null, "root parent must never be null"); |
| | 341 | |
|
| 134 | 342 | | if (rootParent.referencesContainer == null) |
| 2 | 343 | | return; |
| | 344 | |
|
| 132 | 345 | | Utils.InverseTransformChildTraversal<UIReferencesContainer>( |
| | 346 | | (x) => |
| | 347 | | { |
| 300 | 348 | | if (x.owner != null) |
| 216 | 349 | | x.owner.RefreshDCLLayout(refreshSize, refreshAlignmentAndPosition); |
| 300 | 350 | | }, |
| | 351 | | rootParent.referencesContainer.transform); |
| 132 | 352 | | } |
| | 353 | |
|
| | 354 | | public void FixMaxStretchRecursively() |
| | 355 | | { |
| 55 | 356 | | UIShape rootParent = GetRootParent(); |
| | 357 | |
|
| 55 | 358 | | Assert.IsTrue(rootParent != null, "root parent must never be null"); |
| | 359 | |
|
| 55 | 360 | | if (rootParent.referencesContainer == null) |
| 1 | 361 | | return; |
| | 362 | |
|
| 54 | 363 | | Utils.InverseTransformChildTraversal<UIReferencesContainer>( |
| | 364 | | (x) => |
| | 365 | | { |
| 138 | 366 | | if (x.owner != null) |
| | 367 | | { |
| 96 | 368 | | x.rectTransform.SetToMaxStretch(); |
| | 369 | | } |
| 138 | 370 | | }, |
| | 371 | | rootParent.referencesContainer.transform); |
| 54 | 372 | | } |
| | 373 | |
|
| | 374 | | protected bool ReparentComponent(RectTransform targetTransform, string targetParent) |
| | 375 | | { |
| 68 | 376 | | bool targetParentExists = !string.IsNullOrEmpty(targetParent) && |
| | 377 | | scene.componentsManagerLegacy.HasSceneSharedComponent(targetParent); |
| | 378 | |
|
| 68 | 379 | | if (targetParentExists && parentUIComponent == scene.componentsManagerLegacy.GetSceneSharedComponent(targetP |
| | 380 | | { |
| 22 | 381 | | return false; |
| | 382 | | } |
| | 383 | |
|
| 46 | 384 | | if (parentUIComponent != null) |
| | 385 | | { |
| 46 | 386 | | UIReferencesContainer[] parents = referencesContainer.GetComponentsInParent<UIReferencesContainer>(true) |
| | 387 | |
|
| 186 | 388 | | foreach (var parent in parents) |
| | 389 | | { |
| 47 | 390 | | if (parent.owner != null) |
| | 391 | | { |
| 47 | 392 | | parent.owner.OnChildDetached(parentUIComponent, this); |
| | 393 | | } |
| | 394 | | } |
| | 395 | | } |
| | 396 | |
|
| 46 | 397 | | if (targetParentExists) |
| | 398 | | { |
| 22 | 399 | | parentUIComponent = scene.componentsManagerLegacy.GetSceneSharedComponent(targetParent) as UIShape; |
| 22 | 400 | | } |
| | 401 | | else |
| | 402 | | { |
| 24 | 403 | | parentUIComponent = scene.componentsManagerLegacy.GetSceneSharedComponent<UIScreenSpace>(); |
| | 404 | | } |
| | 405 | |
|
| 46 | 406 | | targetTransform.SetParent(parentUIComponent.childHookRectTransform, false); |
| 46 | 407 | | return true; |
| | 408 | | } |
| | 409 | |
|
| | 410 | | public UIShape GetRootParent() |
| | 411 | | { |
| 290 | 412 | | UIShape parent = null; |
| | 413 | |
|
| 290 | 414 | | if (parentUIComponent != null && !(parentUIComponent is UIScreenSpace)) |
| | 415 | | { |
| 6 | 416 | | parent = parentUIComponent.GetRootParent(); |
| 6 | 417 | | } |
| | 418 | | else |
| | 419 | | { |
| 284 | 420 | | parent = this; |
| | 421 | | } |
| | 422 | |
|
| 290 | 423 | | return parent; |
| | 424 | | } |
| | 425 | |
|
| | 426 | | protected void ConfigureAlignment(LayoutGroup layout) |
| | 427 | | { |
| 266 | 428 | | Model model = (Model) this.model; |
| 266 | 429 | | switch (model.vAlign) |
| | 430 | | { |
| | 431 | | case "top": |
| 7 | 432 | | switch (model.hAlign) |
| | 433 | | { |
| | 434 | | case "left": |
| 2 | 435 | | layout.childAlignment = TextAnchor.UpperLeft; |
| 2 | 436 | | break; |
| | 437 | | case "right": |
| 2 | 438 | | layout.childAlignment = TextAnchor.UpperRight; |
| 2 | 439 | | break; |
| | 440 | | default: |
| 3 | 441 | | layout.childAlignment = TextAnchor.UpperCenter; |
| 3 | 442 | | break; |
| | 443 | | } |
| | 444 | |
|
| | 445 | | break; |
| | 446 | | case "bottom": |
| 26 | 447 | | switch (model.hAlign) |
| | 448 | | { |
| | 449 | | case "left": |
| 8 | 450 | | layout.childAlignment = TextAnchor.LowerLeft; |
| 8 | 451 | | break; |
| | 452 | | case "right": |
| 16 | 453 | | layout.childAlignment = TextAnchor.LowerRight; |
| 16 | 454 | | break; |
| | 455 | | default: |
| 2 | 456 | | layout.childAlignment = TextAnchor.LowerCenter; |
| 2 | 457 | | break; |
| | 458 | | } |
| | 459 | |
|
| | 460 | | break; |
| | 461 | | default: // center |
| 233 | 462 | | switch (model.hAlign) |
| | 463 | | { |
| | 464 | | case "left": |
| 2 | 465 | | layout.childAlignment = TextAnchor.MiddleLeft; |
| 2 | 466 | | break; |
| | 467 | | case "right": |
| 2 | 468 | | layout.childAlignment = TextAnchor.MiddleRight; |
| 2 | 469 | | break; |
| | 470 | | default: |
| 229 | 471 | | layout.childAlignment = TextAnchor.MiddleCenter; |
| | 472 | | break; |
| | 473 | | } |
| | 474 | |
|
| | 475 | | break; |
| | 476 | | } |
| 229 | 477 | | } |
| | 478 | |
|
| | 479 | | protected void SetComponentDebugName() |
| | 480 | | { |
| 146 | 481 | | if (referencesContainer == null || model == null) |
| | 482 | | { |
| 0 | 483 | | return; |
| | 484 | | } |
| | 485 | |
|
| 146 | 486 | | referencesContainer.name = componentName; |
| 146 | 487 | | } |
| | 488 | |
|
| | 489 | | public override void Dispose() |
| | 490 | | { |
| | 491 | |
|
| 7 | 492 | | if (childHookRectTransform) |
| 7 | 493 | | Utils.SafeDestroy(childHookRectTransform.gameObject); |
| | 494 | |
|
| 7 | 495 | | screenSize.OnChange -= OnScreenResize; |
| | 496 | |
|
| 7 | 497 | | base.Dispose(); |
| 7 | 498 | | } |
| | 499 | |
|
| 115 | 500 | | public virtual void OnChildAttached(UIShape parentComponent, UIShape childComponent) { } |
| | 501 | |
|
| 38 | 502 | | public virtual void OnChildDetached(UIShape parentComponent, UIShape childComponent) { } |
| | 503 | | public void Refresh() |
| | 504 | | { |
| 55 | 505 | | RefreshRecursively(); |
| 55 | 506 | | isLayoutDirty = false; |
| | 507 | |
|
| 55 | 508 | | OnLayoutRefresh?.Invoke(); |
| 55 | 509 | | OnLayoutRefresh = null; |
| 55 | 510 | | } |
| | 511 | | } |
| | 512 | | } |