Merge pull request #6896 from samme/docs/move-above-below

Docs: clarify `moveAbove()`, `moveBelow()`
This commit is contained in:
Richard Davey 2024-08-25 21:26:00 +01:00 committed by GitHub
commit f424a48389
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 20 additions and 6 deletions

View file

@ -818,6 +818,7 @@ var Container = new Class({
/** /**
* Moves a Game Object above another one within this Container. * Moves a Game Object above another one within this Container.
* If the Game Object is already above the other, it isn't moved.
* *
* These 2 Game Objects must already be children of this Container. * These 2 Game Objects must already be children of this Container.
* *
@ -841,6 +842,7 @@ var Container = new Class({
/** /**
* Moves a Game Object below another one within this Container. * Moves a Game Object below another one within this Container.
* If the Game Object is already below the other, it isn't moved.
* *
* These 2 Game Objects must already be children of this Container. * These 2 Game Objects must already be children of this Container.
* *

View file

@ -1536,6 +1536,7 @@ var SceneManager = new Class({
/** /**
* Moves a Scene so it is immediately above another Scene in the Scenes list. * Moves a Scene so it is immediately above another Scene in the Scenes list.
* If the Scene is already above the other, it isn't moved.
* *
* This means it will render over the top of the other Scene. * This means it will render over the top of the other Scene.
* *
@ -1583,6 +1584,7 @@ var SceneManager = new Class({
/** /**
* Moves a Scene so it is immediately below another Scene in the Scenes list. * Moves a Scene so it is immediately below another Scene in the Scenes list.
* If the Scene is already below the other, it isn't moved.
* *
* This means it will render behind the other Scene. * This means it will render behind the other Scene.
* *

View file

@ -836,9 +836,10 @@ var ScenePlugin = new Class({
}, },
/** /**
* Swaps the position of two scenes in the Scenes list, so that Scene B is directly above Scene A. * Moves a Scene so it is immediately above another Scene in the Scenes list.
* If the Scene is already above the other, it isn't moved.
* *
* This controls the order in which they are rendered and updated. * This means it will render over the top of the other Scene.
* *
* @method Phaser.Scenes.ScenePlugin#moveAbove * @method Phaser.Scenes.ScenePlugin#moveAbove
* @since 3.2.0 * @since 3.2.0
@ -864,9 +865,10 @@ var ScenePlugin = new Class({
}, },
/** /**
* Swaps the position of two scenes in the Scenes list, so that Scene B is directly below Scene A. * Moves a Scene so it is immediately below another Scene in the Scenes list.
* If the Scene is already below the other, it isn't moved.
* *
* This controls the order in which they are rendered and updated. * This means it will render behind the other Scene.
* *
* @method Phaser.Scenes.ScenePlugin#moveBelow * @method Phaser.Scenes.ScenePlugin#moveBelow
* @since 3.2.0 * @since 3.2.0

View file

@ -356,7 +356,9 @@ var List = new Class({
}, },
/** /**
* Moves the given array element above another one in the array. * Moves an item above another one in the List.
* If the given item is already above the other, it isn't moved.
* Above means toward the end of the List.
* *
* @method Phaser.Structs.List#moveAbove * @method Phaser.Structs.List#moveAbove
* @since 3.55.0 * @since 3.55.0
@ -372,7 +374,9 @@ var List = new Class({
}, },
/** /**
* Moves the given array element below another one in the array. * Moves an item below another one in the List.
* If the given item is already below the other, it isn't moved.
* Below means toward the start of the List.
* *
* @method Phaser.Structs.List#moveBelow * @method Phaser.Structs.List#moveBelow
* @since 3.55.0 * @since 3.55.0

View file

@ -6,6 +6,8 @@
/** /**
* Moves the given array element above another one in the array. * Moves the given array element above another one in the array.
* If the given element is already above the other, it isn't moved.
* Above means toward the end of the array.
* The array is modified in-place. * The array is modified in-place.
* *
* @function Phaser.Utils.Array.MoveAbove * @function Phaser.Utils.Array.MoveAbove

View file

@ -6,6 +6,8 @@
/** /**
* Moves the given array element below another one in the array. * Moves the given array element below another one in the array.
* If the given element is already below the other, it isn't moved.
* Below means toward the start of the array.
* The array is modified in-place. * The array is modified in-place.
* *
* @function Phaser.Utils.Array.MoveBelow * @function Phaser.Utils.Array.MoveBelow