diff --git a/language/zh/global.json b/language/zh/global.json index f8d468a91..a0d4075ee 100644 --- a/language/zh/global.json +++ b/language/zh/global.json @@ -231,6 +231,7 @@ "Example 1: Basic Use":"示例1:基本使用", "Example 1: Check if any of the given values is present in an array":"示例1:检查数组中是否存在任何给定值", "Example 1: Copying an entire buffer\u0027s contents":"示例 1:复制整个缓冲区的内容", + "Example 1: Creating An Empty Node":"示例 1:创建空节点", "Example 1: Deleting the first 5 elements":"示例1:删除前5个元素", "Example 1: Inserting a single value":"示例1:插入单个值", "Example 1: Launching an Included Game (on Windows)":"示例 1:启动附带的游戏 (在 Windows 上)", @@ -257,6 +258,7 @@ "Example 2: Negative Offset & Stride":"示例 2:负偏移量和负偏移量跨步", "Example 2: Optimised Removal of the Same Variable in Many Items":"示例 2:在多个项中优化删除相同变量", "Example 2: Optional Properties":"示例 2:可选属性", + "Example 2: Passing a Struct":"示例 2:传递结构", "Example 2: Playing a sound on an emitter (similar to audio_play_sound_on)":"示例 2:在发射器上播放声音 (类似于 audio_play_sound_on)", "Example 2: Pretty Print":"示例2:美化输出", "Example 2: Progressively Drawing a Line":"示例 2:逐步绘制一条线", @@ -275,6 +277,7 @@ "Example 3: Deleting a range":"示例3:删除范围", "Example 3: Groups of Vertices":"示例 3:顶点组", "Example 3: Overriding Values":"示例 3:覆盖值", + "Example 3: Passing a JSON String":"示例 3:传递 JSON 字符串", "Example 3: Playing a sound at a given position in 3D audio space (similar to audio_play_sound_at)":"示例 3:在 3D 音频空间中的给定位置播放声音 (类似于 audio_play_sound_at)", "Example 3: Rotate an Array":"示例3:旋转数组", "Example 3: Stride set to 0":"示例 3:步幅设置为 0", @@ -309,6 +312,8 @@ "Filters":"滤镜", "Filters and Effects":"滤镜和效果", "Fixtures":"装置", + "Flex Panel Functions":"柔性面板函数", + "Flex Panel Struct Members":"柔性面板结构成员", "Flex Panels":"柔性面板", "Flick Event":"轻击事件", "Floating point numbers are numbers that contain decimal points. For example, the numbers 5.5, 0.001, and -2,345.6789 are floating point numbers. Numbers that do not have decimal places are called integers (e.g. 2, 56, 1400).":"浮点数是包含浮点小数的数字。例如,数字5.5、0.001和-2,345.6789是浮点数。没有小数位的数字称为整数。", @@ -526,6 +531,8 @@ "Project Image Generator":"项目图像生成器", "Project Tool":"项目工具", "ProjectTool":"项目工具", + "Property":"属性", + "Property Value":"属性的值", "Purchasing An Asset":"购买资源", "Push Notifications":"推送通知", "Quick Start Guide":"快速入门指南", @@ -643,6 +650,7 @@ "Struct Forbidden Variables":"结构禁止的变量", "Struct Member":"结构成员", "Structs & Constructors":"结构与构造函数", + "Styling Functions":"样式函数", "Submission Guidelines":"提交指引", "Summary":"总结", "Surfaces":"表面", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/DS_Grids.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/DS_Grids.json index a68f588d6..aa05e0f26 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/DS_Grids.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/DS_Grids.json @@ -1,10 +1,12 @@ { + "A DS grid is a type of{} {}array{} with 2 dimensions{}. You define the grid by setting its integer width and height, which sets the total number of \"cells\" within the grid (the width and height multiplied). These cells are then used to hold different data values (real numbers or strings).":"DS 网格是一种具有 2 维的{} {} 数组 {}。 您可以通过设置网格的整数宽度和高度来定义网格,这设置了网格内 \" 单元格 \" 的总数 (宽度和高度的乘积)。然后,这些单元格用于保存不同的数据值 (实数或字符串)。", "A DS grid is basically a type of{} {}array{} with 2 dimensions{}. You define the grid by setting its integer width and height, which then sets the total number of \"cells\" within the grid (the width and height multiplied) and these cells are then used to hold different data values (real numbers or strings).":"DS网格基本上是具有2个维度{}的{}{}数组{}的类型。您可以通过设置网格的整数宽度和高度来定义网格,然后设置网格中\"单元格\"的总数(宽度和高度的乘积),这些单元格将用于保存不同的数据值(实数或字符串)。", "Apart from the specific functions listed below you can all use an {}expression{} (called an {}accessor{}) to add or modify the contents of your DS grid. This accessor looks similar to a 2D array with the following syntax:":"除了下面列出的特定函数外,您还可以使用 {} 表达式 {}( 称为 {} 访问器 {}) 来添加或修改 DS 网格的内容。此存取器类似于 2D 阵列,具有以下语法:", "DS Grids":"DS 网格", "Function Reference":"功能参考", "General":"基本", "MP Grid":"MP网格", + "Serialisation":"序列化", "Serialization":"序列化", "The following functions exist that deal with DS grids:":"存在以下处理DS网格的函数:", "When accessing DS grid data structures, you should always try to use {}integer values{} for the cell position, and all non-integer indices will be floored by {}GameMaker{} if you do not. If that is not what you require, then you will need to do the rounding yourself previously before passing the index that you wish to check.":"访问D的网格数据结构时,应始终尝试对单元格位置使用{}整数值{},否则{}GameMaker{}将泛洪所有非整数索引。如果这不是您所需要的,那么在传递要检查的索引之前,您需要先进行舍入。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_create.json index 659026582..f8d2e555f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_create.json @@ -3,6 +3,7 @@ "The width of the grid to be created.":"要创建的网格的宽度。", "This creates a grid 10 cells high and 10 cells wide.":"这将创建一个高10个单元格和宽10个单元格的栅格。", "This function creates a new DS grid data structure of the specified cell width and height. The function returns an ID which must be used in all further functions that deal with this DS grid.":"此函数创建指定单元格宽度和高度的新 DS 网格数据结构。该函数返回一个 ID,必须在处理此 DS 网格的所有其他函数中使用该 ID。", + "This function creates a new DS grid data structure of the specified cell width and height. The function returns {}{}DS Grid{}{} {}{}Handle{}{} which must be used in all further functions that deal with this DS grid.":"此函数创建指定单元格宽度和高度的新 DS 网格数据结构。该函数返回 {}{}DS Grid{}{} {}{}Handle{}{},必须在处理此 DS 网格的所有其他函数中使用它。", "With this function you can create a new DS grid data structure of the specified cell width and height. This function returns an id which must be used in all further functions that deal with this DS grid.":"使用此函数,可以创建具有指定单元格宽度和高度的新DS网格数据结构。此函数返回一个ID,该ID必须用于处理此DS网格的所有其他函数。", "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引是重复使用的,因此销毁的数据结构索引值之后可能会被新创建的索引值使用。", "{}{}IMPORTANT{}{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}ds_exists{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards.":"{}{} 重要信息{}{} 创建数据结构时,用于标识该数据结构的索引值是从 0 开始的整数值。这意味着不同类型的数据结构可以具有 {} 相同 {} 的索引值,因此如果有疑问,您应该在访问它们之前使用 {}{}ds_exists{}{} 函数。另请注意,索引是重复使用的,因此被破坏的数据结构索引值可能会被随后新创建的索引值使用。" diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_destroy.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_destroy.json index 69808fbf6..d9a7df71c 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_destroy.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Grids/ds_grid_destroy.json @@ -1,6 +1,9 @@ { "The above code will check the value of the built in global variable \"lives\" and if it is 0, it destroys the DS grid indexed in the variable \"Wall_Grid\" and then changes rooms.":"上述代码将检查内置全局变量\"life\"的值,如果该值为0,则会销毁变量\"Wall_Grid\"中索引的DS网格,然后更改房间。", + "The above code will check the value of the built in global variable {}{}lives{}{} and if it is 0, it destroys the DS grid referenced in the variable {}Wall_Grid{} and then changes rooms.":"上面的代码将检查内置全局变量 {}{}lives{}{} 的值,如果为 0,则会销毁变量 {}Wall_Grid{} 中引用的 DS 网格,然后更改房间。", + "This function will remove the given grid data structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS grid to prevent memory leaks that can slow down and crash your game.":"此函数将从内存中删除给定的网格数据结构,释放其正在使用的资源并删除其包含的所有值。当您使用完 DS grid 后,应始终使用此功能,以防止内存泄漏导致游戏速度减慢和崩溃。", "This function will remove the given grid data-structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS grid to prevent memory leaks that can slow down and crash your game.":"此函数将从内存中删除给定的网格数据结构,从而释放它使用的资源并删除它包含的所有值。完成使用DS网格时,应始终使用此函数,以防止内存泄漏,从而降低速度并导致游戏崩溃。", "This index of the grid to destroy.":"要销毁的网格的索引。", - "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。" + "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。", + "{}{}NOTE{}{} You should always set the variable that held the data structure reference to -1 after calling this function, since the reference will no longer be valid.":"{}{} 注意{}{} 调用此函数后,您应始终将保存数据结构引用的变量设置为 -1,因为该引用将不再有效。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/DS_Lists.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/DS_Lists.json index e09563525..14cf05027 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/DS_Lists.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/DS_Lists.json @@ -1,11 +1,17 @@ { + "A DS list is a data structure that stores information sequentially as it is added (much like an {}array{}). DS lists are very flexible data structures that permit you to add values at the end or insert them somewhere in the middle of the list, as well as giving you the ability to shuffle the order (to randomise the values) or sort them in an ascending or descending order.":"DS 列表是一种数据结构,它在添加信息时按顺序存储信息 (很像 {} 数组 {})。 DS 列表是非常灵活的数据结构,允许您在末尾添加值或将它们插入到列表中间的某个位置,并且使您能够打乱顺序 (随机化值) 或按升序对它们进行排序或降序排列。", "A DS list is a data-structure that stores information sequentially as it is added (much like an {}array{}). DS lists are very flexible data structures that permit you to add values at the end or insert them somewhere in the middle of the list, as well as giving you the ability to shuffle the order (to randomise the values) or sort them in an ascending or descending order.":"DS列表是一种数据结构,它在添加时按顺序存储信息(非常类似于{}数组{})。DS列表是非常灵活的数据结构,允许您在列表末尾添加值或在列表中间的某个位置插入值,并使您能够改变顺序(随机化值)或按升序或降序对其进行排序。", "Apart from the specific functions listed below you can all use an {}expression{} (called an {}accessor{}) to add or modify the contents of your DS list. This accessor looks similar to a 1D array with the following syntax:":"除了下面列出的特定函数外,您还可以使用{}表达式{}(称为{}访问器{})来添加或修改DS列表的内容。此存取器类似于1D阵列,具有以下语法:", "DS Lists":"DS 列表", + "DS lists can be used hold {}DS maps{} and other DS lists too, and so we have some special functions that are used to \"flag\" or \"mark\" positions within the list as holding these data structures. In general this is not required, but it has the advantage of automatically garbage collecting (destroying) the marked data structures when the parent list is destroyed, and it\u0027s also required when used in conjunction with the {}{}json_encode{}{} function so that the list and its data are properly encoded. The functions for this are:":"DS 列表也可用于保存 {}DS 映射 {} 和其他 DS 列表,因此我们有一些特殊函数,用于将列表中的位置 \" 标记 \" 或 \" 标记 \" 为保存这些数据结构。一般来说,这不是必需的,但它的优点是在销毁父列表时自动垃圾收集 (销毁) 标记的数据结构,并且与 {}{}json_encode{}{} 函数结合使用时也是必需的以便列表及其数据被正确编码。其功能是:", "Ds lists can be used hold {}DS maps{} and other DS lists too, and so we have some special functions that are used to \"flag\" or \"mark\" positions within the list as holding these data structures. In general this is not required, but it has the advantage of automatically garbage collecting (destroying) the marked data structures when the parent list is destroyed, and it\u0027s also required when used in conjunction with the {}{}json_encode(){}{} function so that the list and it\u0027s data is properly encoded. The functions for this are:":"DS列表也可以用于保存{}DS映射{}和其他DS列表,因此我们有一些特殊函数用于\"标记\"或\"标记\"列表中的位置以保存这些数据结构。一般来说,这不是必需的,但它的优点是,当父列表被销毁时,它会自动垃圾收集(销毁)标记的数据结构,并且当与{}{}json_encode{}{}函数结合使用时,它也是必需的,以便列表及其数据得到正确编码。这方面的函数是:", + "Function Reference":"功能参考", + "General":"常规", + "Serialisation":"序列化", "The following functions exist that deal with DS lists:":"存在以下处理DS列表的函数:", "When accessing DS list data structures, you should always try to use {}integer values{} for the list position, and all non-integer indices will be floored by {}GameMaker{} if you do not. If that is not what you require, then you will need to do the rounding yourself previously before passing the index that you wish to check.":"访问DS列表数据结构时,您应该始终尝试使用{}整数值{}作为列表位置,如果不这样做,所有非整数索引都将被{}GameMaker{}打乱。如果这不是您所需要的,那么在传递您希望检查的索引之前,您需要自己进行四舍五入。", "You can find more information, plus examples, from from the GML Overview page on {}Accessors{}.":"您可以从{}访问器{}的GML概述页面中找到更多信息和示例。", + "You can find more information, plus examples, from the GML Overview page on {}Accessors{}.":"您可以从有关 {} 访问器 {} 的 GML 概述页面找到更多信息以及示例。", "{}NOTE{}: As with all dynamic resources, data structures take up memory and so should {}always{} be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.":"{}注意{}:与所有动态资源一样,数据结构占用内存,因此当不再需要防止内存泄漏时,应始终销毁{}{},这将降低速度并最终导致游戏崩溃。", "{}NOTE{}: It is recommended to use {}arrays{} over DS lists as they have similar features, are easier to use and are garbage collected automatically.":"{}注意{}:建议在DS列表上使用{}数组{},因为它们具有相似的函数、更易于使用并且会自动进行垃圾收集。", "{}{}NOTE{}{} As with all dynamic resources, data structures take up memory and so should {}always{} be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.":"{}{} 注意{}{} 与所有动态资源一样,数据结构也会占用内存,因此在不再需要时应 {} 始终 {} 销毁,以防止内存泄漏,否则会减慢游戏速度并最终崩溃。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_create.json index 3687fdd21..fd82fd8a8 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_create.json @@ -1,5 +1,8 @@ { + "This function creates a new list data structure and returns a {}{}Handle{}{} to it. This value should be stored in a variable and used in all further function calls relating to the list.":"此函数创建一个新的列表数据结构并向其返回一个 {}{} 句柄 {}{}。该值应存储在变量中,并在与列表相关的所有进一步函数调用中使用。", "This function will create a new list data-structure and return the index value. This value should be stored in a variable and used in all further function calls relating to the list. Note that if you try and access a value in the list {}before{} it has been populated - i.e. the list is \"empty\" - then the return value may be 0 since internally the first few entries in the list are set when created to minimize performance issues when initially adding items to the list (although the {}{}ds_list_size(){}{} function will still return 0 on a newly created list). If you wish to ensure that the list is \"truly\" empty on create, then you should call {}{}ds_list_clear(){}{} after creating the list, which will then mean that any values returned for unpopulated list slots will be {}undefined{}.":"此函数将创建一个新的列表数据结构并返回索引值。此值应存储在变量中,并用于与列表相关的所有进一步函数调用。请注意,如果您在{}之前尝试访问列表{}中的某个值,该值已被填充,即列表为\"空\",则返回值可能为0,因为在内部,创建列表时会将列表中的前几个条目设置为最小化最初向列表中添加项时的性能问题(尽管{}{}ds_list_size(){}{}函数仍会在新创建的列表中返回0)。如果希望在创建时确保列表\"真正\"为空,则应在创建列表后调用{}{}ds_list_clear(){}{},这意味着为未填充的列表动态内容返回的任何值都将{}未定义{}。", "This will create a new list and assign its index id to the instance variable \"list\".":"这将创建一个新列表,并将其索引ID分配给实例变量\"list\"。", - "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indexes are re-used, so a destroyed data structure index value may be used by a newly created one afterwards.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引是重复使用的,因此销毁的数据结构索引值之后可能会被新创建的索引值使用。" + "This will create a new list and assign its index id to the instance variable {}list{}.":"这将创建一个新列表并将其索引 ID 分配给实例变量 {}list{}。", + "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indexes are re-used, so a destroyed data structure index value may be used by a newly created one afterwards.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引是重复使用的,因此销毁的数据结构索引值之后可能会被新创建的索引值使用。", + "{}{}NOTE{}{} If you try and access a value in the list {}before{} it has been populated - i.e. the list is \"empty\" - then the return value may be 0 since internally the first few entries in the list are set when created to minimize performance issues when initially adding items to the list (although the {}{}ds_list_size{}{} function will still return 0 on a newly created list). If you wish to ensure that the list is \"truly\" empty on create, then you should call {}{}ds_list_clear{}{} after creating the list, which will then mean that any values returned for unpopulated list slots will be {}undefined{}.":"{}{} 注意{}{} 如果您在填充列表 {} 之前 {} 尝试访问列表中的值 (即列表为 \" 空 \"),则返回值可能为 0,因为在内部是前几个条目列表中的内容在创建时进行设置,以最大程度地减少最初向列表添加项目时的性能问题 (尽管 {}{}ds_list_size{}{} 函数在新创建的列表上仍将返回 0)。如果您希望确保列表在创建时 \" 真正 \" 为空,那么您应该在创建列表后调用 {}{}ds_list_clear{}{},这意味着为未填充的列表槽位返回的任何值都将为 {} 不明确的 {}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_destroy.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_destroy.json index 01d2c8651..98b42bb21 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_destroy.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_destroy.json @@ -1,6 +1,10 @@ { "The above code will check the value of the built in global variable \"lives\" and if it is 0, it destroys the DS list indexed in the variable \"AI_list\" and then changes rooms.":"上述代码将检查内置全局变量\"life\"的值,如果为0,则会销毁变量\"AI_list\"中索引的DS列表,然后更换房间。", + "The above code will check the value of the built-in global variable {}{}lives{}{} and if it is 0, it destroys the DS list indexed in the variable {}AI_list{} and then changes rooms.":"上面的代码将检查内置全局变量 {}{}lives{}{} 的值,如果为 0,则会销毁变量 {}AI_list{} 中索引的 DS 列表,然后更改房间。", "The id of the data structure to remove.":"要删除的数据结构的ID。", + "This function will remove the given list data structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS list to prevent memory leaks that can slow down and crash your game.":"此函数将从内存中删除给定的列表数据结构,释放它正在使用的资源并删除它包含的所有值。当您使用完 DS 列表后,应始终使用此功能,以防止内存泄漏导致游戏速度减慢和崩溃。", "This function will remove the given list data-structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the ds_list to prevent memory leaks that can slow down and crash your game. Note that destroying a list will de-reference any data structures stored in it giving a memory leak, so you would need to go through the list and destroy all data structure items manually before destroying it to prevent this. The only time this is not required is when you have flagged any items in the list as another {}DS list{} or as a {}DS map{}, in which case these items will be destroyed and their memory cleaned up automatically as well.":"此函数将从内存中删除给定的列表数据结构,从而释放它正在使用的资源并删除它包含的所有值。完成使用ds_list时,应始终使用此函数,以防止内存泄漏,从而降低游戏速度并导致游戏崩溃。请注意,销毁列表将取消引用存储在其中的任何数据结构,从而导致内存泄漏,因此您需要在销毁列表之前手动查看并销毁所有数据结构项,以防止出现这种情况。唯一不需要执行此操作的时间是将列表中的任何项目标记为另一个{}DS列表{}或{}DS映射{}时,在这种情况下,这些项目将被销毁,并自动清理其内存。", - "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。" + "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。", + "{}{}NOTE{}{} Destroying a list will de-reference any data structures stored in it giving a memory leak, so you would need to go through the list and destroy all data structure items manually before destroying it to prevent this. The only time this is not required is when you have flagged any items in the list as another {}DS list{} or as a {}DS map{}, in which case these items will be destroyed and their memory cleaned up automatically as well.":"{}{} 注意{}{} 销毁列表将取消引用存储在其中的任何数据结构,从而导致内存泄漏,因此您需要在销毁列表之前手动遍历列表并销毁所有数据结构项,以防止出现这种情况。唯一不需要这样做的情况是,当您将列表中的任何项目标记为另一个 {}DS 列表 {} 或 {}DS 地图 {} 时,在这种情况下,这些项目将被销毁,并且它们的内存将自动清理,如下所示:出色地。", + "{}{}NOTE{}{} You should always set the variable that held the data structure reference to -1 after calling this function, since the reference will no longer be valid.":"{}{} 注意{}{} 调用此函数后,您应始终将保存数据结构引用的变量设置为 -1,因为该引用将不再有效。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_is_list.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_is_list.json index cf9565c3d..c7438460c 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_is_list.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_is_list.json @@ -1,7 +1,9 @@ { "Note that this will only detect lists that were manually marked using the{} {}{}{}ds_list_mark_as_list(){}{}{} {}function.":"请注意,这将仅检测使用{}{}{}{}ds_list_mark_as_list(){}{}{}{}函数手动标记的列表。", + "The ID of the list to check.":"要检查的列表的 ID。", "The above code loops through a DS list and checks to see if any of the entries contain other list IDs. If they do, then these lists are destroyed, and then the main list is destroyed after the loop is finished.":"上述代码循环浏览DS列表并检查是否有任何条目包含其他列表ID。如果是这样,则会销毁这些列表,并在循环完成后销毁主列表。", "The id of the list to check.":"要检查的列表的ID。", "The position within the list to check.":"列表中要检查的位置。", - "With this function you can check to see if another DS list is stored at the given position within a DS list. If the given position contains a DS list ID, then the function will return {}true{} otherwise it will return {}false{}.":"使用此函数,您可以检查是否在DS列表中的给定位置存储了另一个DS列表。如果给定位置包含DS列表ID,则函数将返回{}true{},否则将返回{}false{}。" + "With this function you can check to see if another DS list is stored at the given position within a DS list. If the given position contains a DS list ID, then the function will return {}true{} otherwise it will return {}false{}.":"使用此函数,您可以检查是否在DS列表中的给定位置存储了另一个DS列表。如果给定位置包含DS列表ID,则函数将返回{}true{},否则将返回{}false{}。", + "{}{}NOTE{}{} This will only detect lists that were manually marked using the {}{}ds_list_mark_as_list{}{} function.":"{}{} 注意{}{} 这只会检测使用 {}{}ds_list_mark_as_list{}{} 函数手动标记的列表。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_is_map.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_is_map.json index cd9efb3b0..b5d81d136 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_is_map.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_is_map.json @@ -1,7 +1,9 @@ { "Note that this will only detect maps that were manually marked using the{} {}{}{}ds_list_mark_as_map(){}{}{} {}function.":"请注意,这将仅检测使用{}{}{}{}ds_list_mark_as_map(){}{}{}{}函数手动标记的贴图。", + "The ID of the list to check.":"要检查的列表的 ID。", "The above code loops through a DS list and checks to see if any of the entries contain map IDs. If they do, then these maps are destroyed, and then the main list is destroyed after the loop is finished.":"上述代码循环浏览DS列表并检查是否有任何条目包含映射ID。如果是这样,那么这些地图将被销毁,然后在循环完成后销毁主列表。", "The id of the list to check.":"要检查的列表的ID。", "The position within the list to check.":"列表中要检查的位置。", - "With this function you can check to see if a {}DS map{} is stored at the given position within a DS list. If the given position contains a DS map ID, then the function will return {}true{} otherwise it will return {}false{}.":"使用此函数,您可以检查{}DS映射{}是否存储在DS列表中的给定位置。如果给定位置包含DS映射ID,则函数将返回{}true{},否则将返回{}false{}。" + "With this function you can check to see if a {}DS map{} is stored at the given position within a DS list. If the given position contains a DS map ID, then the function will return {}true{} otherwise it will return {}false{}.":"使用此函数,您可以检查{}DS映射{}是否存储在DS列表中的给定位置。如果给定位置包含DS映射ID,则函数将返回{}true{},否则将返回{}false{}。", + "{}{}NOTE{}{} This will only detect maps that were manually marked using the {}{}ds_list_mark_as_map{}{} function.":"{}{} 注意{}{} 这只会检测使用 {}{}ds_list_mark_as_map{}{} 函数手动标记的地图。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_mark_as_list.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_mark_as_list.json index 70a383a4a..e1ccaf334 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_mark_as_list.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_mark_as_list.json @@ -1,7 +1,12 @@ { "It is also worth noting that if the position that has been marked changes within the list, the \"mark\" will move with it, so if you have marked position 3 in the list (for example) and then insert 2 more items below it so it moves up to position 5, it will {}still{} be marked as a list.":"另外值得注意的是,如果已标记的位置在列表中发生变化,则\"mark\"将随之移动,因此,如果您在列表中标记了位置3(例如),然后在其下面再插入2个项目,使其向上移动到位置5,则仍将{}标记为列表。", + "The ID of the list to mark.":"要标记的列表的 ID。", "The above code creates two DS list, then populates one with various values from global variables. This list is then added into the second list, and the position \"marked\" as such so that it can be correctly encoded later.":"上述代码创建两DS列表,然后使用全局变量中的各种值填充一个DS列表。然后将该列表添加到第二个列表中,并将该位置\"标记为\",以便以后可以对其进行正确编码。", + "The above code creates two DS lists, then populates one with various values from global variables. This list is then added into the second list, and the position \"marked\" as such so that it can be correctly encoded later.":"上面的代码创建两个 DS 列表,然后用全局变量中的各种值填充一个列表。然后将该列表添加到第二个列表中,并 \" 标记 \" 该位置,以便稍后可以对其进行正确编码。", "The id of the list to mark.":"要标记的列表的ID。", "The position within the list to mark.":"列表中要标记的位置。", - "This function will \"mark\" (or \"flag\") a given position within a previously created DS list as holding another DS list. This functionality is required when encoding JSON strings (which you can create using {}{}json_encode(){}{}), but can also be useful when nesting data-structures, as items marked in this way will automatically be garbage collected (destroyed) when the parent DS list is destroyed. This means that you do not have to manually go through the list contents and destroy the marked data structures individually before destroying the \"parent\" list. However, if you delete the list position individually, the DS list it contained will {}not{} be garbage collected and you should call the appropriate DS list destroy function before deleting the item from the parent list position. Also note that if you call the function {}{}ds_list_clear(){}{} on a list, any items flagged as lists will be destroyed as well when the list is cleared.":"此函数将在先前创建的DS列表中的给定位置\"标记\"(或标记)为保存另一个DS列表。在编码JSON字符串(您可以使用{}{}json_encode(){}{}创建)时需要此函数,但在嵌套数据结构时也可以使用此函数,因为在销毁父级DS列表时,以此方式标记的项目将自动被垃圾收集(销毁)。这意味着,在销毁\"父\"列表之前,您不必手动浏览列表内容并单独销毁标记的数据结构。但是,如果您单独删除列表位置,则其中包含的DS列表将{}不会{}被垃圾收集,您应该在从父列表位置删除该项之前调用相应的DS列表销毁函数。另请注意,如果在列表中调用function{}{}ds_list_clear(){}{},则在清除列表时,任何标记为列表的项目也将被销毁。" + "This function will \"mark\" (or \"flag\") a given position within a previously created DS list as holding another DS list.":"该函数将先前创建的 DS 列表中的给定位置 \" 标记 \"( 或 \" 标记 \") 为保存另一个 DS 列表。", + "This function will \"mark\" (or \"flag\") a given position within a previously created DS list as holding another DS list. This functionality is required when encoding JSON strings (which you can create using {}{}json_encode(){}{}), but can also be useful when nesting data-structures, as items marked in this way will automatically be garbage collected (destroyed) when the parent DS list is destroyed. This means that you do not have to manually go through the list contents and destroy the marked data structures individually before destroying the \"parent\" list. However, if you delete the list position individually, the DS list it contained will {}not{} be garbage collected and you should call the appropriate DS list destroy function before deleting the item from the parent list position. Also note that if you call the function {}{}ds_list_clear(){}{} on a list, any items flagged as lists will be destroyed as well when the list is cleared.":"此函数将在先前创建的DS列表中的给定位置\"标记\"(或标记)为保存另一个DS列表。在编码JSON字符串(您可以使用{}{}json_encode(){}{}创建)时需要此函数,但在嵌套数据结构时也可以使用此函数,因为在销毁父级DS列表时,以此方式标记的项目将自动被垃圾收集(销毁)。这意味着,在销毁\"父\"列表之前,您不必手动浏览列表内容并单独销毁标记的数据结构。但是,如果您单独删除列表位置,则其中包含的DS列表将{}不会{}被垃圾收集,您应该在从父列表位置删除该项之前调用相应的DS列表销毁函数。另请注意,如果在列表中调用function{}{}ds_list_clear(){}{},则在清除列表时,任何标记为列表的项目也将被销毁。", + "This functionality is required when encoding JSON strings (which you can create using {}{}json_encode{}{}), but can also be useful when nesting data structures, as items marked in this way will automatically be garbage collected (destroyed) when the parent DS list is destroyed. This means that you do not have to manually go through the list contents and destroy the marked data structures individually before destroying the \"parent\" list. However, if you delete the list position individually, the DS list it contained will {}not{} be garbage collected and you should call the appropriate DS list destroy function before deleting the item from the parent list position. Also note that if you call the function {}{}ds_list_clear{}{} on a list, any items flagged as lists will be destroyed as well when the list is cleared.":"编码 JSON 字符串 (您可以使用 {}{}json_encode{}{} 创建) 时需要此功能,但在嵌套数据结构时也很有用,因为以这种方式标记的项目将在以下情况下自动被垃圾收集 (销毁):父 DS 列表被破坏。这意味着在销毁 \" 父 \" 列表之前,您不必手动检查列表内容并单独销毁标记的数据结构。但是,如果您单独删除列表位置,则其包含的 DS 列表将 {} 不会 {} 被垃圾回收,并且您应该在从父列表位置删除项目之前调用适当的 DS 列表销毁函数。另请注意,如果您在列表上调用函数 {}{}ds_list_clear{}{},则当列表被清除时,所有标记为列表的项目也将被销毁。", + "{}{}NOTE{}{} If the position that has been marked changes within the list, the \"mark\" will move with it, so if you have marked position 3 in the list (for example) and then insert 2 more items below it so it moves up to position 5, it will {}still{} be marked as a list.":"{}{} 注意{}{} 如果列表中已标记的位置发生变化,\"标记 \" 将随之移动,因此如果您在列表中标记了位置 3( 例如),然后再插入 2 个项目因此它会移至位置 5,{} 仍然 {} 被标记为列表。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_mark_as_map.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_mark_as_map.json index 36b11ad4d..9659b2210 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_mark_as_map.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_mark_as_map.json @@ -1,7 +1,12 @@ { "It is also worth noting that if the position that has been marked changes within the list, the \"mark\" will move with it, so if you have marked position 3 in the list (for example) and then insert 2 more items below it so it moves up to position 5, it will {}still{} be marked as a map.":"另外值得注意的是,如果已标记的位置在列表中发生变化,则\"mark\"将随之移动,因此,如果您在列表中标记了位置3(例如),然后在其下面再插入2个项目,使其向上移动到位置5,则仍将{}标记为地图。", + "The ID of the list to mark.":"要标记的列表的 ID。", "The above code creates a DS map and then populates it with two keys, each containing an array of values. This map is then added into the given DS list , and the position \"marked\" as such so that it can be correctly encoded later.":"上述代码创建一个DS映射,然后使用两个密钥填充该映射,每个密钥都包含一个值数组。然后将该映射添加到给定的DS列表中,并将该位置\"标记为\",以便以后可以对其进行正确编码。", + "The above code creates a DS map and then populates it with two keys, each containing an array of values. This map is then added to the given DS list , and the position \"marked\" as such so that it can be correctly encoded later.":"上面的代码创建一个 DS 映射,然后用两个键填充它,每个键包含一个值数组。然后将该映射添加到给定的 DS 列表中,并 \" 标记 \" 该位置,以便稍后可以对其进行正确编码。", "The id of the list to mark.":"要标记的列表的ID。", "The position within the list to mark.":"列表中要标记的位置。", - "This function will \"mark\" (or \"flag\") a given position within a previously created DS list as holding a {}DS map{}. This functionality is required when encoding JSON strings (which you can create using {}{}json_encode(){}{}), but can also be useful when nesting data-structures, as items marked in this way will automatically be garbage collected (destroyed) when the parent DS list is destroyed. This means that you do not have to manually go through the list contents and destroy the marked data structures individually before destroying the \"parent\" list. However, if you delete the list position individually, the data structure it contained will {}not{} be garbage collected and you should call the appropriate DS map destroy function before deleting the parent list position. Also note that if you call the function {}{}ds_list_clear(){}{} on a list, any items flagged as maps will be destroyed as well when the list is cleared.":"此函数将在先前创建的DS列表中\"标记\"(或标记)给定的位置,以保存{}DS映射{}。在编码JSON字符串(您可以使用{}{}json_encode(){}{}创建)时需要此函数,但在嵌套数据结构时也很有用,因为在销毁父DS列表时,以此方式标记的项目将自动被垃圾收集(销毁)。这意味着,在销毁\"父\"列表之前,您不必手动浏览列表内容并单独销毁标记的数据结构。但是,如果单独删除列表位置,则其中包含的数据结构{}将不会{}被垃圾收集,您应该在删除父列表位置之前调用相应的DS映射销毁函数。另请注意,如果在列表中调用函数{}{}ds_list_clear(){}{},则在清除列表时,任何标记为映射的项目也将被销毁。" + "This function will \"mark\" (or \"flag\") a given position within a previously created DS list as holding a {}DS map{}.":"此函数会将先前创建的 DS 列表中的给定位置 \" 标记 \"( 或 \" 标记 \") 为持有 {}DS 地图 {}。", + "This function will \"mark\" (or \"flag\") a given position within a previously created DS list as holding a {}DS map{}. This functionality is required when encoding JSON strings (which you can create using {}{}json_encode(){}{}), but can also be useful when nesting data-structures, as items marked in this way will automatically be garbage collected (destroyed) when the parent DS list is destroyed. This means that you do not have to manually go through the list contents and destroy the marked data structures individually before destroying the \"parent\" list. However, if you delete the list position individually, the data structure it contained will {}not{} be garbage collected and you should call the appropriate DS map destroy function before deleting the parent list position. Also note that if you call the function {}{}ds_list_clear(){}{} on a list, any items flagged as maps will be destroyed as well when the list is cleared.":"此函数将在先前创建的DS列表中\"标记\"(或标记)给定的位置,以保存{}DS映射{}。在编码JSON字符串(您可以使用{}{}json_encode(){}{}创建)时需要此函数,但在嵌套数据结构时也很有用,因为在销毁父DS列表时,以此方式标记的项目将自动被垃圾收集(销毁)。这意味着,在销毁\"父\"列表之前,您不必手动浏览列表内容并单独销毁标记的数据结构。但是,如果单独删除列表位置,则其中包含的数据结构{}将不会{}被垃圾收集,您应该在删除父列表位置之前调用相应的DS映射销毁函数。另请注意,如果在列表中调用函数{}{}ds_list_clear(){}{},则在清除列表时,任何标记为映射的项目也将被销毁。", + "This functionality is required when encoding JSON strings (which you can create using {}{}json_encode{}{}), but can also be useful when nesting data structures, as items marked in this way will automatically be garbage collected (destroyed) when the parent DS list is destroyed. This means that you do not have to manually go through the list contents and destroy the marked data structures individually before destroying the \"parent\" list. However, if you delete the list position individually, the data structure it contained will {}not{} be garbage collected and you should call the appropriate DS map destroy function before deleting the parent list position. Also note that if you call the function {}{}ds_list_clear{}{} on a list, any items flagged as maps will be destroyed as well when the list is cleared.":"编码 JSON 字符串 (您可以使用 {}{}json_encode{}{} 创建) 时需要此功能,但在嵌套数据结构时也很有用,因为以这种方式标记的项目将在以下情况下自动被垃圾收集 (销毁):父 DS 列表被破坏。这意味着在销毁 \" 父 \" 列表之前,您不必手动检查列表内容并单独销毁标记的数据结构。但是,如果您单独删除列表位置,则其包含的数据结构将 {} 不会 {} 被垃圾回收,并且您应该在删除父列表位置之前调用适当的 DS 映射销毁函数。另请注意,如果您在列表上调用函数 {}{}ds_list_clear{}{},则当列表被清除时,所有标记为地图的项目也将被销毁。", + "{}{}NOTE{}{} If the position that has been marked changes within the list, the \"mark\" will move with it, so if you have marked position 3 in the list (for example) and then insert 2 more items below it so it moves up to position 5, it will {}still{} be marked as a list.":"{}{} 注意{}{} 如果列表中已标记的位置发生变化,\"标记 \" 将随之移动,因此如果您在列表中标记了位置 3( 例如),然后再插入 2 个项目因此它会移至位置 5,{} 仍然 {} 被标记为列表。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_set.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_set.json index bf2e2ec71..9ec3bf873 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_set.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Lists/ds_list_set.json @@ -1,7 +1,12 @@ { + "The ID of the list to add to.":"要添加到的列表的 ID。", + "The above code first creates a new DS list and stores it in an instance variable {}list{}. It then adds a few values to the list add finally sets the last value (the third value at index 2) with a call to {}{}ds_list_set{}{}.":"上面的代码首先创建一个新的 DS 列表并将其存储在实例变量 {}list{} 中。然后,它向列表中添加一些值,最后通过调用 {}{}ds_list_set{}{} 设置最后一个值 (索引 2 处的第三个值)。", "The above code will add the value stored in the \"score\" variable into the list indexed in the variable \"sc_list\".":"上述代码将把存储在\"score\"变量中的值添加到变量\"sc_list\"中的索引列表中。", "The id of the list to add to.":"要添加到的列表的ID。", "The position within the list to set.":"要设置的列表中的位置。", "The value to set in the list.":"要在列表中设置的值。", - "This function can be used to set a previously added list entry. You give the list ID (as returned when you created the list) and the position within the list to set as well as the value to set it to. Note that if the entry being set is outside the bounds of the list (ie, you set list entry 20 but the current list only contains 10 entries) then the list will be filled to the given position and each entry will be set to 0. This function is the same as using the {}DS list accessor{}.":"此函数可用于设置先前添加的列表条目。提供列表ID(创建列表时返回的ID)、列表中要设置的位置以及要设置的值。请注意,如果正在设置的条目超出列表的范围(即,您将列表条目设置为20,但当前列表仅包含10个条目),则列表将填充到给定位置,并且每个条目将设置为0。此函数与使用{}DS列表访问器{}相同。" + "This function can be used to set a previously added list entry. You give the list ID (as returned when you created the list) and the position within the list to set as well as the value to set it to. Note that if the entry being set is outside the bounds of the list (ie, you set list entry 20 but the current list only contains 10 entries) then the list will be filled to the given position and each entry will be set to 0. This function is the same as using the {}DS list accessor{}.":"此函数可用于设置先前添加的列表条目。提供列表ID(创建列表时返回的ID)、列表中要设置的位置以及要设置的值。请注意,如果正在设置的条目超出列表的范围(即,您将列表条目设置为20,但当前列表仅包含10个条目),则列表将填充到给定位置,并且每个条目将设置为0。此函数与使用{}DS列表访问器{}相同。", + "This function can be used to set a previously added list entry. It does the same as the {}DS list accessor{}.":"该函数可用于设置先前添加的列表条目。它的作用与 {}DS 列表访问器 {} 相同。", + "You give the list ID (as returned when you created the list) and the position within the list to set as well as the value to set it to.":"您提供列表 ID(在创建列表时返回) 和列表中要设置的位置以及要设置的值。", + "{}{}NOTE{}{} If the entry being set is outside the bounds of the list (i.e., you set list entry 20 but the current list only contains 10 entries) then the list will be filled to the given position and each entry will be set to 0.":"{}{} 注意{}{} 如果所设置的条目超出了列表的范围 (即,您设置了列表条目 20,但当前列表仅包含 10 个条目),则列表将被填充到给定位置,并且每个条目将被设置为 0。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/DS_Maps.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/DS_Maps.json index bc694ef16..b927e1973 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/DS_Maps.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/DS_Maps.json @@ -3,13 +3,16 @@ "Apart from the specific functions listed below you can also use an {}expression{} (called an {}accessor{}) to add or modify the contents of your DS map. This accessor looks similar to a 1D array with the following syntax:":"除了下面列出的特定函数外,您还可以使用{}表达式{}(称为{}访问器{})来添加或修改DS映射的内容。此存取器类似于1D阵列,具有以下语法:", "DS Maps":"DS 映射", "For example, a character in your game can have a quantity of different items ({}keys{}) and for each individual item he can have a number of them ({}values{}), like in an RPG where you can have 10 health potions, 5 mana potions and 100 gold. Maps maintain such pairs all together in one place. You can add pairs to the map, search for the value corresponding to certain keys and use some simple functions.":"例如,游戏中的角色可以拥有一定数量的不同物品 ({} 键 {}),并且对于每个单独的物品,他可以拥有一定数量的物品 ({} 值 {}),就像在 RPG 中一样,您可以拥有 10 种生命药水、5 种法力药水和 100 金币。地图将这些对全部保存在一个地方。您可以将对添加到映射中,搜索与某些键对应的值并使用一些简单的函数。", + "Loading & Saving":"加载与保存", "One of the uses that DS maps have is when working with JSON, and so there are a few special functions that are specific to that:":"DS 映射的一个用途是与 JSON 一起使用时,因此有一些特殊函数专用于:", + "Serialisation":"序列化", "The DS map data structure is an exceptionally useful one as it lets you store {}key{} and {}value{} pairs. For example, a character in your game can have a quantity of different items ({}keys{}) and for each individual item he can have a number of them ({}values{}), like in an RPG where you can have 10 health potions, 5 mana potions and 100 gold. Maps maintain such pairs all together in the one place and you can add pairs to the map and search for the value corresponding to certain keys as well using some simple functions. There are a couple of things you should know about maps before you use them, however! Maps are {}not{} sorted in any (recognisable) way, meaning that to find a certain key you may have to iterate through the whole thing (which is {}very{} slow). There is also no way to hold two keys that are the same, nor can you assign one key two values.":"映射数据结构非常有用,因为它允许您存储{}密钥{}和{}值{}对。例如,游戏中的一个角色可以有一定数量的不同项目({}项目{}),每个项目都可以有一定数量的项目({}值{}),就像Rpg中的一样,在Rpg中可以有10种保健药水、5种法力药水和100种黄金。地图在一个位置将这些对保持在一起,您可以向地图添加对,并使用一些简单的函数搜索与某些关键点对应的值。然而,在使用地图之前,您应该了解一些关于地图的知识!地图{}没有{}以任何(可识别)方式排序,这意味着要找到某个密钥,您可能必须遍历整个过程({}非常{}慢)。也无法保持两个相同的关键点,也无法为一个关键点指定两个值。", "The DS map data structure lets you store {}key{} and {}value{} pairs, making it an exceptionally useful one.":"DS 映射数据结构可让您存储{}键{}和{}值{}对,这使其成为一种非常有用的数据结构。", "The following functions exist that deal with DS maps:":"存在以下处理DS映射的函数:", "There are a couple of things you should know about maps before you use them, however! Maps are {}not{} sorted in any (recognisable) way, meaning that to find a certain key you may have to iterate through the whole thing (which is {}very{} slow). There is also no way to hold two keys that are the same, nor can you assign one key two values.":"然而,在使用地图之前,您应该了解一些有关地图的知识!地图 {} 不 {} 以任何 (可识别的) 方式排序,这意味着要找到某个键\u200B\u200B,您可能必须遍历整个过程 (这 {} 非常 {} 慢)。也无法保存两个相同的键,也无法为一个键分配两个值。", "There are four further functions available for saving and loading a DS map. These functions will obfuscate the map and store it in a secure location on the target platform using a file format that means that the final file is not able to be transfered between devices:":"还有四个函数可用于保存和加载DS映射。这些函数将模糊地图,并使用文件格式将其存储在目标平台上的安全位置,这意味着无法在设备之间传输最终文件:", "There are four further functions available for saving and loading a DS map. These functions will obfuscate the map and store it in a secure location on the target platform using a file format that means that the final file is not able to be transferred between devices:":"还有四个函数可用于保存和加载DS映射。这些函数将模糊地图,并使用文件格式将其存储在目标平台上的安全位置,这意味着无法在设备之间传输最终文件:", + "These functions will obfuscate the map and store it in a secure location on the target platform using a file format that means that the final file is not able to be transferred between devices:":"这些函数将混淆地图并使用文件格式将其存储在目标平台上的安全位置,这意味着最终文件无法在设备之间传输:", "You can find more information, plus examples, from from the GML Overview page on {}Accessors{}.":"您可以从{}访问器{}的GML 概述页面中找到更多信息和示例。", "You can find more information, plus examples, from the GML Overview page on {}Accessors{}.":"您可以从{}访问器{}的GML 概述页面中找到更多信息和示例。", "{}NOTE{}: It is recommended to use {}structs{} over DS maps as they have similar features, are easier to use and are garbage collected automatically.":"{}注意{}:建议在DS映射上使用{}结构{},因为它们具有相似的函数,更易于使用,并且是自动收集的垃圾。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add.json index dc21b157f..e22a33f36 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add.json @@ -1,11 +1,15 @@ { "The id of the map to add to.":"要添加到的映射的ID。", "The key of the value to add.":"要添加的值的关键字。", + "The keys and and values you supply can be made up of any combination of data types, so all of the following - and more - are acceptable (although, in practice, you would most commonly use a string for the key):":"您提供的键和值可以由数据类型的任意组合组成,因此以下所有内容以及更多内容都是可接受的 (尽管在实践中,您最常使用字符串作为键):", "The value to add to the map.":"要添加到地图的值。", + "This function should be used to add sets of key/value pairs into the specified DS map.":"该函数应用于将键 / 值对组添加到指定的 DS 映射中。", "This function should be used to add sets of key/value pairs into the specified DS map. You can check this function to see if it was successful or not (it will return {}true{} on success or {}false{} otherwise), as it may fail if there already exists the same key in the DS map or you specify a non-existent DS map as the ID of the map to add to. The keys and and values you supply can be made up of any combination of data types, so all of the following - and more - are acceptable (although, in practice, you would most commonly use a string for the key):":"该函数应用于将键 / 值对组添加到指定的 DS 映射中。您可以检查此函数以查看其是否成功 (如果成功则返回 {}true{},否则返回 {}false{}),因为如果 DS 映射中已存在相同的键或者您已存在相同的键,则该函数可能会失败。指定一个不存在的 DS 地图作为要添加到的地图的 ID。您提供的键和值可以由数据类型的任意组合组成,因此以下所有内容以及更多内容都是可接受的 (尽管在实践中,您最常使用字符串作为键):", "This function should be used to add sets of key/value pairs into the specified {}DS map{}. You can check this function to see if it was successful or not (it will return {}true{} on success or {}false{} otherwise), as it may fail if there already exists the same key in the DS map or you specify a non-existent DS map as the ID of the map to add to. The keys and and values you supply can be made up of any combination of data types, so all of the following - and more - are acceptable (although, in practice, you would most commonly use a string for the key):":"此函数应用于将键/值对集合添加到指定的{}DS映射{}中。您可以检查此函数是否成功(成功时将返回{}true{},否则将返回{}false{}),因为如果DS映射中已存在相同的密钥,或者您将不存在的DS映射指定为要添加到的映射的ID,则可能会失败。您提供的密钥和值可以由数据类型的任意组合组成,因此以下所有内容-more-是可接受的(尽管在实践中,您最常使用字符串作为密钥):", "This will create a new map, assigning its id to the variable \"inventory\". It then adds two new keys to the map, \"hp potion\" and \"gold\", and sets their initial values as 1 and 100.":"这将创建一个新映射,将其ID分配给变量\"inventory\"。然后,它在地图上添加了两个新键,\"hp potion\"和\"gold\",并将它们的初始值分别设置为1和100。", + "You can also add to a map using the {}accessor{} \"{}?{}\", as shown below, however this is a {}{}ds_map_set{}{} operation and will successfully update existing keys as well, unlike the {}add{} function.":"您还可以使用 {} 访问器 {}\"{}?{}\" 添加到地图,如下所示,但这是一个 {}{}ds_map_set{}{} 操作,并且也会成功更新现有键,与此不同 {}add{} 函数。", "You can also add to a map using the {}accessor{} \"{}?{}\", as shown below:":"您还可以使用{}访问器{}\"{}?{}\"添加到地图,如下所示:", + "You can check this function to see if it was successful or not (it will return {}true{} on success or {}false{} otherwise), as it may fail if there already exists the same key in the DS map or you specify a non-existent DS map as the ID of the map to add to.":"您可以检查此函数以查看其是否成功 (如果成功则返回 {}true{},否则返回 {}false{}),因为如果 DS 映射中已存在相同的键或者您已存在相同的键,则该函数可能会失败。指定一个不存在的 DS 地图作为要添加到的地图的 ID。", "{}NOTE{}: Unlike other data structures in {}GameMaker{} this key will not go to the start (nor the end) of the {}DS map{}, but rather it will just go into the {}DS map{} {}somewhere{}.":"{}注意{}:与{}GameMaker{}中的其他数据结构不同,此密钥不会进入{}DS映射{}的开始(也不会结束),而只会进入{}DS映射{}{}的某个位置{}。", "{}{}{}NOTE{}{}{} Unlike other data structures in {}GameMaker{} this key will not go to the start (nor the end) of the DS map, but rather it will just go into the DS map {}somewhere{}.":"{}{}{} 注意{}{}{} 与 {}GameMaker{} 中的其他数据结构不同,此键不会进入 DS 地图的开头 (也不会结尾),而只会进入 DS 映射 {} 某处 {}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add_list.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add_list.json index 7a16389a3..786e3b4d9 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add_list.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add_list.json @@ -1,7 +1,11 @@ { + "The ID of the list to add.":"要添加的列表的 ID。", + "The ID of the map to use.":"要使用的地图的 ID。", "The above code will create a list and populate it with the various values of global variables. This list is then \"nested\" within a DS map, and the map is then encoded into a JSON string, before the map is destroyed, removing it, and any lists it contains, from memory.":"以上代码将创建一个列表,并使用全局变量的各种值填充该列表。然后,该列表被\"嵌套\"在DS映射中,然后该映射被编码成JSON字符串,在该映射被销毁之前,从存储器中删除它及其包含的任何列表。", "The id of the list to add.":"要添加的列表的ID。", "The id of the map to use.":"要使用的映射的ID。", "The key for the added list.":"添加列表的密钥。", + "This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode{}{} and should only be used in conjunction with that functionality. If a DS map has a list added in this way, destroying the parent map will also destroy the contained lists and free their memory, and calling {}{}ds_map_clear{}{} on the parent map will also destroy and clean up any flagged lists.":"此函数旨在创建 JSON 兼容地图,然后您可以使用 {}{}json_encode{}{} 对其进行编码,并且只能与该功能结合使用。如果 DS 地图以这种方式添加了列表,则销毁父地图也会销毁所包含的列表并释放其内存,并且在父地图上调用 {}{}ds_map_clear{}{} 也会销毁并清除所有已标记的列表列表。", + "With this function you can assign a (previously created) {}DS list{} to a key within the given DS map.":"通过此函数,您可以将 (之前创建的 ){}DS 列表 {} 分配给给定 DS 映射中的键。", "With this function you can assign a (previously created) {}DS list{} to a key within the given DS map. This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode(){}{} and should only be used in conjunction with that functionality. If a DS map has a list added in this way, destroying the parent map will also destroy the contained lists and free their memory, and calling {}{}ds_map_clear(){}{} on the parent map will also destroy and clean up any flagged lists.":"使用此函数,您可以将(以前创建的){}DS列表{}分配给给定DS映射中的某个键。此函数用于创建JSON兼容映射,然后使用{}{}json_encode(){}{}对其进行编码,并且只能与该函数配合使用。如果以这种方式添加了DS映射的列表,则销毁父映射也会销毁包含的列表并释放其内存,而在父映射上调用{}{}ds_map_clear(){}{}也会销毁并清除任何标记的列表。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add_map.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add_map.json index 1b9c1e561..7f72d6c24 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add_map.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_add_map.json @@ -1,7 +1,11 @@ { + "The ID of the map to add.":"要添加的地图的 ID。", + "The ID of the map to use.":"要使用的地图的 ID。", "The above code will create two DS maps, and then populate one with a list and an array before adding it into the second, which is then encoded into a JSON string. The map is then destroyed to remove it, and any other maps or lists that it contains, from memory.":"上述代码将创建两个DS映射,然后使用列表和数组填充一个DS映射,然后将其添加到第二个DS映射中,然后将其编码为JSON字符串。然后销毁地图,将其及其包含的任何其他地图或列表从内存中删除。", "The id of the map to add.":"要添加的映射的ID。", "The id of the map to use.":"要使用的映射的ID。", "The key for the added map.":"用于添加映射的密钥。", - "With this function you can assign a (previously created) DS map to a key within the given DS map . This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode(){}{} and should only be used in conjunction with that functionality. If a DS map has another map added in this way, then destroying the parent map will also destroy the contained maps and free their memory, and calling {}{}ds_map_clear(){}{} on the parent map will also destroy and clean up any flagged maps.":"使用此函数,您可以将(以前创建的)DS映射分配给给定DS映射中的密钥。此函数用于创建JSON兼容映射,然后您可以使用{}{}json_encode(){}{}对其进行编码,并且只能与该函数一起使用。如果DS映射以这种方式添加了另一个映射,则销毁父映射也将销毁包含的映射并释放其内存,在父映射上调用{}{}ds_map_clear(){}{}也将销毁并清除任何标记的映射。" + "This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode{}{} and should only be used in conjunction with that functionality. If a DS map has another map added in this way, then destroying the parent map will also destroy the contained maps and free their memory, and calling {}{}ds_map_clear{}{} on the parent map will also destroy and clean up any flagged maps.":"此函数旨在创建 JSON 兼容地图,然后您可以使用 {}{}json_encode{}{} 对其进行编码,并且只能与该功能结合使用。如果 DS 地图以这种方式添加了另一个地图,则销毁父地图也会销毁所包含的地图并释放其内存,并且在父地图上调用 {}{}ds_map_clear{}{} 也会销毁并清理所有内存标记的地图。", + "With this function you can assign a (previously created) DS map to a key within the given DS map . This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode(){}{} and should only be used in conjunction with that functionality. If a DS map has another map added in this way, then destroying the parent map will also destroy the contained maps and free their memory, and calling {}{}ds_map_clear(){}{} on the parent map will also destroy and clean up any flagged maps.":"使用此函数,您可以将(以前创建的)DS映射分配给给定DS映射中的密钥。此函数用于创建JSON兼容映射,然后您可以使用{}{}json_encode(){}{}对其进行编码,并且只能与该函数一起使用。如果DS映射以这种方式添加了另一个映射,则销毁父映射也将销毁包含的映射并释放其内存,在父映射上调用{}{}ds_map_clear(){}{}也将销毁并清除任何标记的映射。", + "With this function you can assign a (previously created) DS map to a key within the given DS map.":"使用此功能,您可以将 (先前创建的)DS 映射分配给给定 DS 映射中的键。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_create.json index 9c8f1206e..74536d37b 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_create.json @@ -1,5 +1,7 @@ { "The above code will create a new, empty DS map and store its id index in the variable \"inventory\".":"上述代码将创建一个新的空DS映射,并将其ID索引存储在变量\"inventory\"中。", + "The above code will create a new, empty DS map and store its id index in the variable {}inventory{}.":"上述代码将创建一个新的空 DS 映射,并将其 ID 索引存储在变量 {}inventory{} 中。", + "This function is used to create a new, empty DS map and will return a {}{}Handle{}{} to it which is then used to access the data structure in all other DS map functions.":"此函数用于创建一个新的空 DS 映射,并将向其返回一个 {}{} 句柄 {}{},然后使用该句柄访问所有其他 DS 映射函数中的数据结构。", "This function is used to create a new, empty, DS map and will return its id which is then used to access the data structure in all other DS map functions.":"此函数用于创建新的空DS映射,并将返回其ID,然后用于访问所有其他DS映射函数中的数据结构。", "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards.":"{}重要!{} 创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引是重复使用的,因此销毁的数据结构索引值之后可能会被新创建的索引值使用。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_destroy.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_destroy.json index ce113cb0c..eadf8ad0d 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_destroy.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_destroy.json @@ -1,6 +1,10 @@ { + "DS maps take up space in memory, which is allocated to them when they are created. This means that you also need to free this memory when the DS map is not needed to prevent errors, memory leaks and loss of performance when running your game. This function does just that.":"DS 映射占用内存空间,这些空间是在创建它们时分配给它们的。这意味着当不需要 DS 地图时,您还需要释放此内存,以防止运行游戏时出现错误、内存泄漏和性能损失。这个函数就是这么做的。", "DS maps take up space in memory, which is allocated to them when they are created. This means that you also need to free this memory when the DS map is not needed to prevent errors, memory leaks and loss of performance when running your game. This function does just that. Note that destroying a map will de-reference any data structures stored in the map giving a memory leak, so you would need to go through the map and destroy all data structure items manually before destroying it to prevent this. The only time this is not required is when you have flagged any items in the map as a {}DS list{} or as another {}DS map{}, in which case these items will be destroyed and their memory cleaned up automatically as well.":"D贴图占用内存空间,内存空间在创建D贴图时分配给它们。这意味着,当不需要DS映射来防止运行游戏时出现错误、内存泄漏和性能损失时,您还需要释放此内存。此函数就是这样。请注意,销毁映射将取消引用映射中存储的任何数据结构,从而导致内存泄漏,因此您需要在销毁映射之前手动完成映射并销毁所有数据结构项,以防止出现这种情况。的只有当您已将映射中的任何项目标记为{}DS列表{}或另一个{}DS映射{}时,才不需要这样做,在这种情况下,这些项目将被销毁并清理其内存也会自动。", + "The above code will destroy the DS map referenced in the variable {}inventory{}.":"上述代码将销毁变量 {}inventory{} 中引用的 DS 映射。", "The above code will destroy the DS map with the id indexed in the variable \"inventory\".":"上述代码将销毁ID在变量\"inventory\"中索引的DS映射。", "The id of the map to destroy.":"要销毁的映射的ID。", - "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,应使用在访问{}{}{}ds_exists(){}{}{}函数之前。另请注意,索引是重复使用的,因此销毁的数据结构索引值可能会被新创建的索引值使用,因此我们建议总是将破坏后保持Ds索引的变量设置为-1。" + "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,应使用在访问{}{}{}ds_exists(){}{}{}函数之前。另请注意,索引是重复使用的,因此销毁的数据结构索引值可能会被新创建的索引值使用,因此我们建议总是将破坏后保持Ds索引的变量设置为-1。", + "{}{}NOTE{}{} Destroying a map will de-reference any data structures stored in the map giving a memory leak, so you would need to go through the map and destroy all data structure items manually before destroying it to prevent this. The only time this is not required is when you have flagged any items in the map as a {}DS list{} or as another {}DS map{}, in which case these items will be destroyed and their memory cleaned up automatically as well.":"{}{} 注意{}{} 销毁映射将取消引用存储在映射中的任何数据结构,从而导致内存泄漏,因此您需要在销毁映射之前手动遍历映射并销毁所有数据结构项,以防止发生这种情况。唯一不需要这样做的情况是,当您将地图中的任何项目标记为 {}DS 列表 {} 或另一个 {}DS 地图 {} 时,在这种情况下,这些项目将被销毁,并且它们的内存将自动清理,如下所示:出色地。", + "{}{}NOTE{}{} You should always set the variable that held the data structure reference to -1 after calling this function, since the reference will no longer be valid.":"{}{} 注意{}{} 调用此函数后,您应始终将保存数据结构引用的变量设置为 -1,因为该引用将不再有效。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_is_list.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_is_list.json index 7480bce09..b2c850cb5 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_is_list.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_is_list.json @@ -1,7 +1,10 @@ { "Note that this will only detect lists that were added using the{} {}{}{}ds_map_add_list(){}{}{} {}function.":"请注意,这将仅检测使用{}{}{}{}ds_map_add_list(){}{}{}{}{}函数添加的列表。", + "The ID of the map to use.":"要使用的地图的 ID。", + "The above code loops through a DS map and checks to see if any of the keys in it are for a DS list. If they are, then the DS list is destroyed, and the at the end of the loop the DS map is destroyed too.":"上面的代码循环遍历 DS 映射并检查其中是否有任何键用于 DS 列表。如果是,则 DS 列表将被销毁,并且在循环结束时 DS 映射也将被销毁。", "The above code loops through a DS map and checks to see if any of the keys within it are for a DS list. If they are, then the DS list is destroyed, and the at the end of the loop the DS map is destroyed too.":"上述代码循环浏览DS映射并检查其中是否有任何密钥用于DS列表。如果是,则销毁DS列表,并且在循环结束时也销毁DS映射。", "The id of the map to use.":"要使用的映射的ID。", "The key to check.":"要把关的钥匙。", - "With this function you can check to see if a {}DS list{} is stored in the given map key. If the given key contains a DS list ID, then the function will return {}true{} otherwise it will return {}false{}.":"使用此函数,您可以检查{}DS列表{}是否存储在给定的映射键中。如果给定的密钥包含DS列表ID,则函数将返回{}true{},否则将返回{}false{}。" + "With this function you can check to see if a {}DS list{} is stored in the given map key. If the given key contains a DS list ID, then the function will return {}true{} otherwise it will return {}false{}.":"使用此函数,您可以检查{}DS列表{}是否存储在给定的映射键中。如果给定的密钥包含DS列表ID,则函数将返回{}true{},否则将返回{}false{}。", + "{}{}NOTE{}{} This will only detect lists that were added using the {}{}ds_map_add_list{}{} function.":"{}{} 注意{}{} 这只会检测使用 {}{}ds_map_add_list{}{} 函数添加的列表。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_is_map.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_is_map.json index 4276882d3..1e30d8e4e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_is_map.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_is_map.json @@ -1,7 +1,9 @@ { "Note that this will only detect maps that were added using the{} {}{}{}ds_map_add_map(){}{}{} {}function.":"请注意,这将仅检测使用{}{}{}{}ds_map_add_map(){}{}{}{}函数添加的映射。", + "The ID of the map to use.":"要使用的地图的 ID。", "The above code loops through a DS map and checks to see if any of the keys within it are for other DS maps. If they are, then the stored DS map is destroyed, and the at the end of the loop the main DS map is destroyed too.":"上述代码循环浏览DS映射并检查其中是否有任何密钥用于其他DS映射。如果是,则会销毁存储的DS映射,并且在循环结束时,也会销毁主DS映射。", "The id of the map to use.":"要使用的映射的ID。", "The key to replace.":"换人的钥匙。", - "With this function you can check to see if a DS map is stored in the given map key. If the given key contains a DS map ID, then the function will return {}true{} otherwise it will return {}false{}.":"使用此函数,您可以检查DS映射是否存储在给定的映射键中。如果给定的密钥包含DS映射ID,则函数将返回{}true{},否则将返回{}false{}。" + "With this function you can check to see if a DS map is stored in the given map key. If the given key contains a DS map ID, then the function will return {}true{} otherwise it will return {}false{}.":"使用此函数,您可以检查DS映射是否存储在给定的映射键中。如果给定的密钥包含DS映射ID,则函数将返回{}true{},否则将返回{}false{}。", + "{}{}NOTE{}{} This will only detect maps that were added using the {}{}ds_map_add_map{}{} function.":"{}{} 注意{}{} 这只会检测使用 {}{}ds_map_add_map{}{} 函数添加的地图。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace.json index dc40d8158..f8ef84a48 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace.json @@ -4,5 +4,6 @@ "The key with the value that should be replaced by the new one":"具有应由新值替换的值的密钥", "The new value to replace the given value with":"要将给定值替换为的新值", "With this function you can change the value for the given key within the a DS map . You supply the index to the map (as returned by the function {}{}ds_map_create(){}{}) and then the key to replace - either a string or an integer - and the value to replace the key value with. If the given key does {}not {}exist then it will be created for you, and if it does then the current value will be replaced with the new value. The function will return {}true{} if the key exists and the value is replaced, and {}false{} if the key does not exist and a new key was created with the value.":"使用此功能,您可以更改 DS 映射中给定键的值。您向映射提供索引 (由函数 {}{}ds_map_create(){}{} 返回),然后提供要替换的键 (字符串或整数) 以及用于替换键值的值。如果给定的键{}不存在{},则系统会为您创建该键 ; 如果存在,则当前值将替换为新值。如果键存在并且值已被替换,则该函数将返回 {}true{}; 如果键不存在并且使用该值创建了新键,则该函数将返回 {}false{}。", + "With this function you can change the value for the given key within the a DS map. You supply the index to the map (as returned by the function {}{}ds_map_create(){}{}) and then the key to replace - either a string or an integer - and the value to replace the key value with. If the given key does {}not {}exist then it will be created for you, and if it does then the current value will be replaced with the new value. The function will return {}true{} if the key exists and the value is replaced, and {}false{} if the key does not exist and a new key was created with the value.":"使用此功能,您可以更改 DS 映射中给定键的值。您向映射提供索引 (由函数 {}{}ds_map_create(){}{} 返回),然后提供要替换的键 (字符串或整数) 以及用于替换键值的值。如果给定的键不存在,则系统会为您创建该键 ; 如果存在,则当前值将替换为新值。如果键存在并且值已被替换,则该函数将返回 {}true{}; 如果键不存在并且使用该值创建了新键,则该函数将返回 {}false{}。", "With this function you can change the value for the given key within the a {}DS{} map . You supply the index to the map (as returned by the function {}{}ds_map_create(){}{}) and then the key to replace - either a string or an integer - and the value to replace the key value with. If the given key does {}not {}exist then it will be created for you, and if it does then the current value will be replaced with the new value. The function will return {}true{} if the key exists and the value is replaced, and {}false{} if the key does not exist and a new key was created with the value.":"使用此函数,您可以更改{}Ds{}映射中给定密钥的值。您可以为映射提供索引(由函数{}{}ds_map_create(){}{})返回)然后是要替换的密钥-字符串或整数-以及用来替换密钥值的值。如果给定的密钥{}不{}存在,则会为您创建该密钥;如果存在,则会将当前值替换为新的价值。如果密钥存在并且替换了值,则函数将返回{}true{};如果密钥不存在并且使用该值创建了新密钥,则函数将返回{}false{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace_list.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace_list.json index 9677b7d4a..0fad48e38 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace_list.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace_list.json @@ -1,7 +1,12 @@ { + "The ID of the DS list to use to replace the one previously stored in the given key.":"DS 列表的 ID,用于替换先前存储在给定密钥中的列表。", + "The ID of the map to use.":"要使用的地图的 ID。", "The above code will create a {}DS List{} and populate it with the values of various global variables before replacing a previously stored list in the {}DS Map{} \"j_map\".":"以上代码将创建{}Ds List{},并在替换{}Ds Map{}\" j_map \"中先前存储的列表之前,使用各种全局变量的值填充该列表。", + "The above code will create a {}{}DS List{}{} and populate it with the values of various global variables before replacing a previously stored list in the {}{}DS Map{}{} {}j_map{}.":"上述代码将创建一个 {}{}DS 列表 {}{},并用各种全局变量的值填充它,然后替换 {}{}DS Map{}{}{}j_map{} 中先前存储的列表。", "The id of the ds_list to use to replace the one previously stored in the given key.":"用于替换先前存储在给定密钥中的ds_list的ID。", "The id of the map to use.":"要使用的映射的ID。", "The key to replace.":"换人的钥匙。", + "This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode{}{} and should only be used in conjunction with that functionality.":"此函数旨在创建 JSON 兼容地图,然后您可以使用 {}{}json_encode{}{} 对其进行编码,并且只能与该功能结合使用。", + "With this function you can replace a {}DS list{} that has been stored in the given \"key\" with another list that has been created previously.":"通过此函数,您可以将给定 \" 键 \" 中存储的 {}DS 列表 {} 替换为之前创建的另一个列表。", "With this function you can replace a {}DS list{} that has been stored in the given \"key\" with another list that has been created previously. This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode(){}{} and should only be used in conjunction with that functionality.":"使用此函数,您可以将存储在给定\"密钥\"中的{}DS列表{}替换为以前创建的另一个列表。此函数用于创建JSON兼容映射,然后使用{}{}json_encode(){}{}对其进行编码,并且只能与该函数配合使用。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace_map.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace_map.json index 57146f4af..d32ada6f1 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace_map.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_replace_map.json @@ -1,7 +1,12 @@ { + "The ID of the DS map to use to replace the one previously stored in the given key.":"用于替换先前存储在给定键中的 DS 映射的 ID。", + "The ID of the DS map to use.":"要使用的 DS 地图的 ID。", "The above code will create a {}DS Map{} and populate it with an array and a {}DS List{} before replacing a previously stored map in the {}DS Map{} \"j_map\".":"以上代码将创建{}DS映射{},并使用数组和{}DS列表{}填充它,然后替换{}DS映射{}\"j_map\"中先前存储的映射。", + "The above code will create a {}{}DS Map{}{} and populate it with an array and a {}{}DS List{}{} before replacing a previously stored map in the {}{}DS Map{}{} {}j_map{}.":"上述代码将创建一个 {}{}DS Map{}{},并用一个数组和一个 {}{}DS List{}{} 填充它,然后替换 {}{}DS Map{} 中之前存储的地图 {}{}j_map{}。", "The id of the ds_map to use to replace the one previously stored in the given key.":"用于替换先前存储在给定密钥中的ds_map的ID。", "The id of the ds_map to use.":"要使用的ds_map的ID。", "The key to replace.":"换人的钥匙。", - "With this function you can replace a {}DS Map{} that has been stored in the given \"key\" with another map that has been created previously. This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode(){}{} and should only be used in conjunction with that functionality.":"使用此函数,您可以将存储在给定\"密钥\"中的{}DS映射{}替换为以前创建的另一个映射。此函数用于创建JSON兼容映射,然后使用{}{}json_encode(){}{}对其进行编码,并且只能与该函数配合使用。" + "This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode{}{} and should only be used in conjunction with that functionality.":"此函数旨在创建 JSON 兼容地图,然后您可以使用 {}{}json_encode{}{} 对其进行编码,并且只能与该功能结合使用。", + "With this function you can replace a {}DS Map{} that has been stored in the given \"key\" with another map that has been created previously. This function is designed for creating JSON compatible maps which you would then encode using {}{}json_encode(){}{} and should only be used in conjunction with that functionality.":"使用此函数,您可以将存储在给定\"密钥\"中的{}DS映射{}替换为以前创建的另一个映射。此函数用于创建JSON兼容映射,然后使用{}{}json_encode(){}{}对其进行编码,并且只能与该函数配合使用。", + "With this function you can replace a {}{}DS Map{}{} that has been stored in the given key with another map that has been created previously.":"通过此函数,您可以将给定键中存储的 {}{}DS Map{}{} 替换为之前创建的另一个映射。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_set.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_set.json index 3c8b9ab0c..71bfbd6fb 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_set.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_set.json @@ -1,6 +1,7 @@ { "Finally, the three values are looked up using the DS map accessor {}?{} and shown using {}{}show_debug_message{}{}.":"最后,使用 DS 地图访问器 {}?{} 查找这三个值,并使用 {}{}show_debug_message{}{} 显示这三个值。", "Next, three different keys in the DS map are set using {}{}ds_map_set{}{}, each having a different type: the first key is a string, the second a number and the last one a struct.":"接下来,使用 {}{}ds_map_set{}{} 设置 DS 映射中的三个不同键,每个键具有不同的类型:第一个键是字符串,第二个键是数字,最后一个键是结构体。", + "Since the function doesn\u0027t return anything, you can use the function {}{}ds_map_replace{}{} to check if the key value has been replaced or a new key has been created.":"由于该函数不返回任何内容,因此您可以使用函数 {}{}ds_map_replace{}{} 来检查键值是否已被替换或是否已创建新键。", "Since the function doesn\u0027t return anything, you should use the function {}{}ds_map_replace{}{} to check if the key value has been replaced or a new key has been created.":"由于该函数不返回任何内容,因此您应该使用函数 {}{}ds_map_replace{}{} 来检查键值是否已被替换或是否已创建新键。", "The above code first creates a basic struct {}struct_key{}. It then creates a new DS map using {}{}ds_map_create{}{} and stores it in a variable {}map_key_value_pairs{}.":"上面的代码首先创建一个基本结构体 {}struct_key{}。然后,它使用 {}{}ds_map_create{}{} 创建一个新的 DS 地图,并将其存储在变量 {}map_key_value_pairs{} 中。", "The above code will check to see if the given key exists and if it doesn\u0027t then it is created and set.":"以上代码将检查给定的密钥是否存在,如果不存在,则会创建并设置该密钥。", @@ -9,6 +10,7 @@ "The value to set the key to.":"要将密钥设置为的值。", "This function sets the value of a key within a given DS map.":"此函数设置给定 DS 映射内的键值。", "With this function you can set the value of a key within a given DS map. You supply the DS map ID value (as returned by the function {}{}ds_map_create(){}{}), then give the key you want to set and the value to set it to. Keys can be integers or strings, and if the given key does not exist then it will be created for you and set to the value. This function is the same as using the {}DS map accessor{} to set/create a map key/value pair. The function does not return anything, so if you need to check if the key value has been replaced or a new key has been created, then you should use the function {}{}ds_map_replace(){}{}.":"使用此函数,您可以在给定的DS映射中设置关键点的值。提供DS映射ID值(由函数{}{}ds_map_create(){}{}返回),然后提供要设置的密钥和要设置的值。关键点可以是整数或字符串,如果给定的关键点不存在,则将为您创建该关键点并将其设置为值。此函数与使用{}DS映射访问器{}设置/创建映射键/值对相同。函数不返回任何内容,因此,如果需要检查是否已替换密钥值或已创建新密钥,则应使用函数{}{}ds_map_replace(){}{}。", + "You can also set a value in a map using the {}accessor{} \"{}?{}\", as shown below:":"您还可以使用 {} 访问器 {}\"{}?{}\" 在地图中设置值,如下所示:", "You supply the {}{}DS Map{}{} value (as returned by the function {}{}ds_map_create{}{}), then give the key you want to set and the value to set it to. If the given key does not exist then it will be created for you and set to the value.":"您提供 {}{}DS Map{}{} 值 (由函数 {}{}ds_map_create{}{} 返回),然后给出您要设置的键以及要设置的值。如果给定的键不存在,那么将为您创建它并设置为该值。", "{}{}NOTE{}{} This function is the same as using the {}DS map accessor{} to set/create a map key/value pair.":"{}{} 注意{}{} 此函数与使用 {}DS 地图访问器 {} 设置 / 创建地图键 / 值对相同。", "{}{}TIP{}{} The key isn\u0027t limited to strings and can be of any type, including a {}struct{}.":"{}{} 提示{}{} 键不限于字符串,可以是任何类型,包括 {} 结构体 {}。" diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/DS_Priority_Queues.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/DS_Priority_Queues.json index 0e1b5cb8d..ce054e7ca 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/DS_Priority_Queues.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/DS_Priority_Queues.json @@ -1,7 +1,11 @@ { "A DS priority queue is a special data structure similar to a {}{}DS queue{}{}, only here the queue of values is ordered by the priorities (always real numbers) that the values have been assigned. This structure can be very useful for constructing leaderboards or information lists where the importance of each entry can be weighted.":"DS优先队列是一种类似于{}{}DS队列{}{}的特殊数据结构,只有在这里,值队列才按照已分配值的优先级(始终为实数)排序。此结构对于构建可以权衡每个条目的重要性的排行榜或信息列表非常有用。", "DS Priority Queues":"DS 优先队列", + "Function Reference":"功能参考", + "General":"常规", + "Serialisation":"序列化", "The following functions exist that deal with DS priority queues:":"存在以下处理DS优先级队列的函数:", + "{}DS Priority Queues{}":"{}DS 优先级队列 {}", "{}NOTE{}: As with all dynamic resources, data structures take up memory and so should {}always{} be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.":"{}注意{}:与所有动态资源一样,数据结构占用内存,因此当不再需要防止内存泄漏时,应{}始终{}销毁,这将降低速度并最终导致游戏崩溃。", "{}NOTE{}: If you need to check if a data structure exists, you can use the {}{}{}ds_exists(){}{}{} function.":"{}注意{}:如果需要检查是否存在数据结构,可以使用{}{}{}ds_exists(){}{}{}函数。", "{}{}NOTE{}{} As with all dynamic resources, data structures take up memory and so should {}always{} be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.":"{}{} 注意{}{} 与所有动态资源一样,数据结构也会占用内存,因此在不再需要时应 {} 始终 {} 销毁,以防止内存泄漏,否则会减慢游戏速度并最终崩溃。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/ds_priority_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/ds_priority_create.json index 9d1241b1f..08bb4e91d 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/ds_priority_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/ds_priority_create.json @@ -1,5 +1,7 @@ { + "This function creates a new priority queue data structure and returns a {}{}Handle{}{} to it. This value should be stored in a variable and used in all further function calls relating to the priority queue.":"此函数创建一个新的优先级队列数据结构并向其返回一个 {}{} 句柄 {}{}。该值应存储在变量中,并在与优先级队列相关的所有进一步函数调用中使用。", "This function will create a new priority queue data-structure and return the index value. This value should be stored in a variable and used in all further function calls relating to the priority queue.":"此函数将创建新的优先级队列数据结构并返回索引值。此值应存储在变量中,并用于与优先级队列相关的所有进一步函数调用。", "This will create a new priority queue and assign its index id to the instance variable \"p_queue\".":"这将创建一个新的优先级队列,并将其索引ID分配给实例变量\"p_queue\"。", + "This will create a new priority queue and assign its index id to the instance variable {}p_queue{}.":"这将创建一个新的优先级队列并将其索引 ID 分配给实例变量 {}p_queue{}。", "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引是重复使用的,因此销毁的数据结构索引值之后可能会被新创建的索引值使用。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/ds_priority_destroy.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/ds_priority_destroy.json index caf62c8da..e1f610dcd 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/ds_priority_destroy.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Priority_Queues/ds_priority_destroy.json @@ -1,6 +1,10 @@ { "The above code will check the value of the built in global variable \"lives\" and if it is 0, it destroys the DS priority queue indexed in the variable \"AI_queue\" and then changes rooms.":"上述代码将检查内置全局变量\"live\"的值,如果为0,则销毁变量\"AI_queue\"中索引的DS优先级队列,然后更换房间。", + "The above code will check the value of the built in global variable {}{}lives{}{} and if it is 0, it destroys the DS priority queue referenced in the variable {}AI_queue{} and then changes rooms.":"上述代码将检查内置全局变量 {}{}lives{}{} 的值,如果为 0,则会销毁变量 {}AI_queue{} 中引用的 DS 优先级队列,然后更换房间。", "The id of the data structure to remove.":"要删除的数据结构的ID。", + "The priority queue data structure to remove.":"要删除的优先级队列数据结构。", + "This function will remove the given priority queue data structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS priority queue to prevent memory leaks that can slow down and crash your game.":"此函数将从内存中删除给定的优先级队列数据结构,释放其正在使用的资源并删除其包含的所有值。当您使用完 DS 优先级队列后,应始终使用此功能,以防止内存泄漏导致游戏速度减慢和崩溃。", "This function will remove the given priority queue data-structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS priority queue to prevent memory leaks that can slow down and crash your game.":"此函数将从内存中删除给定的优先级队列数据结构,从而释放所使用的资源并删除其中包含的所有值。当您完成使用D优先级队列时,应始终使用此函数,以防止内存泄漏,从而降低速度并使游戏崩溃。", - "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。" + "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。", + "{}{}NOTE{}{} You should always set the variable that held the data structure reference to -1 after calling this function, since the reference will no longer be valid.":"{}{} 注意{}{} 调用此函数后,您应始终将保存数据结构引用的变量设置为 -1,因为该引用将不再有效。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/DS_Queues.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/DS_Queues.json index f43655ed8..b95afa44e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/DS_Queues.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/DS_Queues.json @@ -1,6 +1,7 @@ { "A DS queue is somewhat similar to a {}DS stack{} but it works on a first-in first-out (FIFO) basis. The value that is put into the queue {}first{} is also the first to be removed from it. You can think of it like a queue in a shop for paying, where the person that is first in the queue pays first and then leaves the shop. Queues are typically used to store actions or behaviours (in the form of scripts, for example) that still need to be done by an instance but there are many other uses.":"DS队列有点类似于{}DS堆栈{},但它以先进先出(FIFO)为基础工作。首先放入队列{}的值{}也是第一个从其中删除的值。你可以把它想象成在商店里排队付款,排队的第一个人先付款,然后离开商店。队列通常用于存储操作或行为(例如,以脚本的形式),这些操作或行为仍然需要由实例完成,但还有许多其他用途。", "DS Queues":"DS 队列", + "Serialisation":"序列化", "The following functions exist that deal with DS queues:":"存在以下处理DS队列的函数:", "{}NOTE{}: As with all dynamic resources, data structures take up memory and so should {}always{} be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.":"{}注意{}:与所有动态资源一样,数据结构占用内存,因此当不再需要防止内存泄漏时,应始终销毁{}{},这将降低速度并最终导致游戏崩溃。", "{}NOTE{}: if you need to check if a data structure exists, you can use the {}{}{}ds_exists(){}{}{} function.":"{}注意{}:如果需要检查是否存在数据结构,可以使用{}{}{}ds_exists(){}{}{}函数。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_create.json index b8249ea26..08526b45f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_create.json @@ -1,5 +1,7 @@ { + "This function creates a new queue data structure and returns a {}{}Handle{}{} to it. This value should be stored in a variable and used in all further function calls relating to the queue.":"此函数创建一个新的队列数据结构并向其返回一个 {}{} 句柄 {}{}。该值应存储在变量中,并在与队列相关的所有进一步函数调用中使用。", "This function will create a new queue data-structure and return the index value. This value should be stored in a variable and used in all further function calls relating to the queue.":"此函数将创建新的队列数据结构并返回索引值。此值应存储在变量中,并用于与队列相关的所有进一步函数调用。", "This will create a new queue and assign its index id to the instance variable \"queue\".":"这将创建一个新队列并将其索引ID分配给实例变量\"queue\"。", + "This will create a new queue and assign its index id to the instance variable {}queue{}.":"这将创建一个新队列并将其索引 ID 分配给实例变量 {}queue{}。", "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引是重复使用的,因此销毁的数据结构索引值之后可能会被新创建的索引值使用。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_destroy.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_destroy.json index 15a50afa4..6abffd276 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_destroy.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_destroy.json @@ -1,6 +1,9 @@ { "The above code will check the value of the built in global variable \"lives\" and if it is 0, it destroys the DS queue indexed in the variable \"AI_queue\" and then changes rooms.":"上述代码将检查内置全局变量\"live\"的值,如果为0,则会销毁在变量\"AI_queue\"中索引的DS队列,然后更换房间。", + "The above code will check the value of the built-in global variable {}{}lives{}{} and if it is 0, it destroys the DS queue indexed in the variable {}AI_queue{} and then changes rooms.":"上述代码将检查内置全局变量 {}{}lives{}{} 的值,如果为 0,则会销毁变量 {}AI_queue{} 中索引的 DS 队列,然后更改房间。", "The id of the data structure to remove.":"要删除的数据结构的ID。", + "This function will remove the given queue data structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS queue to prevent memory leaks that can slow down and crash your game.":"此函数将从内存中删除给定的队列数据结构,释放它正在使用的资源并删除它包含的所有值。当您使用完 DS 队列后,应始终使用此函数,以防止内存泄漏导致游戏速度减慢和崩溃。", "This function will remove the given queue data-structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS queue to prevent memory leaks that can slow down and crash your game.":"此函数将从内存中删除给定的队列数据结构,从而释放所使用的资源并删除其中包含的所有值。当您完成使用DS队列时,应始终使用此函数,以防止内存泄漏,从而降低速度并使游戏崩溃。", - "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。" + "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。", + "{}{}NOTE{}{} You should always set the variable that held the data structure reference to -1 after calling this function, since the reference will no longer be valid.":"{}{} 注意{}{} 调用此函数后,您应始终将保存数据结构引用的变量设置为 -1,因为该引用将不再有效。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_head.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_head.json index 97b2730b7..0e08d6a4e 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_head.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_head.json @@ -1,5 +1,7 @@ { + "The above code will read the head value from the queue indexed in the variable \"control_queue\" and store the return value in the variable \"num\".":"上面的代码将从变量 \"control_queue\" 中索引的队列中读取头值,并将返回值存储在变量 \"num\" 中。", "The above code will read the value from the queue indexed in the variable \"control_queue\" and store the return value in the variable \"num\".":"上述代码将从变量\"control_queue\"中索引的队列读取值,并将返回值存储在变量\"number\"中。", "The id of the data structure to read from.":"要读取的数据结构的ID。", - "This function will only {}read{} the first value of the queue (that which is \"at the head\"). It will not {}dequeue{} the value, meaning that it can still be read in the future by this function or the {}{}ds_queue_dequeue(){}{}. If the queue is empty then the function will return the constant {}undefined{}, otherwise it will return the real or string value contained in the queue.":"此函数将{}只读取{}队列的第一个值(即\"头部\")。它不会将值{}出队{},这意味着此函数或{}{}ds_queue_dequeue(){}{}将来仍可以读取该值。如果队列为空,则此函数将返回{}未定义的常量{},否则它将返回队列中包含的实数或字符串值。" + "This function will only {}read{} the first value of the queue (that which is \"at the head\"). It will not {}dequeue{} the value, meaning that it can still be read in the future by this function or the {}{}ds_queue_dequeue(){}{}. If the queue is empty then the function will return the constant {}undefined{}, otherwise it will return the real or string value contained in the queue.":"此函数将{}只读取{}队列的第一个值(即\"头部\")。它不会将值{}出队{},这意味着此函数或{}{}ds_queue_dequeue(){}{}将来仍可以读取该值。如果队列为空,则此函数将返回{}未定义的常量{},否则它将返回队列中包含的实数或字符串值。", + "This function will only {}read{} the first value of the queue (that which is \"at the head\"). It will not {}dequeue{} the value, meaning that it can still be read in the future by this function or {}{}ds_queue_dequeue(){}{}. If the queue is empty then the function will return the constant {}undefined{}, otherwise it will return the value contained in the queue.":"此函数将仅 {} 读取 {} 队列的第一个值 (\" 头部 \")。它不会将该值 {} 出列 {},这意味着将来仍可以通过该函数或 {}{}ds_queue_dequeue(){}{} 读取该值。如果队列为空,则该函数将返回常量 {}undefined{},否则将返回队列中包含的值。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_tail.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_tail.json index 7077aa753..66c107e0b 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_tail.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Queues/ds_queue_tail.json @@ -1,5 +1,7 @@ { + "The above code will read the tail value from the queue indexed in the variable \"control_queue\" and store the return value in the variable \"num\".":"上面的代码将从变量 \"control_queue\" 中索引的队列中读取尾部值,并将返回值存储在变量 \"num\" 中。", "The above code will read the value from the queue indexed in the variable \"control_queue\" and store the return value in the variable \"num\".":"上述代码将从变量\"control_queue\"中索引的队列读取值,并将返回值存储在变量\"number\"中。", "The id of the data structure to read from.":"要读取的数据结构的ID。", - "This function will only {}read{} the last value of the queue (that which is \"at the tail\"). It will not {}dequeue{} the value, meaning that it can still be read in the future by this function or the {}{}ds_queue_dequeue(){}{}.":"此函数将只读取{}队列的最后一个值(即\"尾部\")。它不会将值{}出列{},这意味着此函数或{}{}ds_queue_dequeue(){}{}将来仍可以读取该值。" + "This function will only {}read{} the last value of the queue (that which is \"at the tail\"). It will not {}dequeue{} the value, meaning that it can still be read in the future by this function or the {}{}ds_queue_dequeue(){}{}.":"此函数将只读取{}队列的最后一个值(即\"尾部\")。它不会将值{}出列{},这意味着此函数或{}{}ds_queue_dequeue(){}{}将来仍可以读取该值。", + "This function will only {}read{} the last value of the queue (that which is \"at the tail\"). It will not {}remove{} the value from the structure, meaning that it can be read again by calling this function. If the queue is empty then the function will return the constant {}undefined{}, otherwise it will return the value contained in the queue.":"此函数将仅 {} 读取 {} 队列的最后一个值 (\" 尾部 \")。它不会从结构中 {} 删除 {} 该值,这意味着可以通过调用此函数再次读取该值。如果队列为空,则该函数将返回常量 {}undefined{},否则将返回队列中包含的值。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/DS_Stacks.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/DS_Stacks.json index bcd8ee87d..5b68ba527 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/DS_Stacks.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/DS_Stacks.json @@ -1,6 +1,9 @@ { "A DS stack is a so called last-in-first-out (LIFO) data structure, similar to a {}DS queue{}. You can {}push{} values onto a stack and then remove them again by {}popping{} them from the stack, where the value that was pushed on the stack most recently is the first to be popped from it again (just think of a stack of coins, where each coin that you add has to be removed again first before you can get to the rest of the coins beneath). Stacks are often used when there are interrupts to handle, or when having recursive functions, or even when constructing a rudimentary AI for your games.":"DS堆栈是所谓的\"先进先出\"(LIFO)数据结构,类似于{}DS队列{}。您可以将{}值推送到堆栈上,然后从堆栈中弹出{}值,再次删除这些值。在堆栈中,最近推送到堆栈上的值是第一个再次从中弹出的值(只需考虑一个硬币堆栈,其中您添加的每个硬币必须先再次删除,然后才能到达下面的其余硬币)。当存在需要处理的中断时,或者当具有递归函数时,甚至当为游戏构建基本的Ai时,通常会使用堆栈。", "DS Stacks":"DS 堆栈", + "Function Reference":"功能参考", + "General":"常规\n", + "Serialisation":"序列化", "The following functions exist that deal with DS stacks:":"存在以下处理DS堆栈的函数:", "{}NOTE{}: As with all dynamic resources, data structures take up memory and so should {}always{} be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.":"{}注意{}:与所有动态资源一样,数据结构占用内存,因此当不再需要防止内存泄漏时,应始终销毁{}{},这将降低速度并最终导致游戏崩溃。", "{}NOTE{}: If you need to check if a data structure exists, you can use the {}{}{}ds_exists(){}{}{} function.":"{}注意{}:如果需要检查是否存在数据结构,可以使用{}{}{}ds_exists(){}{}{}函数。", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_create.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_create.json index 6978e4084..d428a09e1 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_create.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_create.json @@ -1,5 +1,7 @@ { + "This function creates a new stack data structure and returns a {}{}Handle{}{} to it. This value should be stored in a variable and used in all further function calls relating to the stack.":"此函数创建一个新的堆栈数据结构并向其返回一个 {}{} 句柄 {}{}。该值应存储在变量中,并在与堆栈相关的所有进一步函数调用中使用。", "This function will create a new stack data-structure and return the index value. This value should be stored in a variable and used in all further function calls relating to the stack.":"此函数将创建新的堆栈数据结构并返回索引值。此值应存储在变量中,并用于与堆栈相关的所有进一步函数调用。", "This will create a new stack and assign its index id to the instance variable \"stack\".":"这将创建一个新堆栈,并将其索引ID分配给实例变量\"stack\"。", + "This will create a new stack and assign its index id to the instance variable {}stack{}.":"这将创建一个新堆栈并将其索引 ID 分配给实例变量 {}stack{}。", "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards.":"{}重要!{}创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引是重复使用的,因此销毁的数据结构索引值之后可能会被新创建的索引值使用。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_destroy.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_destroy.json index 550d2a828..2ac13e236 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_destroy.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_destroy.json @@ -1,6 +1,10 @@ { "The above code will check the value of the built in global variable \"lives\" and if it is 0, it destroys the DS stack indexed in the variable \"AI_stack\" and then changes rooms.":"上述代码将检查内置全局变量\"live\"的值,如果为0,则会销毁在变量\"AI_stack\"中索引的DS堆栈,然后更换房间。", + "The above code will check the value of the built in global variable {}{}lives{}{} and if it is 0, it destroys the DS stack referenced in the variable {}AI_stack{} and then changes rooms.":"上面的代码将检查内置全局变量 {}{}lives{}{} 的值,如果为 0,则会销毁变量 {}AI_stack{} 中引用的 DS 堆栈,然后更改房间。", "The id of the data structure to remove.":"要删除的数据结构的ID。", + "The stack data structure to remove.":"要删除的堆栈数据结构。", + "This function will remove the given stack data structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS stack to prevent memory leaks that can slow down and crash your game.":"此函数将从内存中删除给定的堆栈数据结构,释放它正在使用的资源并删除它包含的所有值。当您使用完 DS 堆栈后,应始终使用此函数,以防止内存泄漏,从而降低游戏速度并导致游戏崩溃。", "This function will remove the given stack data-structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the DS stack to prevent memory leaks that can slow down and crash your game.":"此函数将从内存中删除给定的堆栈数据结构,从而释放它正在使用的资源,并删除它包含的所有值。完成使用DS堆栈时,应始终使用此函数,以防止内存泄漏,从而降低速度并导致游戏崩溃。", - "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{} 创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。" + "{}IMPORTANT!{} When you create a data structure, the index value to identify it is an integer value starting at 0. This means that data structures of different types can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists(){}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards so we recommend always setting the variable that held the DS index to -1 after destroying.":"{}重要!{} 创建数据结构时,用于标识它的索引值是一个从0开始的整数值。这意味着不同类型的数据结构可以具有{}相同的{}索引值,因此如果有疑问,您应该在访问之前使用{}{}{}ds_exists(){}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,因此我们建议在销毁之后始终将保留D索引的变量设置为-1。", + "{}{}NOTE{}{} You should always set the variable that held the data structure reference to -1 after calling this function, since the reference will no longer be valid.":"{}{} 注意{}{} 调用此函数后,您应始终将保存数据结构引用的变量设置为 -1,因为该引用将不再有效。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_pop.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_pop.json index 2cf63e96b..fe609b3d1 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_pop.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_pop.json @@ -1,5 +1,6 @@ { "The above code checks the DS stack indexed in the variable \"move_stack\" to see if it is empty, and if it is not, it then pops the top two values from the stack and use them to set a direction for movement.":"上述代码检查变量\"move_stack\"中索引的DS堆栈以查看其是否为空,如果不为空,则从堆栈中弹出前两个值,并使用它们来设置移动方向。", "The id of the data structure to pop from.":"要弹出的数据结构的ID。", - "This function will {}pop{} the top value off of the DS stack, removing it from the stack and returning the value to be stored in a variable. If the stack is empty then the function will return the constant {}undefined{}, otherwise it will return the real or string value contained in the stack.":"此函数将{}弹出{}DS堆栈的顶部值,将其从堆栈中删除并返回要存储在变量中的值。如果堆栈为空,则函数将返回{}未定义的常量{},否则将返回堆栈中包含的实数或字符串值。" + "This function will {}pop{} the top value off of the DS stack, removing it from the stack and returning the value to be stored in a variable. If the stack is empty then the function will return the constant {}undefined{}, otherwise it will return the real or string value contained in the stack.":"此函数将{}弹出{}DS堆栈的顶部值,将其从堆栈中删除并返回要存储在变量中的值。如果堆栈为空,则函数将返回{}未定义的常量{},否则将返回堆栈中包含的实数或字符串值。", + "{}{}Any{}{} (Data type value that is stored in the stack) or {}{}undefined{}{}":"{}{} 任何 {}{}( 存储在堆栈中的数据类型值) 或 {}{} 未定义 {}{}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_top.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_top.json index 8f9dfe130..e5f317b27 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_top.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/DS_Stacks/ds_stack_top.json @@ -1,5 +1,6 @@ { "The above code will read the value from the stack indexed in the variable \"control_stack\" and store the return value in the variable \"num\".":"上述代码将从变量\"control_stack\"中索引的堆栈中读取值,并将返回值存储在变量\"number\"中。", "The id of the data structure to read from.":"要读取的数据结构的ID。", - "This function will {}only{} read the first value of the stack (that which is \"on top\"). It will not {}pop{} the value, meaning that it can still be read in the future by this function or the {}{}ds_stack_pop(){}{}. If the stack is empty then the function will return the constant {}undefined{}, otherwise it will return the real or string value contained in the stack.":"此函数将{}只读{}取堆栈的第一个值(即\"顶部\")。它不会{}弹出{}该值,这意味着该函数或{}{}ds_stack_pop(){}{}将来仍可以读取该值。如果该堆栈为空,则该函数将返回{}未定义的常量{},否则将返回堆栈中包含的实数或字符串值。" + "This function will {}only{} read the first value of the stack (that which is \"on top\"). It will not {}pop{} the value, meaning that it can still be read in the future by this function or the {}{}ds_stack_pop(){}{}. If the stack is empty then the function will return the constant {}undefined{}, otherwise it will return the real or string value contained in the stack.":"此函数将{}只读{}取堆栈的第一个值(即\"顶部\")。它不会{}弹出{}该值,这意味着该函数或{}{}ds_stack_pop(){}{}将来仍可以读取该值。如果该堆栈为空,则该函数将返回{}未定义的常量{},否则将返回堆栈中包含的实数或字符串值。", + "{}{}Any{}{} (Data type value that is stored in the stack) or {}{}undefined{}{}":"{}{} 任何 {}{}( 存储在堆栈中的数据类型值) 或 {}{} 未定义 {}{}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/Data_Structures.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/Data_Structures.json index a4a333803..00624500c 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/Data_Structures.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/Data_Structures.json @@ -2,6 +2,7 @@ "Before using data structures in your game, you should also be aware that there are certain moments when, due to rounding errors, you may get a result that is not what you expected. This may be resolved by changing the DS precision using the following function:":"在游戏中使用数据结构之前,您还应该注意,在某些时刻,由于舍入错误,您可能会得到不符合预期的结果。这可以通过使用以下函数更改D的精度来解决:", "Data Structures":"数据结构", "Essentially, all data structures work in the same way - You create a data structure and store its {}index value{} in a variable. You then use this index to reference the data structure in all further function calls that can perform operations on it. Finally, once you are done you destroy the data structure again to remove it from memory. You can use as many of the structures at the same time as you need, and all structures can store any of the available {}data types{}.":"基本上,所有数据结构都以相同的方式工作-创建数据结构并将其{}索引值{}存储在变量中。然后,使用此索引在所有可对其执行操作的进一步函数调用中引用数据结构。最后,完成后,再次销毁数据结构以将其从内存中删除。您可以根据需要同时使用任意多个结构,并且所有结构都可以存储任何可用的{}数据类型{}。", + "Essentially, all data structures work in the same way - you create a data structure and store its reference in a variable. You then use this reference to use the data structure in all further function calls that can perform operations on it. Finally, once you are done you destroy the data structure again to remove it from memory. You can use as many of the structures at the same time as you need, and all structures can store any of the available {}Data Types{}.":"本质上,所有数据结构都以相同的方式工作 - 您创建一个数据结构并将其引用存储在变量中。然后,您可以使用此引用在可以对其执行操作的所有进一步函数调用中使用该数据结构。最后,完成后,您再次销毁数据结构以将其从内存中删除。您可以根据需要同时使用任意数量的结构,并且所有结构都可以存储任何可用的 {} 数据类型 {}。", "Essentially, all data structures work in the same way - you create a data structure and store its reference in a variable. You then use this reference to use the data structure in all further function calls that can perform operations on it. Finally, once you are done you destroy the data structure again to remove it from memory. You can use as many of the structures at the same time as you need, and all structures can store any of the available {}data types{}.":"本质上,所有数据结构都以相同的方式工作 - 您创建一个数据结构并将其引用存储在变量中。然后,您可以使用此引用在可以对其执行操作的所有进一步函数调用中使用该数据结构。最后,完成后,您再次销毁数据结构以将其从内存中删除。您可以根据需要同时使用任意数量的结构,并且所有结构都可以存储任何可用的 {} 数据类型 {}。", "Grids":"网格 Grids", "In games you often need to store information in a precise and ordered way. For example, you may need to store lists of items that a person carries or you may want to store a grid of places that still need to be visited.":"在游戏中,您经常需要以精确且有序的方式存储信息。例如,您可能需要存储一个人携带的物品列表,或者您可能想要存储仍需要访问的地点的网格。", @@ -13,11 +14,13 @@ "Queues":"队列 Queues", "Stacks":"堆栈 Stacks", "There is also a special function for checking to see whether a data structure of any given type exists:":"还有一个特殊函数,用于检查是否存在任何给定类型的数据结构:", + "There is also a special function to check if a data structure of any given type exists:":"还有一个特殊的函数来检查任何给定类型的数据结构是否存在:", "To remedy this, {}GameMaker{} has a number of built-in {}data structures{} that can be accessed through specialist functions. There are six different types of data structure available, each one having its own benefits depending on the type of information that you are looking to store and how you wish to manipulate it later: stacks, queues, lists, maps, priority queues, and grids.":"为了解决此问题,{}GameMaker{}具有许多内置的{}数据结构{},可以通过专家函数访问。有六种不同类型的数据结构可用,每种数据结构都有自己的优点,具体取决于您希望存储的信息类型以及希望以后如何操作它:堆栈、队列、列表、映射、优先级队列和网格。", "When you create a data structure, the index value used to identify it is an integer value starting at 0. This means that different data structures can have the {}same{} index value, so if in doubt you should be using the {}{}{}ds_exists{}{}{} function before accessing them. Also note that indices are re-used, so a destroyed data structure index value may be used by a newly created one afterwards, and we recommend that you set any variable that holds a DS index to -1 after having destroyed the data structure.":"创建数据结构时,用于标识该数据结构的索引值是从0开始的整数值。这意味着不同的数据结构可以具有{}相同的{}索引值,因此如果您有疑问,应在访问之前使用{}{}{}ds_exists{}{}{}函数。另请注意,索引将被重复使用,因此新创建的索引之后可能会使用已销毁的数据结构索引值,我们建议您在销毁数据结构之后将保留Ds索引的任何变量设置为-1。", "{}GameMaker{} has a number of built-in {}data structures{} that can be accessed through specialist functions. There are six different types of data structure available, each one having its own benefits depending on the type of information that you are looking to store and how you wish to manipulate it later: stacks, queues, lists, maps, priority queues, and grids.":"{}GameMaker{} 具有许多内置的 {} 数据结构 {},可以通过专用函数进行访问。有六种不同类型的数据结构可用,每一种都有自己的优点,具体取决于您要存储的信息类型以及以后希望如何操作它:堆栈、队列、列表、映射、优先级队列和网格。", "{}NOTE{}: It is recommend to use {}arrays{} and {}structs{} over DS lists and maps, as they have similar features, are easier to use and are garbage collected automatically.":"{}注意{}:建议在DS列表和映射上使用{}数组{}和{}结构{},因为它们具有相似的函数,更易于使用,并且是垃圾自动收集的。", "{}{}NOTE{} {}As with all dynamic resources, data structures take up memory and so should {}always{} be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.":"{}{}注意{}{}与所有动态资源一样,数据结构占用内存,因此当不再需要{}防止内存泄漏时,应始终销毁{},这将降低速度并最终导致游戏崩溃。", "{}{}NOTE{}{} As with all dynamic resources, data structures take up memory and so should {}always{} be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.":"{}{} 注意{}{} 与所有动态资源一样,数据结构也会占用内存,因此在不再需要时应 {} 始终 {} 销毁,以防止内存泄漏,否则会减慢游戏速度并最终崩溃。", - "{}{}NOTE{}{} It is recommend to use {}arrays{} and {}structs{} over DS lists and maps, as they now have similar functionality, are easier to use and are garbage collected automatically.":"{}{} 注意{}{} 建议在 DS 列表和映射上使用 {} 数组 {} 和 {} 结构体 {},因为它们现在具有类似的功能,更易于使用,并且会自动进行垃圾收集。" + "{}{}NOTE{}{} It is recommend to use {}arrays{} and {}structs{} over DS lists and maps, as they now have similar functionality, are easier to use and are garbage collected automatically.":"{}{} 注意{}{} 建议在 DS 列表和映射上使用 {} 数组 {} 和 {} 结构体 {},因为它们现在具有类似的功能,更易于使用,并且会自动进行垃圾收集。", + "{}{}NOTE{}{} It is recommended to use {}arrays{} and {}structs{} over DS lists and maps, as they now have similar functionality, are easier to use and are garbage collected automatically.":"{}{} 注意{}{} 建议在 DS 列表和映射上使用 {} 数组 {} 和 {} 结构 {},因为它们现在具有类似的功能,更易于使用,并且会自动进行垃圾收集。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/ds_exists.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/ds_exists.json index c0d65dfc2..ccd7b0877 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/ds_exists.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/ds_exists.json @@ -7,9 +7,13 @@ "A {}stack{} data structure":"{}堆栈{}数据结构", "DS Type Constant":"DS 类型常量", "The above code checks the (previously initialised) variable \"ai_grid\" to see if it indexes a DS grid type data structure, and if it does not then it creates one and stores its index in the variable.":"上述代码检查(先前初始化的)变量\"ai_grid\"以查看它是否对DS网格类型的数据结构建立索引,如果不建立索引,则创建一个变量并将其索引存储在变量中。", + "The above code checks the (previously initialised) variable {}ai_grid{} to see if it indexes a DS grid type data structure. If it doesn\u0027t, it creates one and stores its handle in the variable.":"上面的代码检查 (之前初始化的) 变量 {}ai_grid{} 以查看它是否为 DS 网格类型数据结构建立索引。如果没有,它会创建一个并将其句柄存储在变量中。", "The type of data structure to check for (see the list of constants above)":"要检查的数据结构类型(参见上面的常量列表)", "The variable index to check for the data structure":"用于检查数据结构的变量索引", + "This function checks if a data structure of the given type with the given index exists.":"此函数检查是否存在具有给定索引的给定类型的数据结构。", "With this function you can check to see if a data structure of the given type exists. You supply the \"index\" value (as held in a variable) and the DS \"type\", which can be any of the constants listed below, and the function will return {}true{} if the data structure exists and {}false{} otherwise.":"使用此函数,您可以检查给定类型的数据结构是否存在。提供\"index\"值(保存在变量中)和\"Ds type\"(可以是下面列出的任何常量),如果数据结构存在,则函数将返回{}true{};否则,函数将返回{}false{}。", "With this function you can check to see if a data structure of the given type exists. You supply the DS reference (as held in a variable) and the DS type, which can be any of the constants listed below, and the function will return {}true{} if the data structure exists and {}false{} otherwise.":"使用此函数,您可以检查给定类型的数据结构是否存在。您提供 DS 引用 (保存在变量中) 和 DS 类型 (可以是下面列出的任何常量),如果数据结构存在,函数将返回 {}true{},否则返回 {}false{}。", - "{}NOTE{} You cannot use this function to check the type of a data structure, as the same index number may be used by multiple data structures of differing types.":"{}注意{}不能使用此函数检查数据结构的类型,因为不同类型的多个数据结构可能使用相同的索引号。" + "You supply the DS reference (as held in a variable) and the DS type, which can be any of the constants listed below, and the function will return {}true{} if the data structure exists and {}false{} otherwise.":"您提供 DS 引用 (保存在变量中) 和 DS 类型 (可以是下面列出的任何常量),如果数据结构存在,函数将返回 {}true{},否则返回 {}false{}。", + "{}NOTE{} You cannot use this function to check the type of a data structure, as the same index number may be used by multiple data structures of differing types.":"{}注意{}不能使用此函数检查数据结构的类型,因为不同类型的多个数据结构可能使用相同的索引号。", + "{}{}NOTE{}{} You cannot use this function to check the type of a data structure, as the same index number may be used by multiple data structures of differing types.":"{}{} 注意{}{} 您不能使用此函数来检查数据结构的类型,因为相同的索引号可能被不同类型的多个数据结构使用。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/ds_set_precision.json b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/ds_set_precision.json index 4135f0509..94e49c5b6 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/ds_set_precision.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Data_Structures/ds_set_precision.json @@ -2,6 +2,7 @@ "The above code will change the default precision setting for all data structure functions.":"上述代码将更改所有数据结构函数的默认精度设置。", "The precision value (default 0.0000001)":"精度值(默认值0.0000001)", "When comparing values, for example when searching in a map or sorting a list, {}GameMaker{} must decide when two values are equal. For strings and integer values this is clear but for real numbers, due to floating point round-off errors, seemingly equal numbers can easily become unequal. For example, it\u0027s possible that {}(5 / 3) * 3{} will {}not{} be equal to 5! To help avoid this, a precision value is used on all real number functions, and when the {}difference between two numbers is smaller{} than this precision they are considered equal. The default a precision of 0.0000001 is used for all data structure functions unless changed by this function.":"比较值时(例如,在地图中搜索或对列表排序时),{}GameMaker{}必须决定两个值何时相等。对于字符串和整数值,这一点是清楚的,但对于实数,由于浮点舍入误差,看似相等的数字很容易变得不相等。例如,{}(5/3 )* 3{}可能不会{}等于5!为了避免这种情况,在所有实数函数上使用精度值,当两个数之间的{}差小于此精度{}时,它们被视为相等。默认精度0.000001用于所有数据结构函数,除非此函数更改。", + "When comparing values, for example when searching in a map or sorting a list, {}GameMaker{} must decide when two values are equal. For strings and integer values this is clear but for real numbers, due to floating point round-off errors, seemingly equal numbers can easily become unequal. For example, it\u0027s possible that {}(5 / 3) * 3{} will {}not{} be equal to 5! To help avoid this, a precision value is used on all real number functions, and when the {}difference between two numbers is smaller{} than this precision they are considered equal. The default precision of 0.0000001 is used for all data structure functions unless changed by this function.":"比较值时,例如在地图中搜索或对列表排序时,{}GameMaker{} 必须决定两个值何时相等。对于字符串和整数值,这是很清楚的,但对于实数,由于浮点舍入误差,看似相等的数字很容易变得不相等。例如,{}(5 / 3) * 3{} 有可能 {} 不 {} 等于 5!为了帮助避免这种情况,所有实数函数都使用精度值,并且当 {} 两个数字之间的差异小于此精度时 {} 它们被视为相等。默认精度 0.0000001 用于所有数据结构函数,除非此函数更改。", "{}NOTE{}: This precision is used in all data structures but not in other comparisons in GML!":"{}注意{}:此精度用于所有数据结构,但不用于GML 中的其他比较!", "{}{}NOTE{}{} This precision is used in all data structures but not in other comparisons in GML!":"{}{} 注意{}{} 此精度用于所有数据结构,但不用于 GML 中的其他比较!" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels.json index 9e98813e5..fa359dad2 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels.json @@ -1,16 +1,38 @@ { + "After you have set up your layout, you must call {}{}flexpanel_calculate_layout{}{} with the dimensions where you intend to use the layout.":"设置布局后,您必须使用您打算使用布局的尺寸调用 {}{}flexpanel_calculate_layout{}{}。", + "Both of these examples use the data from {}{}flexpanel_node_layout_get_position{}{} in {}{}draw_rectangle{}{} to draw a node\u0027s rectangular area from {}left{}, {}top{} to {}left + width{}, {}top + height{}.":"这两个示例都使用来自{}{}flexpanel_node_layout_get_position{}{}的数据在{}{}draw_rectangle{}{}中从中绘制节点的矩形区域{}左{}、{}顶部{}到{}左+宽度{}、{}顶部+高度{}。", "By setting up nodes inside nodes (inside nodes...), you can create a layout tree. Each node can have properties that define how large it is, how it should be positioned in relation to the nodes in its container, how its own child nodes should behave, and so on.":"通过在节点内部设置节点 (节点内部 ...),您可以创建布局树。每个节点都可以具有定义其大小、相对于其容器中的节点应如何定位、其自己的子节点应如何表现等的属性。", + "Containing Block":"包含块", "Creating a layout is as simple as calling {}{}flexpanel_create_node{}{} and passing it a struct or a JSON string. That struct/JSON should define the properties of the root node and all nodes nested under the root node. The structure of that struct/JSON is {}outlined on this page{}.":"创建布局就像调用 {}{}flexpanel_create_node{}{} 并向其传递一个结构体或 JSON 字符串一样简单。该 struct/JSON 应该定义根节点以及嵌套在根节点下的所有节点的属性。{} 本页概述了该结构体 /JSON 的结构 {}。", "Each node has styling properties, which define its position, size and behaviour within its container. You can specify these styling properties in the struct/JSON that you pass while creating a node, which are all listed here: {}Styling Properties{}.":"每个节点都有样式属性,这些属性定义其在其容器内的位置、大小和行为。您可以在创建节点时传递的 struct/JSON 中指定这些样式属性,这些属性均在此处列出:{} 样式属性 {}。", "Flex Panel Functions":"柔性面板功能", + "Flex Panel Preview":"柔性面板预览", "Flex Panel Struct Members":"柔性面板结构成员", + "For information on how a Containing Block is chosen for a node and how it affects the node, see: {}Containing block{}":"有关如何为节点选择包含块以及它如何影响节点的信息,请参阅:{} 包含块 {}", + "Here, children are inserted using a {}repeat{} loop so that the same information does not have to be duplicated and written into the struct literal.":"此处,使用 {}repeat{} 循环插入子项,以便不必复制相同的信息并将其写入结构体文字中。", "How To Create Layouts":"如何创建布局", + "Layout Examples":"布局示例", "Overview":"概述", + "Some of the {}Styling Properties{} depend on a node\u0027s Containing Block, which may not be the same as its direct parent. For example, a node with a {}positionType{} of {}relative{} will position itself within its direct parent, however an {}absolute{} node will position itself to its Containing Block.":"某些 {} 样式属性 {} 取决于节点的包含块,该包含块可能与其直接父级不同。例如,{}positionType{} 为 {}relative{} 的节点会将自身定位在其直接父级中,而 {}absolute{} 节点会将自身定位在其包含块中。", + "The first child is centred because of its parent\u0027s {}Justify Content{} and {}Align Items{} properties (which handle the main axis and cross axis alignment, respectively).":"第一个子项居中是因为其父项具有 {}Justify Content{} 和 {}Align Items{} 属性 (分别处理主轴和横轴对齐)。", + "The second child has its {}Position Type{} set to {}\"absolute\"{}, which allows it to be positioned along the bottom-right corner independently.":"第二个子项的 {} 位置类型 {} 设置为 {}\"absolute\"{},这样它就可以沿着右下角独立定位。", + "The {}\"column\"{} {}Flex Direction{} of the parent allows its children to be laid out vertically (forming the main axis), and the {}\"flex-end\"{} {}Align Items{} property aligns the children to the end of its cross axis (i.e. to the right).":"父级的 {}\"column\"{}{}Flex Direction{} 允许其子级垂直布局 (形成主轴),而 {}\"flex-end\"{}{}Align Items{} 属性将子项对齐到其横轴的末端 (即向右)。", + "The {}Flex Shrink{} property in the children ensures they shrink if they overflow the bounds of its parents.":"子级中的 {}Flex Shrink{} 属性可确保它们在超出父级边界时收缩。", "The {}Flex Panel{} functionality uses the {}Yoga{} library.":"{}柔性面板{} 功能使用 {}Yoga{} 库。", + "Then you can call {}{}flexpanel_node_layout_get_position{}{} on the node you want information for, which will return a struct with its positional data.":"然后,您可以在需要其信息的节点上调用 {}{}flexpanel_node_layout_get_position{}{},这将返回一个包含其位置数据的结构体。", + "This is the code used to generate the layout on the left:":"这是用于生成左侧布局的代码:", + "This is the code used to generate the layout on the right:":"这是用于生成右侧布局的代码:", "This section contains the following pages:":"本节包含以下页面:", "This section details the usage of the {}Flex Panel{} runtime functions, which help you create UI layouts by handling all the logical calculations concerning where UI boxes are placed and how they behave.":"本部分详细介绍了 {}Flex Panel{} 运行时函数的用法,这些函数通过处理有关 UI 框放置位置及其行为方式的所有逻辑计算来帮助您创建 UI 布局。", + "Using Layout Data":"使用布局数据", + "You can also set and get these styling properties after creating a node using the {}Styling Functions{}.":"您还可以在使用 {} 样式函数 {} 创建节点后设置和获取这些样式属性。", "You can specify as many options in that struct/JSON as you like, or you can call the function without passing a struct/JSON, which will create an empty node. You can later set properties on the node and insert/remove children by calling the {}Flex Panel Functions{}.":"您可以在该 struct/JSON 中指定任意多个选项,也可以在不传递 struct/JSON 的情况下调用该函数,这将创建一个空节点。您稍后可以通过调用 {}柔性面板函数 {} 来设置节点属性并插入 / 删除子节点。", + "You can use that positional data in any way you want, e.g. creating UI object instances for each node or drawing them as rectangles.":"您可以按照您想要的任何方式使用该位置数据,例如为每个节点创建 UI 对象实例或将它们绘制为矩形。", "You can use these functions to set up layouts consisting of {}nodes{}. Each node is a rectangular area and may contain other nodes, making a node a {}container{}.":"您可以使用这些函数来设置由 {} 节点 {} 组成的布局。每个节点都是一个矩形区域,并且可能包含其他节点,从而使节点成为 {} 容器 {}。", "{}A layout tree can then be {}calculated according to a given canvas size{}, and the final positions and sizes of the nodes {}can be used{} anywhere you like (e.g. setting up your UI systems). There is no rendering or asset support in these functions and how you make use of this data is entirely up to you.":"{} 然后可以 {} 根据给定的画布尺寸计算 {} 布局树,并且节点的最终位置和尺寸 {} 可以 {} 在您喜欢的任何地方使用 (例如设置您的 UI 系统)。这些函数没有渲染或资源支持,如何使用这些数据完全取决于您。", - "{}Flex Panels{}":"{} 柔性面板 (Flex Panel){}" + "{}Flex Panels{}":"{} 柔性面板 (Flex Panel){}", + "{}Layout Code{}{}Layout Code{}":"{} 布局代码 {}{} 布局代码 {}", + "{}Open the section below to see the code used to generate both of the layouts shown above:":"{} 打开下面的部分查看用于生成上面显示的两种布局的代码:", + "{}The Debug Overlay{} contains a window for testing layouts in real-time using the same JSON data that you would pass into {}{}flexpanel_create_node{}{}.":"{} 调试覆盖层 {} 包含一个窗口,用于使用您将传递到 {}{}flexpanel_create_node{}{} 中的相同 JSON 数据来实时测试布局。", + "{}You can use this to test your JSON data and edit layouts before using the data in your game code. This JSON code can also be used as a struct literal in your code.":"{} 您可以使用它来测试 JSON 数据并编辑布局,然后再在游戏代码中使用数据。此 JSON 代码也可以用作代码中的结构文字。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels_Styling.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels_Styling.json new file mode 100644 index 000000000..2ec06fc38 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels_Styling.json @@ -0,0 +1,130 @@ +{ + "A {}{}Real{}{} value, e.g. {}64{}: This defines a size in absolute pixels, however depending on other properties, this may or may not be the {}final size{} of the node.":"{}{} 真实 {}{} 值,例如 {}64{}:这定义了以绝对像素为单位的尺寸,但是根据其他属性,这可能是也可能不是节点的 {} 最终尺寸 {}。", + "Align Content":"对齐内容(Align Content)", + "Align Items":"对齐项目(Align Items)", + "Align Self":"自我对齐(Align Self)", + "Also see the {}Flex{} property below.":"另请参阅下面的 {}Flex{} 属性。", + "Any values other than 1 determine how a node is shrinked against other growing nodes in the same container.":"1 以外的任何值都确定节点如何相对于同一容器中的其他增长节点进行收缩。", + "Any values other than 1 determine how a node is sized against other growing nodes in the same container, e.g. the node with a larger value will be given more size.":"1 以外的任何值都决定节点的大小如何根据同一容器中的其他生长节点进行调整,例如具有较大值的节点将被赋予更大的大小。", + "Aspect Ratio":"长宽比(Aspect Ratio)", + "Basic Properties":"基本属性", + "Border":"边界(Border)", + "Both width and height can take the following values:":"宽度和高度都可以采用以下值:", + "Data":"数据(Data)", + "Display":"显示(Display)", + "Flex":"柔性(Flex)", + "Flex Basis":"柔性基础(Flex Basis)", + "Flex Direction":"柔性方向(Flex Direction)", + "Flex Grow":"柔性扩大(Flex Grow)", + "Flex Shrink":"柔性收缩(Flex Shrink)", + "Flex Wrap":"柔性换行(Flex Wrap)", + "For example, a {}left{} value of {}20{} will place the node\u0027s left edge 20 pixels to the right of the parent\u0027s left edge. A {}right{} value of {}40{} will move the node so its right edge is 40 pixels to the left of its parent\u0027s, without resizing the node.":"例如,{}left{} 值为 {}20{} 会将节点的左边缘置于父级左边缘右侧 20 个像素处。{}right{} 值为 {}40{} 将移动节点,使其右边缘距其父节点的左侧 40 个像素,而不调整节点大小。", + "For example, an aspect ratio of {}1{} will result in a square node, {}2{} will be a 2:1 rectangle where its width is twice as much as its height, {}0.5{} will make the width half the size of the height.":"例如,纵横比为 {}1{} 将生成方形节点,{}2{} 将生成 2:1 的矩形,其宽度是其高度的两倍,{}0.5{} 将生成宽度是高度的一半。", + "For example, having a 400px container with a 40px node and then a node with {}flexGrow: 1{} will give the second node any remaining space within the container.":"例如,如果一个 400 像素的容器带有一个 40 像素的节点,然后一个带有 {}flexGrow: 1{} 的节点将为第二个节点提供容器内的任何剩余空间。", + "For nodes that don\u0027t have a defined width/height, this will increase the width/height.":"对于没有定义宽度 / 高度的节点,这将增加宽度 / 高度。", + "Gap":"间距(Gap)", + "If {}flexWrap{} is set to {}wrap{} or {}wrap-reverse{}, any items overflowing along the main axis will be laid out across new lines on the cross axis. This property controls how those wrapped lines are distributed along the cross axis.":"如果 {}flexWrap{} 设置为 {}wrap{} 或 {}wrap-reverse{},则沿主轴溢出的任何项目都将跨轴上的新行进行布局。此属性控制这些包裹线如何沿横轴分布。", + "Insets":"嵌入(Insets)", + "Justify Content":"主轴对齐(Justify Content)", + "Layout Direction":"布局方向(Layout Direction)", + "Margin":"外边距(Margin)", + "Min/Max Width and Height":"最小/最大 宽度和高度", + "Name":"名称(Name)", + "Nodes":"节点(Nodes)", + "Padding":"填充(Padding)", + "Percentage value as string, e.g. {}\"50%\"{}: This defines the width or height as a percentage of its {}Containing Block{}\u0027s width or height.":"字符串形式的百分比值,例如 {}\"50%\"{}:这将宽度或高度定义为其 {} 包含块 {} 的宽度或高度的百分比。", + "Position Type":"位置类型(Position Type)", + "Property List":"属性列表", + "Struct properties: {}alignContent{}{} Functions: {}{}flexpanel_node_style_set_align_content{}{}, {}{}flexpanel_node_style_get_align_content{}{}":"结构体属性:{}alignContent{}{} 函数:{}{}flexpanel_node_style_set_align_content{}{}、{}{}flexpanel_node_style_get_align_content{}{}", + "Struct properties: {}alignItems{}{} Functions: {}{}flexpanel_node_style_set_align_items{}{}, {}{}flexpanel_node_style_get_align_items{}{}":"结构体属性:{}alignItems{}{} 函数:{}{}flexpanel_node_style_set_align_items{}{}、{}{}flexpanel_node_style_get_align_items{}{}", + "Struct properties: {}alignSelf{}{} Functions: {}{}flexpanel_node_style_set_align_self{}{}, {}{}flexpanel_node_style_get_align_self{}{}":"结构体属性:{}alignSelf{}{} 函数:{}{}flexpanel_node_style_set_align_self{}{}、{}{}flexpanel_node_style_get_align_self{}{}", + "Struct properties: {}direction{}{} Functions: {}{}flexpanel_node_style_set_direction{}{}, {}{}flexpanel_node_style_get_direction{}{}":"结构属性:{}direction{}{} 函数:{}{}flexpanel_node_style_set_direction{}{}、{}{}flexpanel_node_style_get_direction{}{}", + "Struct properties: {}display{}{} Functions: {}{}flexpanel_node_style_set_display{}{}, {}{}flexpanel_node_style_get_display{}{}":"结构体属性:{}display{}{} 函数:{}{}flexpanel_node_style_set_display{}{}、{}{}flexpanel_node_style_get_display{}{}", + "Struct properties: {}flexBasis{}{} Functions: {}{}flexpanel_node_style_set_flex_basis{}{}, {}{}flexpanel_node_style_get_flex_basis{}{}":"结构体属性:{}flexBasis{}{} 函数:{}{}flexpanel_node_style_set_flex_basis{}{}、{}{}flexpanel_node_style_get_flex_basis{}{}", + "Struct properties: {}flexDirection{}{} Functions: {}{}flexpanel_node_style_set_flex_direction{}{}, {}{}flexpanel_node_style_get_flex_direction{}{}":"结构体属性:{}flexDirection{}{} 函数:{}{}flexpanel_node_style_set_flex_direction{}{}、{}{}flexpanel_node_style_get_flex_direction{}{}", + "Struct properties: {}flexGrow{}{} Functions: {}{}flexpanel_node_style_set_flex_grow{}{}, {}{}flexpanel_node_style_get_flex_grow{}{}":"结构体属性:{}flexGrow{}{} 函数:{}{}flexpanel_node_style_set_flex_grow{}{}、{}{}flexpanel_node_style_get_flex_grow{}{}", + "Struct properties: {}flexShrink{}{} Functions: {}{}flexpanel_node_style_set_flex_shrink{}{}, {}{}flexpanel_node_style_get_flex_shrink{}{}":"结构体属性:{}flexShrink{}{} 函数:{}{}flexpanel_node_style_set_flex_shrink{}{}、{}{}flexpanel_node_style_get_flex_shrink{}{}", + "Struct properties: {}flexWrap{}{} Functions: {}{}flexpanel_node_style_set_flex_wrap{}{}, {}{}flexpanel_node_style_get_flex_wrap{}{}":"结构体属性:{}flexWrap{}{} 函数:{}{}flexpanel_node_style_set_flex_wrap{}{}、{}{}flexpanel_node_style_get_flex_wrap{}{}", + "Struct properties: {}flex{}{} Functions: {}{}flexpanel_node_style_set_flex{}{}, {}{}flexpanel_node_style_get_flex{}{}":"结构属性:{}flex{}{} 函数:{}{}flexpanel_node_style_set_flex{}{}、{}{}flexpanel_node_style_get_flex{}{}", + "Struct properties: {}justifyContent{}{} Functions: {}{}flexpanel_node_style_set_justify_content{}{}, {}{}flexpanel_node_style_get_justify_content{}{}":"结构体属性:{}justifyContent{}{} 函数:{}{}flexpanel_node_style_set_justify_content{}{}、{}{}flexpanel_node_style_get_justify_content{}{}", + "Struct properties: {}left{}, {}right{}, {}top{}, {}bottom{}, {}start{}, {}end{}{} Functions: {}{}flexpanel_node_style_set_position{}{}, {}{}flexpanel_node_style_get_position{}{}":"结构属性:{}left{}、{}right{}、{}top{}、{}bottom{}、{}start{}、{}end{}{} 函数:{}{}flexpanel_node_style_set_position{}{}、{}{}flexpanel_node_style_get_position{}{}", + "Struct properties: {}minWidth{}, {}maxWidth{}, {}minHeight{}, {}maxHeight{}{} Functions: {}{}flexpanel_node_style_set_min_width{}{}, {}{}flexpanel_node_style_set_max_width{}{}, {}{}flexpanel_node_style_set_min_height{}{}, {}{}flexpanel_node_style_set_max_height{}{}, {}{}flexpanel_node_style_get_min_width{}{}, {}{}flexpanel_node_style_get_max_width{}{}, {}{}flexpanel_node_style_get_min_height{}{}, {}{}flexpanel_node_style_get_max_height{}{}":"结构属性:{}minWidth{}、{}maxWidth{}、{}minHeight{}、{}maxHeight{}{} 函数:{}{}flexpanel_node_style_set_min_width{}{}、{}{}flexpanel_node_style_set_max_width{}{}、{}{}flexpanel_node_style_set_min_height{}{}、{}{}flexpanel_node_style_set_max_height{}{}、{}{}flexpanel_node_style_get_min_width{}{}、{}{}flexpanel_node_style_get_max_width{}{}、{}{}flexpanel_node_style_get_min_height{}{}、{}{}flexpanel_node_style_get_max_height{}{}", + "Struct properties: {}position{}, {}positionType{}{} Functions: {}{}flexpanel_node_style_set_position_type{}{}, {}{}flexpanel_node_style_get_position_type{}{}":"结构属性:{}position{}、{}positionType{}{} 函数:{}{}flexpanel_node_style_set_position_type{}{}、{}{}flexpanel_node_style_get_position_type{}{}", + "Struct properties: {}width{}, {}height{}{} Functions: {}{}flexpanel_node_style_set_width{}{}, {}{}flexpanel_node_style_set_height{}{}, {}{}flexpanel_node_style_get_width{}{}, {}{}flexpanel_node_style_get_height{}{}":"结构属性:{}width{}, {}height{}{} 函数:{}{}flexpanel_node_style_set_width{}{}、{}{}flexpanel_node_style_set_height{}{}、{}{}flexpanel_node_style_get_width{}{}、{}{}flexpanel_node_style_get_height{}{}", + "Struct properties: {}border{}, {}borderLeft{}, {}borderRight{}, {}borderTop{}, {}borderBottom{}, {}borderStart{}, {}borderEnd{}, {}borderHorizontal{}, {}borderVertical{}{} Functions: {}{}flexpanel_node_style_set_border{}{}, {}{}flexpanel_node_style_get_border{}{}":"结构体属性:{}border{}、{}borderLeft{}、{}borderRight{}、{}borderTop{}、{}borderBottom{}、{}borderStart{}、{}borderEnd{}、{}borderHorizo\u200B\u200Bntal{}、{}borderVertical{}{} 函数:{}{}flexpanel_node_style_set_border{}{}、{}{}flexpanel_node_style_get_border{}{}", + "Struct properties: {}gap{}, {}gapRow{}, {}gapColumn{}{} Functions: {}{}flexpanel_node_style_set_gap{}{}, {}{}flexpanel_node_style_get_gap{}{}":"结构属性:{}gap{}、{}gapRow{}、{}gapColumn{}{} 函数:{}{}flexpanel_node_style_set_gap{}{}、{}{}flexpanel_node_style_get_gap{}{}", + "Struct properties: {}margin{}, {}marginLeft{}, {}marginRight{}, {}marginTop{}, {}marginBottom{}, {}marginStart{}, {}marginEnd{}, {}marginHorizontal{}, {}marginVertical{}{} Functions: {}{}flexpanel_node_style_set_margin{}{}, {}{}flexpanel_node_style_get_margin{}{}":"结构属性:{}margin{}、{}marginLeft{}、{}marginRight{}、{}marginTop{}、{}marginBottom{}、{}marginStart{}、{}marginEnd{}、{}marginHorizo\u200B\u200Bntal{}、{}marginVertical{}{} 函数:{}{}flexpanel_node_style_set_margin{}{}、{}{}flexpanel_node_style_get_margin{}{}", + "Struct properties: {}padding{}, {}paddingLeft{}, {}paddingRight{}, {}paddingTop{}, {}paddingBottom{}, {}paddingStart{}, {}paddingEnd{}, {}paddingHorizontal{}, {}paddingVertical{}{} Functions: {}{}flexpanel_node_style_set_padding{}{}, {}{}flexpanel_node_style_get_padding{}{}":"结构体属性:{}padding{}、{}paddingLeft{}、{}paddingRight{}、{}paddingTop{}、{}paddingBottom{}、{}paddingStart{}、{}paddingEnd{}、{}paddingHorizo\u200B\u200Bntal{}、{}paddingVertical{}{} 函数:{}{}flexpanel_node_style_set_padding{}{}、{}{}flexpanel_node_style_get_padding{}{}", + "Struct property: {}aspectRatio{}{} Functions: {}{}flexpanel_node_style_set_aspect_ratio{}{}, {}{}flexpanel_node_style_get_aspect_ratio{}{}":"结构体属性:{}aspectRatio{}{} 函数:{}{}flexpanel_node_style_set_aspect_ratio{}{}、{}{}flexpanel_node_style_get_aspect_ratio{}{}", + "Struct property: {}data{}{} Function: {}{}flexpanel_node_get_data{}{}":"结构属性:{}data{}{} 函数:{}{}flexpanel_node_get_data{}{}", + "Struct property: {}name{}{} Functions: {}{}flexpanel_node_set_name{}{}, {}{}flexpanel_node_get_name{}{}":"结构属性:{}name{}{} 函数:{}{}flexpanel_node_set_name{}{}、{}{}flexpanel_node_get_name{}{}", + "Struct property: {}nodes{}{} Functions: {}{}flexpanel_node_insert_child{}{}, {}{}flexpanel_node_remove_child{}{}, {}{}flexpanel_node_remove_all_children{}{}, {}{}flexpanel_node_get_child{}{}":"结构体属性:{}nodes{}{} 函数:{}{}flexpanel_node_insert_child{}{}、{}{}flexpanel_node_remove_child{}{}、{}{}flexpanel_node_remove_all_children{}{}、{}{}flexpanel_node_get_child{}{}}", + "Styling Properties":"样式属性", + "The properties that you can define in the struct or JSON string are listed below. The rest of the page describes each property in detail.":"下面列出了您可以在结构体或 JSON 字符串中定义的属性。该页面的其余部分详细描述了每个属性。", + "The sections below describe what type of values you can pass for each property.":"以下部分描述了您可以为每个属性传递什么类型的值。", + "The {}alignContent{} property controls how the wrapped lines on the cross axis are laid out.":"{}alignContent{} 属性控制横轴上换行的布局方式。", + "The {}justifyContent{} property controls how child nodes are laid out on the main axis, and {}alignItems{} controls how they are placed on the cross axis.":"{}justifyContent{} 属性控制子节点在主轴上的布局方式,而 {}alignItems{} 控制子节点在横轴上的放置方式。", + "The {}nodes{} member is an array. This array defines the child nodes under the current node, where each node is a struct with the same format described on this page.":"{}nodes{} 成员是一个数组。该数组定义了当前节点下的子节点,其中每个节点都是一个与本页描述的格式相同的结构体。", + "These properties define the distance between an edge of the node and the same edge of its parent\u0027s node, with positive values moving the node toward the centre, and negative values moving it away from the centre.":"这些属性定义节点的边缘与其父节点的同一边缘之间的距离,正值将节点移向中心,负值将节点移离中心。", + "These properties define the minimum and maximum size the node must maintain in each dimension. It accepts absolute pixel values ({}{}Real{}{}) and percentage values ({}{}String{}{} ending with {}%{}) (as described in the previous section).":"这些属性定义节点在每个维度中必须保持的最小和最大大小。它接受绝对像素值 ({}{}Real{}{}) 和百分比值 (以 {8}%{9} 结尾的 {}{}String{}{})( 如上一节所述)。", + "These properties define the width and height of the \"border box\" of the node, which is the collective size of the node\u0027s content, padding and border.":"这些属性定义了节点 \" 边框 \" 的宽度和高度,即节点内容、填充和边框的集体尺寸。", + "These values also accept percentages as strings.":"这些值还接受百分比作为字符串。", + "This acts the same as padding.":"这与填充(Padding)的作用相同。", + "This can be set for an entire layout tree when {}calculating its layout{}.":"可以在 {} 计算其布局 {} 时为整个布局树设置此值。", + "This controls how the node grows within its flex container depending on the remaining space in the container. It\u0027s a positive weight value with a default of 1.":"这控制节点如何在其弹性容器内增长,具体取决于容器中的剩余空间。它是一个正权重值,默认值为 1。", + "This controls how the node shrinks within its flex container when there is overflow. It\u0027s a positive weight value with a default of 1.":"这控制当溢出时节点如何在其弹性容器内收缩。它是一个正权重值,默认值为 1。", + "This controls how the non-absolute children of a flex container are aligned along its cross axis (i.e. the direction perpendicular to {}flexDirection{}).":"它控制 Flex 容器的非绝对子级如何沿其横轴 (即垂直于 {}flexDirection{} 的方向) 对齐。", + "This controls how the non-absolute children of a flex container are aligned along its main axis (i.e. the direction of {}flexDirection{}).":"它控制 Flex 容器的非绝对子级如何沿其主轴 (即 {}flexDirection{} 的方向) 对齐。", + "This controls what happens when children in the container have overflown on the main axis. By default, they will overflow or shrink depending on their properties.":"这控制当容器中的子元素在主轴上溢出时会发生什么。默认情况下,它们将根据其属性溢出或缩小。", + "This controls which layout mode the node follows. You can choose from the following values:":"这控制节点遵循哪种布局模式。您可以从以下值中进行选择:", + "This defines a root node with child nodes nested within it (and further child nodes within child nodes).":"这定义了一个根节点,其中嵌套了子节点 (以及子节点内的其他子节点)。", + "This defines the position type of the node. You can pass any one of the following strings:":"这定义了节点的位置类型。您可以传递以下任一字符串:", + "This is shorthand for the {}flexGrow{} and {}flexShrink{} properties. It will act as {}flexGrow{} when the value is positive, and {}flexShrink{} when it\u0027s negative.":"这是 {}flexGrow{} 和 {}flexShrink{} 属性的简写。当值为正时,它将充当 {}flexGrow{}; 当值为负时,它将充当 {}flexShrink{}。", + "This is the added distance between each row and column of the flex container and affects distances between child nodes. You can apply to both axes with {}gap{} or apply only to rows or columns.":"这是弹性容器的每行和每列之间增加的距离,并影响子节点之间的距离。您可以应用到带有 {}gap{} 的两个轴,或者仅应用到行或列。", + "This is the aspect ratio that the node must maintain and corresponds to the horizontal axis.":"这是节点必须保持的纵横比,与水平轴相对应。", + "This is the default size of an item within its flex container before any flex grow or shrink is applied. For a row container this affects the width, and for a column container this affects the height.":"这是应用任何 Flex 增长或收缩之前 Flex 容器内项目的默认大小。对于行容器,这会影响宽度,对于列容器,这会影响高度。", + "This is the direction in which non-absolute children of the node are laid out. This direction is known as the main axis, and the direction perpendicular to this is known as the cross axis.":"这是节点的非绝对子节点的布局方向。该方向称为主轴线,垂直于该方向的方向称为横轴。", + "This is the layout direction of the node and its children. You can pass either of two strings:":"这是节点及其子节点的布局方向。您可以传递两个字符串之一:", + "This is the same as {}alignItems{} (described above) however instead of being applied to a container, this is applied directly to a child node, and affects its cross-axis alignment within its container. This property overrides the {}alignItems{} value set for its parent container.":"这与 {}alignItems{}( 如上所述) 相同,但不是应用于容器,而是直接应用于子节点,并影响其在容器内的横轴对齐。此属性会覆盖为其父容器设置的 {}alignItems{} 值。", + "This is the space around the outside of the node. You can define it for all edges or for a specific edge. Accepts pixel values and percentages.":"这是节点外部周围的空间。您可以为所有边或特定边定义它。接受像素值和百分比。", + "This is the spacing between the inner edges of the node and its children. You can define it for all edges or for a specific edge. Accepts pixel values and percentages.":"这是节点及其子节点的内边缘之间的间距。您可以为所有边或特定边定义它。接受像素值和百分比。", + "When creating a new {}Flex Panel{} node using {}{}flexpanel_create_node{}{}, you can pass a struct containing information on the node and its children, or a string containing JSON for the same data. For example:":"使用 {}{}flexpanel_create_node{}{} 创建新的 {0}Flex Panel{1} 节点时,您可以传递包含节点及其子节点信息的结构体,或包含相同数据 JSON 的字符串。例如:", + "When this member is not supplied, a node is still created with an empty data struct, which can be retrieved at any time. The returned struct can be modified and it affects what is returned with future calls to the function for the same node.":"当未提供此成员时,仍会使用空数据结构创建节点,可以随时检索该数据结构。返回的结构可以修改,它会影响将来调用同一节点的函数时返回的内容。", + "Width and Height":"宽度和高度", + "You can choose from the following values:":"您可以从以下值中进行选择:", + "You can give a node a {}data{} member which is a struct that can store any data you like. It does not affect the layouts and is for your own use.":"您可以为节点提供一个 {}data{} 成员,该成员是一个可以存储您喜欢的任何数据的结构。它不影响布局,供您自己使用。", + "You can give each node an optional, non-unique name. This can help you identify a node when using the final layout data in your systems.":"您可以为每个节点指定一个可选的、非唯一的名称。这可以帮助您在系统中使用最终布局数据时识别节点。", + "You can nest nodes inside nodes, e.g.:":"您可以在节点内嵌套节点,例如:", + "{}\"absolute\"{}: This node is removed from the flow of its parent and will not take up space. Inset positions will be relative to the {}Containing Block{} which may not be its direct parent.":"{}\"absolute\"{}:该节点将从其父级流中移除,并且不会占用空间。插入位置将相对于 {} 包含块 {},该块可能不是其直接父级。", + "{}\"auto\"{}: This is the default value. It calculates the width or height of the node based on its content (e.g. child nodes).":"{}\"auto\"{}:这是默认值。它根据节点的内容 (例如子节点) 计算节点的宽度或高度。", + "{}\"baseline\"{}: Align children along a common baseline. Individual children can be set to be the reference baseline for their parents.":"{}\"baseline\"{}:将子项沿共同基线对齐。可以将个别孩子设置为父母的参考基线。", + "{}\"center\"{}: Align children to the centre of the cross axis.":"{}\"center\"{}:将子项与横轴的中心对齐。", + "{}\"center\"{}: Align children to the centre of the main axis.":"{}\"center\"{}:将子项与主轴中心对齐。", + "{}\"column\"{} (default): Align children from top to bottom.":"{}\"column\"{}( 默认):从上到下对齐子项。", + "{}\"column-reverse\"{}: Align children from bottom to top.":"{}\"column-reverse\"{}:从下到上对齐子项。", + "{}\"flex\"{} (default): The default layout behaviour.":"{}\"flex\"{}( 默认):默认布局行为。", + "{}\"flex-end\"{}: Align children to the end of the cross axis.":"{}\"flex-end\"{}:将子项与横轴的末端对齐。", + "{}\"flex-end\"{}: Align children to the end of the main axis, acting as the opposite of {}flexDirection{}.":"{}\"flex-end\"{}:将子项与主轴末端对齐,与 {}flexDirection{} 相反。", + "{}\"flex-start\"{} (default): Align children to the start of the cross axis.":"{}\"flex-start\"{}( 默认):将子项与横轴的起点对齐。", + "{}\"flex-start\"{} (default): Align children to the start of the main axis, as set in {}flexDirection{}.":"{}\"flex-start\"{}( 默认):将子项与主轴的起点对齐,如 {}flexDirection{} 中的设置。", + "{}\"flex-start\"{}: Align children to the start of the cross axis.":"{}\"flex-start\"{}:将子项与横轴的起点对齐。", + "{}\"ltr\"{}: Flex panels are laid out from left to right. The {}start{} inset refers to {}left{} and {}end{} refers to {}right{}.":"{}\"ltr\"{}: 弹性面板从左到右排列。{}start{} 嵌入指的是 {}left{},而 {}end{} 指的是 {}right{}", + "{}\"no-wrap\"{} (default): Default behaviour, no wrapping":"{}\"no-wrap\"{}( 默认):默认行为,不换行", + "{}\"none\"{}: Disables the node. This effectively functions as the node being removed from the tree, as it\u0027s not included in any calculations.":"{}\"none\"{}:禁用节点。这实际上起到了从树中删除节点的作用,因为它不包含在任何计算中。", + "{}\"relative\"{} (default): This node will participate in the flow of its parent container and will take up space in it. Inset positions ({}left{}, {}top{}, etc.) will be relative to the node\u0027s position within the flow.":"{}\"relative\"{}( 默认):此节点将参与其父容器的流并占用其中的空间。插入位置 ({}左侧{}、{}顶部{} 等) 将相对于流中的节点位置。", + "{}\"row\"{}: Align children from left to right.":"{}\"row\"{}:从左到右对齐子项。", + "{}\"row-reverse\"{}: Align children from right to left.":"{}\"row-reverse\"{}:从右向左对齐子项。", + "{}\"rtl\"{}: Flex panels are laid out from right to left. The {}start{} inset refers to {}right{} and {}end{} refers to {}left{}.":"{}\"rtl\"{}: 弹性面板从右到左排列。{}start{} 嵌入指的是 {}right{},而 {}end{} 指的是 {}left{}", + "{}\"space-around\"{}: Similar to {}space-between{} but distributes the space before the first child and after the last child as well.":"{}\"space-around\"{}:与 {}space-between{} 类似,但也在第一个子项之前和最后一个子项之后分配空间。", + "{}\"space-between\"{}: Align children from the start of the container to the end along the cross axis, inserting space between each child to fill the container.":"{}\"space-between\"{}:沿横轴将子项从容器的开头到末端对齐,在每个子项之间插入空格以填充容器。", + "{}\"space-between\"{}: Align children from the start of the container to the end, inserting space between each child to fill the container.":"{}\"space-between\"{}:将子项从容器的开头到末尾对齐,在每个子项之间插入空格以填充容器。", + "{}\"space-evenly\"{}: Similar to {}space-around{} but the spacing between the edges and the children, and between each child node, is exactly the same.":"{}\"space-evenly\"{}:与 {}space-around{} 类似,但边与子节点之间以及每个子节点之间的间距完全相同。", + "{}\"static\"{}: The node will behave like relative except it will ignore insets and will not form a {}Containing Block{} for its children.":"{}\"static\"{}:节点的行为类似于相对节点,只是它会忽略插入并且不会为其子节点形成 {} 包含块 {}。", + "{}\"stretch\"{} (default): Stretch children to fit the size of the cross axis.":"{}\"stretch\"{}( 默认):拉伸子项以适应横轴的大小。", + "{}\"wrap\"{}: Child nodes are wrapped on overflow, with each new line being placed on the cross axis":"{}\"wrap\"{}:子节点在溢出时被包裹,每个新行都被放置在交叉轴上", + "{}\"wrap-reverse\"{}: Child nodes are wrapped but the order of the lines is reversed":"{}\"wrap-reverse\"{}:子节点被包裹,但行的顺序相反", + "{}Flex Panel Struct Members{}":"{}柔性面板结构成员 {}", + "{}left{} and {}top{} will always take precedence over {}right{} and {}bottom{}, respectively. {}start{} and {}end{} change depending on the {}Layout Direction{}.":"{}left{} 和 {}top{} 始终分别优先于 {}right{} 和 {}bottom{}。{}start{} 和 {}end{} 根据 {} 布局方向 {} 而变化。", + "{}{}IMPORTANT{}{} Each property also has GML functions for setting and getting that property for a node. However, the types of values that a setter function accepts may be different from the type of value you can give it in the struct/JSON. Ensure you read the page for the function you are trying to use for information on its argument types.":"{}{} 重要{}{} 每个属性还具有用于设置和获取节点属性的 GML 函数。但是,setter 函数接受的值类型可能与您在 struct/JSON 中提供的值类型不同。确保您阅读了您尝试使用的函数的页面,以获取有关其参数类型的信息。", + "{}{}NOTE{}{} You can also refer to {}Yoga\u0027s styling documentation{} for information beyond what this page describes.":"{}{} 注意{}{} 您还可以参阅 {}Yoga 的样式文档 {} 以获取本页面描述之外的信息。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_align_content.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_align_content.json new file mode 100644 index 000000000..f61896685 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_align_content.json @@ -0,0 +1,6 @@ +{ + "See: {}Align Content{} / {}{}flexpanel_node_style_set_align_content{}{}":"请参阅:{} 对齐内容 {}/{}{}flexpanel_node_style_set_align_content{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}alignContent{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}alignContent{1} 属性。", + "This gets the align content value of a node and stores it in a local variable.":"这会获取节点的对齐内容值并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_align_items.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_align_items.json new file mode 100644 index 000000000..1ff216684 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_align_items.json @@ -0,0 +1,6 @@ +{ + "See: {}Align Items{} / {}{}flexpanel_node_style_set_align_items{}{}":"请参阅:{} 对齐项目 {}/{}{}flexpanel_node_style_set_align_items{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}alignItems{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}alignItems{1} 属性。", + "This gets the align items value of a node and stores it in a local variable.":"这会获取节点的对齐项值并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_align_self.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_align_self.json new file mode 100644 index 000000000..6b63f036a --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_align_self.json @@ -0,0 +1,6 @@ +{ + "See: {}Align Self{} / {}{}flexpanel_node_style_set_align_self{}{}":"请参阅:{} 自我对齐 {}/{}{}flexpanel_node_style_set_align_self{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}alignSelf{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}alignSelf{1} 属性。", + "This gets the align self value of a node and stores it in a local variable.":"这会获取节点的对齐自身值并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_aspect_ratio.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_aspect_ratio.json new file mode 100644 index 000000000..17e1d1965 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_aspect_ratio.json @@ -0,0 +1,6 @@ +{ + "See: {}Aspect Ratio{} / {}{}flexpanel_node_style_set_aspect_ratio{}{}":"请参阅:{} 宽高比 {}/{}{}flexpanel_node_style_set_aspect_ratio{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}aspectRatio{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex 面板节点 {}{} 的 {0}aspectRatio{1} 属性。", + "This gets the aspect ratio of a node and stores it in a local variable.":"这会获取节点的纵横比并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_border.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_border.json new file mode 100644 index 000000000..92c0f3b5d --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_border.json @@ -0,0 +1,7 @@ +{ + "See: {}Border{} / {}{}flexpanel_node_style_set_border{}{}":"请参阅:{} 边框 {}/{}{}flexpanel_node_style_set_border{}{}", + "The edge to get the border for.":"获取边框的边缘。", + "The node to read.":"要读取的节点。", + "This function returns the border for the given edge(s) of a {}{}Flex Panel Node{}{}.":"此函数返回 {}{}Flex Panel 节点 {}{} 的给定边缘的边框。", + "This gets the general border of a node and stores it in a local variable.":"这获取节点的总体边界并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_direction.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_direction.json new file mode 100644 index 000000000..3b8d62e90 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_direction.json @@ -0,0 +1,6 @@ +{ + "See: {}Layout Direction{} / {}{}flexpanel_node_style_set_direction{}{}":"请参阅:{} 布局方向 {}/{}{}flexpanel_node_style_set_direction{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}direction{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}direction{1} 属性。", + "This gets the layout direction of a node and stores it in a local variable.":"这获取节点的布局方向并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_display.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_display.json new file mode 100644 index 000000000..6fed1a6ae --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_display.json @@ -0,0 +1,6 @@ +{ + "See: {}Display{} / {}{}flexpanel_node_style_set_display{}{}":"请参阅:{} 显示 {}/{}{}flexpanel_node_style_set_display{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}display{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}display{1} 属性。", + "This gets the display mode of a node and stores it in a local variable.":"这获取节点的显示模式并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex.json new file mode 100644 index 000000000..73648f0c2 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex.json @@ -0,0 +1,6 @@ +{ + "See: {}Flex{} / {}{}flexpanel_node_style_set_flex{}{}":"请参阅:{}柔性{}/{}{}flexpanel_node_style_set_flex{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}flex{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex 面板节点 {}{} 的 {0}flex{1} 属性。", + "This gets the flex value of a node and stores it in a local variable.":"这会获取节点的 flex 值并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_basis.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_basis.json new file mode 100644 index 000000000..ccdd31fb0 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_basis.json @@ -0,0 +1,5 @@ +{ + "The node to read.":"要读取的节点。", + "This function returns the {}flexBasis{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}flexBasis{1} 属性。", + "This gets the flex basis value of a node and stores it in a local variable.":"这会获取节点的弹性基础值并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_direction.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_direction.json new file mode 100644 index 000000000..70f6a5487 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_direction.json @@ -0,0 +1,6 @@ +{ + "See: {}Flex Direction{} / {}{}flexpanel_node_style_set_flex_direction{}{}":"请参阅:{}Flex 方向 {}/{}{}flexpanel_node_style_set_flex_direction{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}flexDirection{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex 面板节点 {}{} 的 {0}flexDirection{1} 属性。", + "This gets the flex direction of a node and stores it in a local variable.":"这会获取节点的弯曲方向并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_grow.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_grow.json new file mode 100644 index 000000000..d8c021356 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_grow.json @@ -0,0 +1,6 @@ +{ + "See: {}Flex Grow{} / {}{}flexpanel_node_style_set_flex_grow{}{}":"请参阅:{} 柔性扩大 {}/{}{}flexpanel_node_style_set_flex_grow{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}flexGrow{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex 面板节点 {}{} 的 {0}flexGrow{1} 属性。", + "This gets the flex grow value of a node and stores it in a local variable.":"这会获取节点的 Flex Growth 值并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_shrink.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_shrink.json new file mode 100644 index 000000000..b578aa5f6 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_shrink.json @@ -0,0 +1,6 @@ +{ + "See: {}Flex Shrink{} / {}{}flexpanel_node_style_set_flex_shrink{}{}":"请参阅:{}柔性收缩 {}/{}{}flexpanel_node_style_set_flex_shrink{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}flexShrink{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex 面板节点 {}{} 的 {0}flexShrink{1} 属性。", + "This gets the flex shrink value of a node and stores it in a local variable.":"这会获取节点的柔性收缩值并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_wrap.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_wrap.json new file mode 100644 index 000000000..9f2ae3750 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_flex_wrap.json @@ -0,0 +1,5 @@ +{ + "The node to read.":"要读取的节点。", + "This function returns the {}flexWrap{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}flexWrap{1} 属性。", + "This gets the flex wrap value of a node and stores it in a local variable.":"这会获取节点的 Flex Wrap 值并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_gap.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_gap.json new file mode 100644 index 000000000..dea44b95d --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_gap.json @@ -0,0 +1,7 @@ +{ + "See: {}Gap{} / {}{}flexpanel_node_style_set_gap{}{}":"请参阅:{} 间距 {}/{}{}flexpanel_node_style_set_gap{}{}", + "The node to read.":"要读取的节点。", + "The specific gap property to check.":"要检查的具体间距属性。", + "This function returns the gap of the given {}{}Flex Panel Node{}{} for the specified gutter(s).":"此函数返回指定装订线的给定 {}{}Flex Panel 节点 {}{} 的间隙。", + "This gets the general gap of a node and stores it in a local variable.":"这获取节点的一般间隙并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_height.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_height.json new file mode 100644 index 000000000..15618aefa --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_height.json @@ -0,0 +1,6 @@ +{ + "See: {}Width and Height{} / {}{}flexpanel_node_style_set_height{}{}":"请参阅:{} 宽度和高度 {}/{}{}flexpanel_node_style_set_height{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}height{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}height{1} 属性。", + "This gets the height of a node and stores it in a local variable.":"这会获取节点的高度并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_justify_content.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_justify_content.json new file mode 100644 index 000000000..405b7071b --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_justify_content.json @@ -0,0 +1,5 @@ +{ + "The node to read.":"要读取的节点。", + "This function returns the {}justifyContent{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}justifyContent{1} 属性。", + "This gets the justify content value of a node and stores it in a local variable.":"这会获取节点的合理内容值并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_margin.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_margin.json new file mode 100644 index 000000000..5339fd201 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_margin.json @@ -0,0 +1,7 @@ +{ + "See: {}Margin{} / {}{}flexpanel_node_style_set_margin{}{}":"请参阅:{} 边距 {}/{}{}flexpanel_node_style_set_margin{}{}", + "The edge to get the margin for.":"要获取边距的边。", + "The node to read.":"要读取的节点。", + "This function returns the margin for the given edge(s) of a {}{}Flex Panel Node{}{}.":"此函数返回 {}{}Flex Panel 节点 {}{} 的给定边缘的边距。", + "This gets the general margin of a node and stores it in a local variable.":"这获取节点的一般边距并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_max_height.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_max_height.json new file mode 100644 index 000000000..a59490bb6 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_max_height.json @@ -0,0 +1,6 @@ +{ + "See: {}Min/Max Width and Height{} / {}{}flexpanel_node_style_set_max_height{}{}":"请参阅:{} 最小 / 最大宽度和高度 {}/{}{}flexpanel_node_style_set_max_height{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}maxHeight{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}maxHeight{1} 属性。", + "This gets the maximum height of a node and stores it in a local variable.":"这会获取节点的最大高度并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_max_width.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_max_width.json new file mode 100644 index 000000000..122540a24 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_max_width.json @@ -0,0 +1,6 @@ +{ + "See: {}Min/Max Width and Height{} / {}{}flexpanel_node_style_set_max_width{}{}":"请参阅:{} 最小 / 最大宽度和高度 {}/{}{}flexpanel_node_style_set_max_width{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}maxWidth{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}maxWidth{1} 属性。", + "This gets the maximum width of a node and stores it in a local variable.":"这将获取节点的最大宽度并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_min_height.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_min_height.json new file mode 100644 index 000000000..dbef36eb3 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_min_height.json @@ -0,0 +1,6 @@ +{ + "See: {}Min/Max Width and Height{} / {}{}flexpanel_node_style_set_min_height{}{}":"请参阅:{} 最小 / 最大宽度和高度 {}/{}{}flexpanel_node_style_set_min_height{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}minHeight{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}minHeight{1} 属性。", + "This gets the minimum height of a node and stores it in a local variable.":"这会获取节点的最小高度并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_min_width.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_min_width.json new file mode 100644 index 000000000..ab4f07756 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_min_width.json @@ -0,0 +1,6 @@ +{ + "See: {}Min/Max Width and Height{} / {}{}flexpanel_node_style_set_min_width{}{}":"请参阅:{} 最小 / 最大宽度和高度 {}/{}{}flexpanel_node_style_set_min_width{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}minWidth{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}minWidth{1} 属性。", + "This gets the minimum width of a node and stores it in a local variable.":"这会获取节点的最小宽度并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_padding.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_padding.json new file mode 100644 index 000000000..5eda4c551 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_padding.json @@ -0,0 +1,7 @@ +{ + "See: {}Padding{} / {}{}flexpanel_node_style_set_padding{}{}":"请参阅:{} 内边距 {}/{}{}flexpanel_node_style_set_padding{}{}", + "The edge to get the padding for.":"获取填充的边缘。", + "The node to read.":"要读取的节点。", + "This function returns the padding for the given edge(s) of a {}{}Flex Panel Node{}{}.":"此函数返回 {}{}Flex Panel 节点 {}{} 的给定边缘的填充。", + "This gets the general padding of a node and stores it in a local variable.":"这获取节点的一般填充并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_position.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_position.json new file mode 100644 index 000000000..d9ab3bd28 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_position.json @@ -0,0 +1,7 @@ +{ + "See: {}Insets{} / {}{}flexpanel_node_style_set_position{}{}":"请参阅:{} 嵌入 {}/{}{}flexpanel_node_style_set_position{}{}", + "The edge to get the inset for.":"获取嵌入的边缘。", + "The node to read.":"要读取的节点。", + "This function returns the inset position for the given edge of a {}{}Flex Panel Node{}{}.":"此函数返回 {}{}Flex Panel 节点 {}{} 给定边缘的插入位置。", + "This gets the left inset position of a node and stores it in a local variable.":"这获取节点的左插入位置并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_position_type.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_position_type.json new file mode 100644 index 000000000..d3fcd0746 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_position_type.json @@ -0,0 +1,5 @@ +{ + "The node to read.":"要读取的节点。", + "This function returns the {}position{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}position{1} 属性。", + "This gets the position type of a node and stores it in a local variable.":"这获取节点的位置类型并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_width.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_width.json new file mode 100644 index 000000000..59bb105b9 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_get_width.json @@ -0,0 +1,6 @@ +{ + "See: {}Width and Height{} / {}{}flexpanel_node_style_set_width{}{}":"请参阅:{} 宽度和高度 {}/{}{}flexpanel_node_style_set_width{}{}", + "The node to read.":"要读取的节点。", + "This function returns the {}width{} property of the given {}{}Flex Panel Node{}{}.":"此函数返回给定 {}{}Flex Panel 节点 {}{} 的 {0}width{1} 属性。", + "This gets the width of a node and stores it in a local variable.":"这获取节点的宽度并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_align_content.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_align_content.json new file mode 100644 index 000000000..c2fc8a2ac --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_align_content.json @@ -0,0 +1,7 @@ +{ + "See: {}Align Content{}":"请参阅:{} 对齐内容 {}", + "The alignment to use":"使用的对齐方式", + "The node to modify":"要修改的节点", + "This function sets the {}alignContent{} property of the given {}{}Flex Panel Node{}{}. You can pass a {}{}Flex Panel Justify Content Constant{}{}.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}alignContent{1} 属性。您可以传递 {}{}Flex Panel 对齐内容常量 {}{}。", + "This sets the align content of a node to space-between.":"这将节点的对齐内容设置为空格。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_align_items.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_align_items.json new file mode 100644 index 000000000..10bd906da --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_align_items.json @@ -0,0 +1,7 @@ +{ + "See: {}Align Items{}":"请参阅:{} 对齐项目 {}", + "The alignment to use":"使用的对齐方式", + "The node to modify":"要修改的节点", + "This function sets the {}alignItems{} property of the given {}{}Flex Panel Node{}{}. It can be one of the following enum members:":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}alignItems{1} 属性。它可以是以下枚举成员之一:", + "This sets the align items of a node to center.":"这将节点的对齐项目设置为居中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_align_self.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_align_self.json new file mode 100644 index 000000000..f607efc63 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_align_self.json @@ -0,0 +1,6 @@ +{ + "The alignment to use":"使用的对齐方式", + "The node to modify":"要修改的节点", + "This function sets the {}alignSelf{} property of the given {}{}Flex Panel Node{}{}. You can pass a {}{}Flex Panel Alignment Constant{}{}.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}alignSelf{1} 属性。您可以传递 {}{}Flex 面板对齐常量 {}{}。", + "This sets the align self of a node to center.":"这将节点的对齐自身设置为居中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_aspect_ratio.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_aspect_ratio.json new file mode 100644 index 000000000..2bc9599bb --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_aspect_ratio.json @@ -0,0 +1,7 @@ +{ + "See: {}Aspect Ratio{}":"请参阅:{} 宽高比 {}", + "The aspect ratio":"纵横比", + "The node to modify":"要修改的节点", + "This function sets the {}aspectRatio{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex 面板节点 {}{} 的 {0}aspectRatio{1} 属性。", + "This sets the aspect ratio of a node to 1.":"这会将节点的纵横比设置为 1。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_border.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_border.json new file mode 100644 index 000000000..8e21ab59a --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_border.json @@ -0,0 +1,8 @@ +{ + "See: {}Border{}":"请参阅:{} 边框 {}", + "The edge to set the border for":"要设置边框的边缘", + "The node to modify":"要修改的节点", + "The size of the border":"边框的大小", + "This function sets the border for the given edge(s) of a {}{}Flex Panel Node{}{}.":"此函数设置 {}{}Flex Panel 节点 {}{} 的给定边缘的边框。", + "This sets the border of a node for all its edges to 10px.":"这会将节点所有边的边框设置为 10px。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_direction.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_direction.json new file mode 100644 index 000000000..39aa6e9a7 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_direction.json @@ -0,0 +1,8 @@ +{ + "Inherit layout direction from parent":"从父级继承布局方向", + "See: {}Layout Direction{}":"请参阅:{} 布局方向 {}", + "The layout direction to use":"使用的布局方向", + "The node to modify":"要修改的节点", + "This function sets the {}direction{} property of the given {}{}Flex Panel Node{}{}. It can be one of the following enum members:":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}direction{1} 属性。它可以是以下枚举成员之一:", + "This sets the layout direction of a node to right-to-left.":"这将节点的布局方向设置为从右到左。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_display.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_display.json new file mode 100644 index 000000000..d03b24574 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_display.json @@ -0,0 +1,6 @@ +{ + "The display type to use":"使用的显示类型", + "The node to modify":"要修改的节点", + "This function sets the {}display{} property of the given {}{}Flex Panel Node{}{}. It can be one of the following enum members:":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}display{1} 属性。它可以是以下枚举成员之一:", + "This sets the display mode of a node to none, effectively disabling it.":"这会将节点的显示模式设置为无,从而有效地禁用它。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex.json new file mode 100644 index 000000000..b74ba41ee --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex.json @@ -0,0 +1,7 @@ +{ + "See: {}Flex{}":"请参阅:{}柔性{}", + "The flex value to use":"使用的柔性值", + "The node to modify":"要修改的节点", + "This function sets the {}flex{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex 面板节点 {}{} 的 {0}flex{1} 属性。", + "This sets the flex value of a node to -1, acting as the flex shrink value being set to 1.":"这会将节点的 Flex 值设置为 -1,相当于将 Flex 收缩值设置为 1。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_basis.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_basis.json new file mode 100644 index 000000000..318f24503 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_basis.json @@ -0,0 +1,7 @@ +{ + "See: {}Flex Basis{}":"请参阅:{} 柔性基础 {}", + "The node to modify":"要修改的节点", + "The unit of the value":"数值单位", + "The value to set":"要设置的值", + "This function sets the {}flexBasis{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}flexBasis{1} 属性。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_direction.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_direction.json new file mode 100644 index 000000000..bfd439325 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_direction.json @@ -0,0 +1,7 @@ +{ + "See: {}Flex Direction{}":"请参阅:{}柔性方向{}", + "The flex direction to set":"要设置的柔性方向", + "The node to modify":"要修改的节点", + "This function sets the {}flexDirection{} property of the given {}{}Flex Panel Node{}{}. It can be one of the following enum members:":"此函数设置给定 {}{}Flex 面板节点 {}{} 的 {0}flexDirection{1} 属性。它可以是以下枚举成员之一:", + "This sets the flex direction of a node to column.":"这将节点的柔性方向设置为列。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_grow.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_grow.json new file mode 100644 index 000000000..545a2c11e --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_grow.json @@ -0,0 +1,7 @@ +{ + "See: {}Flex Grow{}":"请参阅:{}柔性扩大{}", + "The grow value":"扩大值", + "The node to modify":"要修改的节点", + "This function sets the {}flexGrow{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex 面板节点 {}{} 的 {0}flexGrow{1} 属性。", + "This sets the flex grow value of a node to 1.":"这会将节点的 Flex Growth 值设置为 1。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_shrink.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_shrink.json new file mode 100644 index 000000000..fa5c2a8d8 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_shrink.json @@ -0,0 +1,7 @@ +{ + "See: {}Flex Shrink{}":"请参阅:{}柔性收缩 {}", + "The flex shrink value":"柔性收缩值", + "The node to modify":"要修改的节点", + "This function sets the {}flexShrink{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex 面板节点 {}{} 的 {0}flexShrink{1} 属性。", + "This sets the flex shrink value of a node to 1.":"这会将节点的 Flex Shrink 值设置为 1。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_wrap.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_wrap.json new file mode 100644 index 000000000..c7876dcb0 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_flex_wrap.json @@ -0,0 +1,7 @@ +{ + "See: {}Flex Wrap{}":"请参阅:{}柔性换行{}", + "The node to modify":"要修改的节点", + "The wrap mode to use":"使用的换行模式", + "This enables wrapping for a node.":"这使得能够对节点进行包装。", + "This function sets the {}flexWrap{} property of the given {}{}Flex Panel Node{}{}. It can be one of the following enum members:":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}flexWrap{1} 属性。它可以是以下枚举成员之一:" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_gap.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_gap.json new file mode 100644 index 000000000..5b0d46420 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_gap.json @@ -0,0 +1,8 @@ +{ + "See: {}Gap{}":"请参阅:{} 间距 {}", + "The gutter size":"设置的大小", + "The gutter to set":"要设置的间距", + "The node to modify":"要修改的节点", + "This function sets the gap size of the given {}{}Flex Panel Node{}{}. You must supply the gutter where the gap is applied:":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的间隙大小。您必须提供应用间隙的装订线:", + "This sets the gap of a node for all gutters to 10px.":"这会将所有节点的间距设置为 10px。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_height.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_height.json new file mode 100644 index 000000000..39cef7d4e --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_height.json @@ -0,0 +1,8 @@ +{ + "See: {}Width and Height{}":"请参阅:{} 宽度和高度 {}", + "The height to set":"要设置的高度", + "The node to modify":"要修改的节点", + "The unit to use for the height":"用于高度的单位", + "This function sets the {}height{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}height{1} 属性。", + "This sets the height of a node to 100%.":"这会将节点的高度设置为 100%。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_justify_content.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_justify_content.json new file mode 100644 index 000000000..5b92d27b3 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_justify_content.json @@ -0,0 +1,7 @@ +{ + "See: {}Justify Content{}":"请参阅:{} 主轴对齐 {}", + "The justification to use":"设置的主轴对齐", + "The node to modify":"要修改的节点", + "This function sets the {}justifyContent{} property of the given {}{}Flex Panel Node{}{}. It can be one of the following enum members:":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}justifyContent{1} 属性。它可以是以下枚举成员之一:", + "This sets the justify content of a node to space-between.":"这将节点的对齐内容设置为space-between。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_margin.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_margin.json new file mode 100644 index 000000000..fe9e18d48 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_margin.json @@ -0,0 +1,8 @@ +{ + "See: {}Margin{}":"请参阅:{} 边距 {}", + "The edge to set the margin of":"设置边距的边缘", + "The node to modify":"要修改的节点", + "The size of the margin":"边距的大小", + "This function sets the margin for the given edge(s) of a {}{}Flex Panel Node{}{}.":"此函数设置 {}{}Flex Panel 节点 {}{} 的给定边缘的边距。", + "This sets the margin of a node for all its edges to 10px.":"这会将节点所有边的边距设置为 10px。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_max_height.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_max_height.json new file mode 100644 index 000000000..3b9069e8f --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_max_height.json @@ -0,0 +1,8 @@ +{ + "See: {}Min/Max Width and Height{}":"请参阅:{} 最小 / 最大宽度和高度 {}", + "The node to modify":"要修改的节点", + "The unit of the value":"数值单位", + "The value to use":"设置的值", + "This function sets the {}maxHeight{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}maxHeight{1} 属性。", + "This sets the maximum height of a node to 300px.":"这将节点的最大高度设置为 300px。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_max_width.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_max_width.json new file mode 100644 index 000000000..bc9225238 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_max_width.json @@ -0,0 +1,7 @@ +{ + "See: {}Min/Max Width and Height{}":"请参阅:{} 最小 / 最大宽度和高度 {}", + "The node to modify":"要修改的节点", + "The unit of the value":"数值单位", + "The value to use":"设置的值", + "This function sets the {}maxWidth{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}maxWidth{1} 属性。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_min_height.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_min_height.json new file mode 100644 index 000000000..61c83b3d3 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_min_height.json @@ -0,0 +1,8 @@ +{ + "See: {}Min/Max Width and Height{}":"请参阅:{} 最小 / 最大宽度和高度 {}", + "The node to modify":"要修改的节点", + "The unit of the value":"数值单位", + "The value to use":"设置的值", + "This function sets the {}minHeight{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}minHeight{1} 属性。", + "This sets the minimum height of a node to 60px.":"这将节点的最小高度设置为 60px。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_min_width.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_min_width.json new file mode 100644 index 000000000..418c88485 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_min_width.json @@ -0,0 +1,8 @@ +{ + "See: {}Min/Max Width and Height{}":"请参阅:{} 最小 / 最大宽度和高度 {}", + "The node to modify":"要修改的节点", + "The unit of the value":"数值单位", + "The value to use":"设置的值", + "This function sets the {}minWidth{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}minWidth{1} 属性。", + "This sets the minimum width of a node to 120px.":"这将节点的最小宽度设置为 120px。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_padding.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_padding.json new file mode 100644 index 000000000..c5a1826e8 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_padding.json @@ -0,0 +1,8 @@ +{ + "See: {}Padding{}":"请参阅:{} 填充 {}", + "The edge to set the padding for":"设置填充的边缘", + "The node to modify":"要修改的节点", + "The size of the padding":"填充尺寸", + "This function sets the padding for the given edge(s) of a {}{}Flex Panel Node{}{}. You can pass one of the following enum members for the edge:":"此函数设置 {}{}Flex Panel 节点 {}{} 的给定边缘的填充。您可以为边缘传递以下枚举成员之一:", + "This sets the padding of a node for all its edges to 10px.":"这会将节点所有边缘的填充设置为 10px。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_position.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_position.json new file mode 100644 index 000000000..83820bace --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_position.json @@ -0,0 +1,9 @@ +{ + "See: {}Insets{}":"请参阅:{} 嵌入 {}", + "The edge to set the position for":"要设置位置的边缘", + "The node to modify":"要修改的节点", + "The unit of the value":"数值单位", + "The value to use":"设置的值", + "This function sets an inset position of the given {}{}Flex Panel Node{}{}. You must specify the edge to set the position for, the unit of the value (whether it\u0027s pixels or a percentage) and the value itself.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的插入位置。您必须指定要设置位置的边缘、值的单位 (无论是像素还是百分比) 以及值本身。", + "This sets a node\u0027s position type to absolute, and then sets the left position to 20px and top position to 40px.":"这会将节点的位置类型设置为绝对,然后将左侧位置设置为 20px,顶部位置设置为 40px。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_position_type.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_position_type.json new file mode 100644 index 000000000..6b0417bbd --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_position_type.json @@ -0,0 +1,7 @@ +{ + "See: {}Position Type{}":"请参阅:{} 属性类型 {}", + "The node to modify":"要修改的节点", + "The position type to set":"要设置的位置类型", + "This function sets the {}position{} property of the given {}{}Flex Panel Node{}{}. It can be one of the following enum members:":"此函数设置给定 {}{}Flex 面板节点 {}{} 的 {0}position{1} 属性。它可以是以下枚举成员之一:", + "This sets a node\u0027s position type to absolute, and then sets the left position to 20px and top position to 40px.":"这会将节点的位置类型设置为绝对,然后将左侧位置设置为 20px,顶部位置设置为 40px。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_width.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_width.json new file mode 100644 index 000000000..2084b5b6e --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/flexpanel_node_style_set_width.json @@ -0,0 +1,8 @@ +{ + "See: {}Width and Height{}":"请参阅:{} 宽度和高度 {}", + "The node to modify":"要修改的节点", + "The unit to use for the width":"用于宽度的单位", + "The width to set":"要设置的宽度", + "This function sets the {}width{} property of the given {}{}Flex Panel Node{}{}.":"此函数设置给定 {}{}Flex Panel 节点 {}{} 的 {0}width{1} 属性。", + "This sets the width of a node to 100%.":"这会将节点的宽度设置为 100%。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/section_index.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/section_index.json new file mode 100644 index 000000000..84bae105f --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/Styling_Functions/section_index.json @@ -0,0 +1,13 @@ +{ + "Getter functions for such properties, such as {}{}flexpanel_node_style_get_width{}{}, will return a struct with two members:":"此类属性的获取函数 (例如 {}{}flexpanel_node_style_get_width{}{}) 将返回一个包含两个成员的结构体:", + "Getters":"获取", + "Interprets the value as a percentage":"将值解释为百分比", + "Interprets the value as number of pixels":"将值解释为像素数", + "Setters":"设置", + "The unit of the value, one of the enum members in the table above":"值的单位,上表中的枚举成员之一", + "The value itself":"值本身", + "There are some properties that can take either an absolute pixel value or a percentage value. In a setter function, like {}{}flexpanel_node_style_set_width{}{}, you can specify the unit along with the value, using one of the following enum members:":"有些属性可以采用绝对像素值或百分比值。在设置函数 (例如 {}{}flexpanel_node_style_set_width{}{}) 中,您可以使用以下枚举成员之一指定单位和值:", + "This page lists all the styling functions provided for {}Flex Panel{}s. For general information on all styling properties, see {}Flex Panel Struct Members{}.":"本页列出了为 {}Flex Panel{} 提供的所有样式功能。有关所有样式属性的一般信息,请参阅 {}Flex Panel 结构成员 {}。", + "Units":"单位(Units)", + "Uses automatic sizing for properties that support it":"对支持它的属性使用自动调整大小" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_calculate_layout.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_calculate_layout.json new file mode 100644 index 000000000..d3c491ac6 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_calculate_layout.json @@ -0,0 +1,13 @@ +{ + "It is required that you run this function at least once before using the layout positions of a node, otherwise all positions for the node (and its child nodes) will be 0. You may run this function again for re-calculating layouts in case of a resolution change.":"在使用节点的布局位置之前,需要至少运行一次该函数,否则该节点 (及其子节点) 的所有位置都将为 0。如果出现以下情况,您可以再次运行该函数来重新计算布局分辨率改变。", + "The direction to use for all nodes":"用于所有节点的方向", + "The function takes a {}width{} and a {}height{} where the root node is \"placed\" for layout calculations. For example, if the root node has a {}width{} of {}\"100%\"{}, and the width you pass to this function is {}560{}, then the width of that root node canvas becomes 560 pixels.":"该函数采用根节点\"放置\"位置处的{}width{}和{}height{}以进行布局计算。例如,如果根节点的{}width{}为{}\"100%\"{},并且您传递给此函数的宽度为{}560{},则该根节点画布的宽度将变为560像素。", + "The height that the root node is calculated against":"计算根节点的高度", + "The node for which calculations are performed":"进行计算的节点", + "The width or height can be {}{}{}undefined{}{}{}, in which case it will extend indefinitely.":"宽度或高度可以是 {}{}{}undefined{}{}{},在这种情况下,它将无限期地延伸。", + "The width that the root node is calculated against":"计算根节点的宽度", + "This calculates the layout for the node {}n_root{} within the room dimensions, using a left-to-right direction.":"这将使用从左到右的方向计算节点 {}n_root{} 在房间尺寸内的布局。", + "This function calculates the layout data for the given node and all of its children. The calculated layouts are returned with {}{}flexpanel_node_layout_get_position{}{}.":"此函数计算给定节点及其所有子节点的布局数据。计算出的布局通过 {}{}flexpanel_node_layout_get_position{}{} 返回。", + "You can see these dimensions as the final resolution of the canvas where your layout is active, e.g. when making a full-screen interface, these dimensions would be equal to your game window\u0027s size, or for an interface that is housed inside a small window within your game, they would be the dimensions of that window.":"您可以将这些尺寸视为布局处于活动状态的画布的最终分辨率,例如当制作全屏界面时,这些尺寸将等于游戏窗口的尺寸,或者对于位于游戏内小窗口内的界面,它们将是该窗口的尺寸。", + "You must choose whether the {}layout direction{} is left-to-right or right-to-left by passing a {}{}Flex Panel Layout Direction Constant{}{}.":"您必须通过传递 {}{}Flex 面板布局方向常量 {}{} 来选择 {} 布局方向 {} 是从左到右还是从右到左。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_create_node.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_create_node.json new file mode 100644 index 000000000..c925222cc --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_create_node.json @@ -0,0 +1,9 @@ +{ + "The returned node can be {}inserted into another node{} as a child.":"返回的节点可以作为子节点 {} 插入另一个节点 {}。", + "This creates a node using a struct. That struct contains information on the properties of the root node and all of its nested children.":"这将使用结构创建一个节点。该结构包含有关根节点及其所有嵌套子节点的属性的信息。", + "This creates an empty node. You can later {}set properties{} on this and {}insert other nodes{} as children.":"这将创建一个空节点。您稍后可以为此 {} 设置属性 {} 并 {} 插入其他节点 {} 作为子节点。", + "This creates the same nodes as before, however this uses a JSON {}multi-line string{} instead of a struct.":"这会创建与之前相同的节点,但使用 JSON{} 多行字符串 {} 而不是结构体。", + "This function creates a new {}Flex Panel{} node.":"此函数创建一个新的 {}Flex Panel{} 节点。", + "You can optionally pass either a JSON string or a struct containing the node\u0027s properties, which are {}described here{}. These properties can also be set later using other {}Flex Panel Functions{}.":"您可以选择传递 JSON 字符串或包含节点属性的结构,{} 此处进行了描述 {}。稍后也可以使用其他 {}Flex 面板函数 {} 设置这些属性。", + "{}{}OPTIONAL{}{} Struct with node information or string containing JSON data, members described {}on this page{}":"{}{} 可选{}{} 具有节点信息或包含 JSON 数据的字符串的结构,{} 此页面 {} 中描述的成员" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_delete_node.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_delete_node.json new file mode 100644 index 000000000..7c4ef7c85 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_delete_node.json @@ -0,0 +1,6 @@ +{ + "The node to delete":"要删除的节点", + "This deletes the node {}n_root{} and all of its children.":"这将删除节点 {}n_root{} 及其所有子节点。", + "This function deletes the given {}{}Flex Panel Node{}{}. You can choose whether it should also delete all of its child nodes, which it won\u0027t do by default.":"此函数删除给定的 {}{}Flex Panel 节点 {}{}。您可以选择是否也删除其所有子节点,默认情况下不会这样做。", + "{}{}OPTIONAL{}{} Whether to delete all child nodes ({}true{}) or not ({}false{}, default)":"{}{} 可选{}{} 是否删除所有子节点 ({}true{}) 或不删除所有子节点 ({}false{},默认值)" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_child.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_child.json new file mode 100644 index 000000000..a47f29ae9 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_child.json @@ -0,0 +1,12 @@ +{ + "Either the index of the node or its name":"节点的索引或其名称", + "Finally, the function is run for the root node, which will then be recursively executed for all of its child nodes as well.":"最后,该函数针对根节点运行,然后也将针对其所有子节点递归执行。", + "It then iterates through each child of the node and runs the same function for each child.":"然后,它迭代该节点的每个子节点,并为每个子节点运行相同的函数。", + "The function accepts either of two kinds of values, which is used to look for the child:":"该函数接受两种值之一,用于查找子项:", + "The function will returned {}{}{}undefined{}{}{} if the child was not found (e.g. the index was out of range or name was not found).":"如果未找到子项 (例如索引超出范围或未找到名称),该函数将返回 {}{}{}undefined{}{}{}。", + "The index of the child node, as passed into {}{}flexpanel_node_insert_child{}{} or a value from {}0{} to the value of {}{}{}flexpanel_node_get_num_children{}{} - 1{}":"子节点的索引,传递到 {}{}flexpanel_node_insert_child{}{} 或从 {}0{} 到 {}{}{}flexpanel_node_get_num_children{}{}- 1{} 的值", + "The name of the child node, which is originally set either through the {}name{} property in the {}initial struct{} or through {}{}flexpanel_node_set_name{}{}. This search is done recursively through all child nodes and the first matching node is returned.":"子节点的名称,最初通过 {} 初始结构 {} 中的 {0}name{1} 属性或通过 {}{}flexpanel_node_set_name{}{} 设置。此搜索通过所有子节点递归完成,并返回第一个匹配节点。", + "The parent node from which the child will be retrieved":"将从中检索子节点的父节点", + "This function looks for a child node in the given parent node and returns the child.":"该函数在给定的父节点中查找子节点并返回子节点。", + "This function takes a node and a depth. It then gets the absolute positional data for the node and creates an {}{}Object Instance{}{} at the node\u0027s calculated position, giving the instance the node\u0027s name, width and height.":"该函数需要一个节点和一个深度。然后,它获取节点的绝对位置数据,并在节点的计算位置创建一个 {}{} 对象实例 {}{},并为该实例提供节点的名称、宽度和高度。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_child_hash.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_child_hash.json new file mode 100644 index 000000000..571542db3 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_child_hash.json @@ -0,0 +1,6 @@ +{ + "In the Create event, this gets the hash of the string {}\"weap\"{} and stores it in a variable. At a later point in time, it uses that hash to get a child node named {}\"weap\"{} from the node {}n_root{}.":"在 Create 事件中,它获取字符串 {}\"weap\"{} 的哈希值并将其存储在变量中。在稍后的某个时间点,它使用该哈希从节点 {}n_root{} 获取名为 {}\"weap\"{} 的子节点。", + "The name of the child or a {}hash{} of its name":"子项的名称或其名称的 {} 哈希 {}", + "The parent node from which the child will be retrieved":"将从中检索子节点的父节点", + "This function is the same as {}{}flexpanel_node_get_child{}{}, but it takes either the name of the child to look for or a {}hash{} of its name.":"此函数与 {}{}flexpanel_node_get_child{}{} 相同,但它需要查找子项的名称或其名称的 {} 哈希 {}。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_data.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_data.json new file mode 100644 index 000000000..34571c1da --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_data.json @@ -0,0 +1,8 @@ +{ + "If no {}data{} member was set when creating the node, it will have been initialised with an empty data struct, and the function will return that so you can populate it with members.":"如果在创建节点时未设置 {}data{} 成员,则该节点将使用空数据结构进行初始化,并且该函数将返回该数据结构,以便您可以使用成员填充它。", + "If the node was given a {}data{} member in its initial struct or JSON when {}it was created{}, this will return that.":"如果节点在 {} 创建 {} 时在其初始结构或 JSON 中被赋予了 {0}data{1} 成员,则这将返回该成员。", + "The node to get the data struct of":"获取数据结构的节点", + "The returned struct is {}not{} a copy of the node\u0027s data struct and is a reference to that struct directly, so modifying the struct will affect the data returned in future calls to this function on the same node.":"返回的结构 {} 不是 {} 节点数据结构的副本,而是直接对该结构的引用,因此修改该结构将影响将来在同一节点上调用此函数时返回的数据。", + "This function returns the data struct of a node.":"该函数返回节点的数据结构。", + "This gets the positional data and data struct of the node {}_node{}. Then it checks if it has an {}inst{} variable. If not, it creates an instance and stores that in the data struct as {}inst{}. If the variable already exists, it updates the instance stored in {}inst{}.":"这将获取节点 {}_node{} 的位置数据和数据结构。然后它检查是否有 {}inst{} 变量。如果没有,它会创建一个实例并将其存储在数据结构中作为 {}inst{}。如果该变量已存在,它将更新存储在 {}inst{} 中的实例。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_name.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_name.json new file mode 100644 index 000000000..a79ce4fc1 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_name.json @@ -0,0 +1,6 @@ +{ + "The node to get the name of":"要获取名称的节点", + "This function returns the name set for the given node. Will return {}{}{}undefined{}{}{} if no name was set.":"该函数返回给定节点的名称集。如果未设置名称,将返回 {}{}{}undefined{}{}{}。", + "This gets the name of the node {}_node{} and stores it in a local variable.":"这会获取节点 {}_node{} 的名称并将其存储在局部变量中。", + "This is originally set either through the {}name{} property in the {}initial struct{} or through {}{}flexpanel_node_set_name{}{}.":"它最初是通过 {2} 初始结构 {3} 中的 {}name{} 属性或通过 {}{}flexpanel_node_set_name{}{} 设置的。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_num_children.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_num_children.json new file mode 100644 index 000000000..ea79bb305 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_num_children.json @@ -0,0 +1,8 @@ +{ + "Finally, the function is run for the root node, which will then be recursively executed for all of its child nodes as well.":"最后,该函数针对根节点运行,然后也将针对其所有子节点递归执行。", + "It then iterates through each child of the node and runs the same function for each child.":"然后,它迭代该节点的每个子节点,并为每个子节点运行相同的函数。", + "The parent node":"父节点", + "This function returns the number of children in the given node.":"该函数返回给定节点中的子节点数。", + "This function takes a node and a depth. It then gets the absolute positional data for the node and creates an {}{}Object Instance{}{} at the node\u0027s calculated position, giving the instance the node\u0027s name, width and height.":"该函数需要一个节点和一个深度。然后,它获取节点的绝对位置数据,并在节点的计算位置创建一个 {}{} 对象实例 {}{},并为该实例提供节点的名称、宽度和高度。", + "You can use this value to iterate from {}0{} to the returned {}value - 1{} and retrieve each child node by passing the index value into {}{}flexpanel_node_get_child{}{}.":"您可以使用此值从 {}0{} 迭代到返回的 {} 值-1{},并通过将索引值传递到 {}{}flexpanel_node_get_child{}{} 来检索每个子节点。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_parent.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_parent.json new file mode 100644 index 000000000..e3cfe096c --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_parent.json @@ -0,0 +1,5 @@ +{ + "The node to get the parent of":"要获取其父节点的节点", + "This function returns the parent node of the given node, or {}{}{}undefined{}{}{} if it has no parent.":"此函数返回给定节点的父节点,如果没有父节点,则返回 {}{}{}undefined{}{}{}。", + "This gets the parent of the node {}_node{} and stores it in a local variable.":"这会获取节点 {}_node{} 的父节点并将其存储在局部变量中。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_struct.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_struct.json new file mode 100644 index 000000000..4508325ba --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_get_struct.json @@ -0,0 +1,6 @@ +{ + "The node to get the struct for":"要获取其结构的节点", + "This function returns all the properties of the given node and its children as a struct.":"该函数以结构体的形式返回给定节点及其子节点的所有属性。", + "This gets the struct for the node {}_node{} and creates a new node using the same data.":"这将获取节点 {}_node{} 的结构并使用相同的数据创建一个新节点。", + "This struct follows the {}structured described here{} and can be passed into {}{}flexpanel_create_node{}{} to create a new layout tree using the same properties.":"该结构遵循 {} 此处描述的结构 {},并且可以传递到 {}{}flexpanel_create_node{}{} 以使用相同的属性创建新的布局树。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_insert_child.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_insert_child.json new file mode 100644 index 000000000..654e95982 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_insert_child.json @@ -0,0 +1,9 @@ +{ + "The container to insert into, i.e. the parent":"要插入的容器,即父容器", + "The container to insert, i.e. the child":"要插入的容器,即子容器", + "The index of the child within the parent, e.g. 0, 1, 2, etc.":"父级中子级的索引,例如 0、1、2 等", + "This creates a root node and then runs a {}repeat{} loop to insert several child nodes into the root node.":"这将创建一个根节点,然后运行 \u200B\u200B{}repeat{} 循环以将多个子节点插入到根节点中。", + "This function inserts the node {}node{} (second argument) into the node {}root{} (first argument) as a child.":"此函数将节点 {}node{}( 第二个参数) 作为子节点插入到节点 {}root{}( 第一个参数) 中。", + "You can use this index value to later retrieve the child node from the parent using {}{}flexpanel_node_get_child{}{}.":"您可以使用此索引值稍后使用 {}{}flexpanel_node_get_child{}{} 从父节点检索子节点。", + "You must provide its index, which controls where the child is placed in the parent\u0027s hierarchy, which will then affect its layout position (unless the child\u0027s {}Position Type{} is absolute). The index must start at 0 and must not be negative or greater than the number of children already in the parent node.":"您必须提供其索引,该索引控制子级在父级层次结构中的放置位置,从而影响其布局位置 (除非子级的 {} 位置类型 {} 是绝对的)。索引必须从 0 开始,并且不能为负数或大于父节点中已有的子节点数。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_layout_get_position.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_layout_get_position.json new file mode 100644 index 000000000..2e3c1667c --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_layout_get_position.json @@ -0,0 +1,27 @@ +{ + "A boolean indicating whether any child nodes have overflown outside of the bounds of the node":"一个布尔值,指示是否有任何子节点溢出到节点边界之外", + "By default, the returned position will be relative to the position of the parent container. You can pass {}false{} to the {}relative{} argument to instead return the absolute position of the node, after applying all parent transformations.":"默认情况下,返回的位置将相对于父容器的位置。您可以将 {}false{} 传递给 {}relative{} 参数,以在应用所有父级转换后返回节点的绝对位置。", + "Finally, the function is run for the root node, which will then be recursively executed for all of its child nodes as well.":"最后,该函数针对根节点运行,然后也将针对其所有子节点递归执行。", + "It then iterates through each child of the node and runs the same function for each child.":"然后,它迭代该节点的每个子节点,并为每个子节点运行相同的函数。", + "The bottom edge\u0027s margin value":"下边缘的边距值", + "The bottom edge\u0027s padding value":"底部边缘的内边距值", + "The calculated X position of the left edge of the node":"计算出的节点左边缘的 X 位置", + "The calculated Y position of the top edge of the node":"计算出的节点顶边的 Y 位置", + "The height of the node":"节点的高度", + "The layout direction used for this node":"该节点使用的布局方向", + "The left edge\u0027s margin value":"左边缘的边距值", + "The left edge\u0027s padding value":"左边缘的内边距值", + "The node to get the layout position of":"获取布局位置的节点", + "The position of the bottom edge of the node, relative to the bottom edge of its parent container":"节点下边缘相对于其父容器下边缘的位置", + "The position of the right edge of the node, relative to the right edge of its parent container":"节点右边缘相对于其父容器右边缘的位置", + "The returned struct will contain the following members:":"返回的结构将包含以下成员:", + "The right edge\u0027s margin value":"右边缘的边距值", + "The right edge\u0027s padding value":"右边缘的内边距值", + "The top edge\u0027s margin value":"上边缘的边距值", + "The top edge\u0027s padding value":"上边缘的内边距值", + "The width of the node":"节点的宽度", + "The {}left{}, {}top{}, {}width{} and {}height{} members are the ones that are most useful for making use of the calculated layouts (e.g. creating an object instance, drawing a rectangle, etc.).":"{}left{}、{}top{}、{}width{} 和 {}height{} 成员对于利用计算布局 (例如创建对象实例、绘制矩形、 ETC。)。", + "This function returns a struct with the layout information of the given node. You must have called {}{}flexpanel_calculate_layout{}{} at least once on the node before calling this, otherwise all returned data will be 0.":"该函数返回一个包含给定节点的布局信息的结构。调用此函数之前,您必须在节点上至少调用一次 {}{}flexpanel_calculate_layout{}{},否则所有返回的数据将为 0。", + "This function takes a node and a depth. It then gets the absolute positional data for the node and creates an {}{}Object Instance{}{} at the node\u0027s calculated position, giving the instance the node\u0027s name, width and height.":"该函数需要一个节点和一个深度。然后,它获取节点的绝对位置数据,并在节点的计算位置创建一个 {}{} 对象实例 {}{},并为该实例提供节点的名称、宽度和高度。", + "{}{}OPTIONAL{}{} Whether to return relative positions ({}true{}, default) or absolute positions ({}false{})":"{}{} 可选{}{} 是否返回相对位置 ({}true{},默认值) 或绝对位置 ({}false{})" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_remove_all_children.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_remove_all_children.json new file mode 100644 index 000000000..de81986e5 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_remove_all_children.json @@ -0,0 +1,6 @@ +{ + "Read {}{}flexpanel_node_remove_child{}{} for information on how it affects each child node.":"请阅读 {}{}flexpanel_node_remove_child{}{},了解它如何影响每个子节点的信息。", + "The node from which all children will be removed":"将删除所有子节点的节点", + "This function removes all direct children from the given node (but doesn\u0027t {}delete{} them).":"此函数会从给定节点中删除所有直接子节点 (但不会 {} 删除 {} 它们)。", + "This removes all children from the node {}n_root{}.":"这将从节点 {}n_root{} 中删除所有子节点。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_remove_child.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_remove_child.json new file mode 100644 index 000000000..719e5dbb1 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_remove_child.json @@ -0,0 +1,7 @@ +{ + "After this, the child node will no longer be included in the layout tree where it was present, and effectively becomes the \"root\" of its own tree. You must either use this detached node on its own for {}calculations{}, insert it somewhere else in the same tree where it was, or place it in an entirely different tree.":"此后,子节点将不再包含在其所在的布局树中,并有效地成为其自己的树的 \" 根\"。您必须单独使用此分离节点进行 {} 计算 {},将其插入同一树中的其他位置,或者将其放置在完全不同的树中。", + "The child node to remove from the parent":"要从父节点中删除的子节点", + "The parent node":"父节点", + "This function removes a node from its parent\u0027s child list (but doesn\u0027t {}delete{} it).":"此函数从其父级的子级列表中删除节点 (但不会 {} 删除 {})。", + "This gets the first child from the node {}n_root{} and removes it from its parent.":"这会从节点 {}n_root{} 获取第一个子节点,并将其从其父节点中删除。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_set_name.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_set_name.json new file mode 100644 index 000000000..ed2755b3a --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/flexpanel_node_set_name.json @@ -0,0 +1,5 @@ +{ + "The new name":"新名称", + "The node to change the name of":"要更改名称的节点", + "This function sets the name of the given node.":"该函数设置给定节点的名称。" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/section_index.json b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/section_index.json new file mode 100644 index 000000000..3768d70b2 --- /dev/null +++ b/language/zh/www/GameMaker_Language/GML_Reference/Flex_Panels/Function_Reference/section_index.json @@ -0,0 +1,10 @@ +{ + "Basic Properties":"基本属性", + "General Functions":"常规功能", + "Getters":"获取", + "Setters":"设置\n", + "Styling Functions":"样式函数", + "These functions allow you to manage nodes and parent/child relations.":"这些功能允许您管理节点和父 / 子关系。", + "This page lists all the functions provided for {}Flex Panel{}s.":"此页面列出了为 {}Flex Panel{} 提供的所有功能。", + "{}Flex Panel Functions{}":"{}柔性面板函数{}" +} \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Maths_And_Numbers.json b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Maths_And_Numbers.json index a2e03a0a1..1de4d36da 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Maths_And_Numbers.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Maths_And_Numbers.json @@ -1,6 +1,7 @@ { "0 (although any value less than 1 will also evaluate as {}false{})":"0(尽管任何小于1的值也将计算为{} false {})", "1 (although any value equal to or greater than 1 will evaluate as {}true{})":"1(尽管任何等于或大于1的值将计算为{} true {})", + "3.141592653589793280... (the exact value will depend on various factors like the platform being targeted)":"3.141592653589793280...( 确切的值将取决于各种因素,例如目标平台)", "3.141592653589793280etc... (the exact value will depend on various factors like the platform being targeted)":"3.141592653589793280等等(确切的价值将取决于各种因素,如针对的平台)", "Angles And Distance":"角度和距离", "Date And Time":"日期和时间", @@ -8,5 +9,7 @@ "Matrix Functions":"矩阵函数", "Number Functions":"数字函数", "There are a few built in constants that also can be evaluated as real numbers (although you should always check for the constant rather than the value):":"有一些内置的常量也可以计算为实数(尽管你应该总是检查常量而不是值) :", - "{}GameMaker{} contains a large number functions to deal with different areas of mathematics, numbers of all types and the date and time. Most of these functions can be found in the sections listed below:":"{}GameMaker{}包含大量的函数来处理不同的数学领域,所有类型的数字以及日期和时间。这些函数中的大多数可以在下面的小节中找到:" + "There are a few built-in constants that also can be evaluated as real numbers (although you should always check for the constant rather than the value):":"有一些内置常量也可以计算为实数 (尽管您应该始终检查常量而不是值):", + "{}GameMaker{} contains a large number functions to deal with different areas of mathematics, numbers of all types and the date and time. Most of these functions can be found in the sections listed below:":"{}GameMaker{}包含大量的函数来处理不同的数学领域,所有类型的数字以及日期和时间。这些函数中的大多数可以在下面的小节中找到:", + "{}Maths And Numbers{}":"{} 数学和数字 {}" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/Number_Functions.json b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/Number_Functions.json index 06a589b8b..20f422471 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/Number_Functions.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/Number_Functions.json @@ -14,8 +14,10 @@ "These are all functions that will round values in some way, or select a single value from various given values:":"这些函数都将以某种方式舍入值,或者从各种给定值中选择一个值:", "These functions all deal with using random numbers and values:":"这些函数都使用随机数和值:", "This distinction between integers and floats is very important when dealing with cross platform development as the precision of calculations made on a Windows PC is {}not{} the same as the precision of those same calculations when made on a mobile device. This means that you should pay particular attention when making comparisons, for example:":"在处理跨平台开发时,整数和浮点数之间的区别非常重要,因为在Windows PC上进行计算的精度与在移动设备上进行相同计算的精度是不一样的的。这意味着你在进行比较时应该特别注意,例如:", + "This distinction between integers and floats is very important when dealing with cross-platform development as the precision of calculations made on a Windows PC is {}not{} the same as the precision of those same calculations when made on a mobile device. This means that you should pay particular attention when making comparisons, for example:":"在处理跨平台开发时,整数和浮点数之间的区别非常重要,因为在 Windows PC 上进行的计算的精度与在移动设备上进行的相同计算的精度 {} 不同 {}。这意味着您在进行比较时应该特别注意,例如:", "You can also use a special function available in {}GameMaker{} to set the {}epsilon{} value for floating point maths. When a real number is rounded to the nearest floating point number, the epsilon (also know as \"machine epsilon\") forms an upper bound on the relative error, and you can get and set the epsilon value using the following functions:":"您还可以使用{}GameMaker{}中的一个特殊函数来设置浮点数学的{}epsilon(精度){}值。当一个实数四舍五入到最接近的浮点数时,(也称为“机器精度”)形成相对误差的上界,可以使用以下函数获取和设置:", "You can also use a special function available in {}GameMaker{} to set the {}{}{}epsilon{} value for floating point maths. When a real number is rounded to the nearest floating point number, the epsilon (also know as \"machine epsilon\") forms an upper bound on the relative error, and you can get and set the epsilon value using the following functions:":"您还可以使用{}GameMaker{}中的一个特殊函数来设置浮点数学的{}{}{}epsilon(精度){}值。当一个实数四舍五入到最接近的浮点数时,(也称为“机器精度”)形成相对误差的上界,可以使用以下函数获取和设置:", + "You can also use a special function available in {}GameMaker{} to set the {}{}{}epsilon{} value for floating point maths. When a real number is rounded to the nearest floating point number, the epsilon (also know as \"machine epsilon\") forms an upper bound on the relative error, and you can set and get the epsilon value using the following functions:":"您还可以使用 {}GameMaker{} 中提供的特殊函数来设置浮点数学的 {}{}{}epsilon{} 值。当实数四舍五入到最接近的浮点数时,epsilon(也称为 \" 机器 epsilon\") 形成相对误差的上限,您可以使用以下函数设置和获取 epsilon 值:", "{}NOTE{}: For more informaton, see the section on {}Evaluation Order{}.":"{}注{}:要了解更多信息,请参见{}运算顺序{}一节。", "{}NOTE{}: On the {}HTML5{} target, all real numbers are doubles.":"{}注意{} : 在 HTML5{}目标上,所有实数都是双精度浮点数。", "{}Number Functions{}":"{}数字函数{}", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/math_get_epsilon.json b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/math_get_epsilon.json index a3a668d1b..41513dc5f 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/math_get_epsilon.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/math_get_epsilon.json @@ -1,4 +1,7 @@ { + "For more information on epsilon, please see the function {}{}math_set_epsilon{}{}.":"有关 epsilon 的详细信息,请参阅函数 {}{}math_set_epsilon{}{}。", + "The default epsilon value is {}{}0.00001{}{}.":"默认 epsilon 值为 {}{}0.00001{}{}。", + "This function returns the current epsilon value.":"该函数返回当前的 epsilon 值。", "This function will return the current epsilon value for the target platform. For more information on epsilon, please see the function {}{}math_set_epsilon(){}{}.":"此函数将返回目标平台的当前 精度 值。 有关 epsilon 的更多信息,请参阅函数 {}{}math_set_epsilon(){}{}。", "This function will return the current epsilon value. For more information on epsilon, please see the function {}{}math_set_epsilon(){}{}.":"此函数将返回当前的精度值。有关精度的更多信息,请参见函数 {}{}math_set_epsilon(){}{}。", "This will retrieve the current epsilon value and store it in a local variable, which is then checked and a new epsilon set if required.":"这将检索当前的精度值并将其存储在局部变量中,然后检查该变量并在需要时设置新的精度。" diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/math_set_epsilon.json b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/math_set_epsilon.json index e1a758349..606660aef 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/math_set_epsilon.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/math_set_epsilon.json @@ -1,12 +1,18 @@ { "Epsilon is a value used to determine whether two numbers subject to rounding error are close enough to be considered \"equal\". It is useful when dealing with floating point maths as it can reduce the \"rounding errors\" that make certain operations return values that appear incorrect or contrary to what we expect. For example, we may have added a value to the image index of a sprite and expect the result to be a single integer, but due to the nature of floating point maths, the actual final value ends up being something like 5.0000002, so when we have the following check:":"Epsilon(精度) 是一个值,用于确定受舍入误差影响的两个数字是否足够接近以被视为“相等”。 它在处理浮点数学时很有用,因为它可以减少“舍入错误”,这些错误会使某些操作返回看起来不正确或与我们预期相反的值。 例如,我们可能已经在精灵的图像索引中添加了一个值,并期望结果是一个整数,但由于浮点数学的性质,实际最终值最终会是 5.0000002 这样的东西,所以当我们 进行以下检查:", "Floating point calculations may behave differently depending on the platform your game is running on. The default epsilon of {}0.00001{} provides a safe range for rounding errors across different platforms.":"根据运行游戏的平台的不同,浮点计算的行为可能会有所不同。默认的精度为跨平台舍入误差提供了安全的范围 {}0.00001{}。", + "Floating point calculations may behave differently depending on the platform your game is running on. The default epsilon of {}{}0.00001{}{} provides a safe range for rounding errors across different platforms.":"浮点计算的行为可能会有所不同,具体取决于游戏运行的平台。默认 epsilon{}{}0.00001{}{} 为不同平台上的舍入误差提供了安全范围。", + "It is also used by the {}{}sqrt{}{} function.":"{}{}sqrt{}{} 函数也使用它。", "Note that setting an epsilon value of 0 will disable all rounding, and using a value of 1 will give an error.":"请注意,将精度值设置为 0 将禁用所有舍入,而将值设置为 1 将产生错误。", "The code does not behave as expected and returns {}false{}. However, if we set the epsilon value to 0.000001, the {}image_index{} value will be rounded to the nearest real number that is +/- 0.000001 of the original value, making the above comparison return true.":"该代码未按预期运行并返回 {}false{}。 但是,如果我们将 epsilon 值设置为 0.000001,{}image_index{} 值将四舍五入为最接近的实数,即原始值的 +/- 0.000001,从而使上述比较返回 true。", "The code does not behave as expected and returns {}false{}. However, with the epsilon set to 0.00001, the {}image_index{} value is rounded to the nearest real number that is +/- 0.000001 of the original value, making the above comparison return true.":"代码的行为与预期不符,并返回 {}false{}。但是,当精度设置为 0.00001 时,{}image_index{} 值将舍入为最接近的实数,即原始值的 +/-0.000001,从而使上述比较返回 true。", + "The code does not behave as expected and returns {}false{}. However, with the epsilon set to {}{}0.00001{}{}, the {}{}image_index{}{} value is rounded to the nearest real number that is +/- {}0.00001{} of the original value, making the above comparison return {}true{}.":"该代码的行为不符合预期并返回 {}false{}。不过,当 epsilon 设置为 {}{}0.00001{}{} 时,{}{}image_index{}{} 值将舍入为最接近的实数,即原始值的 +/-{}0.00001{},使上述比较返回 {}true{}。", "The epsilon is used to determine whether two numbers subject to rounding errors are close enough to be considered \"equal\". The default epsilon is {}0.00001{}.":"精度用于确定两个受舍入误差影响的数字是否足够接近,从而被视为\"相等\"。默认精度为 {}0.00001{}。", + "The epsilon is used to determine whether two numbers subject to rounding errors are close enough to be considered \"equal\". The default epsilon is {}{}0.00001{}{}.":"epsilon 用于确定两个存在舍入误差的数字是否足够接近以被视为 \" 相等\"。默认 epsilon 为 {}{}0.00001{}{}。", + "The epsilon value will be used for all the following comparison {}Operators{}:":"epsilon 值将用于以下所有比较 {} 运算符 {}:", "The epsilon value will be used for all the following integer {}operators{}:":"精度值将用于以下所有整数{}运算符{}:", "The new epsilon value (from 0 to 0.999999999).":"新的精度值(从 0 到 0.999999999)。", + "This function sets the epsilon value for number comparisons.":"此函数设置数字比较的 epsilon 值。", "This is useful when dealing with floating point maths as it can reduce the \"rounding errors\" that make certain operations return values that appear incorrect or contrary to what we expect. For example, we may have added a value to the image index of a sprite and expect the result to be a single integer (5), but due to the nature of floating point maths, the actual final value ends up being something like 5.000002, so when we have the following check:":"这在处理浮点数学时很有用,因为它可以减少使某些运算返回的值看起来不正确或与我们预期相反的\"舍入误差\"。例如,我们可能已经向精灵的图像索引添加了一个值,并期望结果是一个整数(5),但由于浮点数学的性质,实际的最终值最终类似于 5.000002,因此当我们进行以下检查时:", "This will set the epsilon value for all further floating point operations.":"这将为所有进一步的浮点运算设置精度值。", "{}!= {}: Not equal to":"{}!= {}: 不等于", @@ -14,5 +20,6 @@ "{}>= {}: Greater than or equal to":"{}>= {}: 大于或等于", "{}< {}: Less than":"{}< {}: 小于", "{}<= {}: Less than or equal to":"{}<= {}: 小于或等于", - "{}== {}: Equal to":"{}== {}: 等于" + "{}== {}: Equal to":"{}== {}: 等于", + "{}{}NOTE{}{} Setting an epsilon value of 0 will disable all rounding, and using a value of 1 will give an error.":"{}{} 注意 {}{} 将 epsilon 值设置为 0 将禁用所有舍入,使用值 1 将产生错误。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/sqrt.json b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/sqrt.json index bee25d8dc..bd6fd6cea 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/sqrt.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Maths_And_Numbers/Number_Functions/sqrt.json @@ -1,5 +1,9 @@ { + "If you multiply a number with itself, you get the square of that number, but sometimes you want to do the reverse and get the square root of a number. So to find what number has been multiplied with itself to get any given {}positive{} value we use this function. For example: {}sqrt(9){} will return 3 since 3 * 3 = 9.":"如果将一个数字与其自身相乘,则会得到该数字的平方,但有时您想要执行相反的操作并获得该数字的平方根。因此,为了查找哪个数字与其自身相乘以获得任何给定的 {} 正 {} 值,我们使用此函数。例如:{}sqrt(9){} 将返回 3,因为 3 * 3 = 9。", "If you multiply a number with itself, you get the square of that number, but sometimes you want to do the reverse and get the square root of a number. So to find what number has been multiplied with itself to get any given {}positive{} value we use this function. For example: {}sqrt(9){} will return 3 since 3*3=9.":"如果将一个数与它自身相乘,就会得到该数的平方,但有时你想反其道而行之,得到一个数的平方根。 因此,为了找到哪个数字与自身相乘以获得任何给定的{}正{}值,我们使用此函数。 例如:{}sqrt(9){} 将返回 3,因为 3*3=9。", "The above code will set the variable \"num\" to hold the square root of the value contained in \"exp\".":"上面的代码将设置变量“num”来保存“exp”中包含的值的平方根。", - "The number to get the square root of.":"要获取其平方根的数。" + "The above code will set the variable {}num{} to hold the square root of the value contained in {}val{}.":"上述代码将设置变量 {}num{} 以保存 {}val{} 中包含的值的平方根。", + "The number to get the square root of.":"要获取其平方根的数。", + "This function returns the square root of the given number.":"该函数返回给定数字的平方根。", + "{}{}NOTE{}{} Negative values greater than or equal to negative epsilon are clamped to 0, i.e. they are considered 0. See {}{}math_set_epsilon{}{}.":"{}{} 注意{}{} 大于或等于负 epsilon 的负值被限制为 0,即它们被视为 0。请参阅 {}{}math_set_epsilon{}{}。" } \ No newline at end of file diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Strings/Strings.json b/language/zh/www/GameMaker_Language/GML_Reference/Strings/Strings.json index a78de50a1..3c96ccf3c 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Strings/Strings.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Strings/Strings.json @@ -27,6 +27,7 @@ "It is worth noting that there are certain conventions that you can use when creating strings, mostly concerned with using {}escape characters{}. These are characters that are preceded by a \"{}\\{}\" symbol. So, for example, if you wanted to put quotation marks within a string you would have something like this:":"值得注意的是,在创建字符串时可以使用某些约定,主要涉及使用{}转义字符{}。这些是前面带有“{}\\{}”符号的字符。例如,如果你想在一个字符串中加上引号,你可以这样做:", "Iteration":"重复", "Just using \"{}\\u00e2a{}\" would actually result in the Unicode character \"{}ส{}\" (essentially becoming \"{}\\ue2a{}\").{}{}":"只使用 \"{}\\u00e2a{}\" 实际上会产生 Unicode 字符 \"{}ส{}\"( 实质上变成 \"{}\\ue2a{}\")。", + "Lastly, {}GameMaker{} also provides a convenient way to convert {}structs{} and {}instances{} to a string representation by assigning them a {}toString method{}.":"最后,{}GameMaker{} 还提供了一种便捷的方法,通过为 {} 结构 {} 和 {} 实例 {} 分配一个 {}toString 方法 {},将其转换为字符串表示形式。", "Lastly, {}GameMaker{} also provides a convenient way to convert {}structs{} and {}instances{} to a string representation by assigning them a {} {}.":"最后,{}GameMaker{} 还提供了一种便捷的方法来转换{}结构{}和{}实例{}到字符串表示形式,方法是为它们分配一个{}{}。", "Lastly, {}GameMaker{} also provides a convenient way to convert {}structs{} and {}instances{} to a string representation by assigning them a {}toString() Method{}.":"最后,{}GameMaker{} 还提供了一种便捷的方法来转换{}结构{}和{}实例{}到字符串表示形式,是为它们分配一个 {}toString() 方法{}。", "Manipulating Strings":"操作字符串", diff --git a/language/zh/www/GameMaker_Language/GML_Reference/Strings/string.json b/language/zh/www/GameMaker_Language/GML_Reference/Strings/string.json index e5f053283..382136df2 100644 --- a/language/zh/www/GameMaker_Language/GML_Reference/Strings/string.json +++ b/language/zh/www/GameMaker_Language/GML_Reference/Strings/string.json @@ -9,8 +9,11 @@ "The value to be turned into a string.":"要转换为字符串的值。", "These placeholders will be replaced with the arguments at the positions they refer to, i.e. \"{0}\" will be replaced with the second argument, \"{1}\" will be replaced with the third argument, \"{2}\" will be replaced with the fourth argument, and so on.":"这些占位符将替换为它们所引用位置上的参数,即 \"{0}\" 将替换为第二个参数,\"{1}\" 将替换为第三个参数,\"{2}\" 将替换为第四个参数,依此类推。", "This function creates a new string from a variety of data types.":"此函数用于从各种数据类型创建新字符串。", + "Values of type {}Array{} will be converted to a string of the format {}[element1, element2, element3, element4, element5]{}, i.e. the concatenation of all elements in the array. If any of the elements in the array is a struct or an instance then its {} {} will be called to convert it to a string.":"{}Array{} 类型的值将转换为 {}[element1, element2, element3, element4, element5]{} 格式的字符串,即数组中所有元素的串联。如果数组中的任何元素是结构体或实例,则将调用其 {}{} 将其转换为字符串。", "Values of type {}Array{} will be converted to a string of the format {}[element1, element2, element3, element4, element5]{}, i.e. the concatenation of all elements in the array. If any of the elements in the array is a struct or an instance then its {}toString() Method{} will be called to convert it to a string.":"{}数组{}类型的值将被转换为格式为 {}[Element1,Element2,Element3,Element4,Element5]{} 的字符串,即数组中所有元素的串联。如果数组中的任何元素是结构或实例,则将调用其 {}toString() 方法{} 将其转换为字符串。", + "Values of type {}Struct{} or {}Instance{} will be converted to a string using that struct\u0027s or instance\u0027s {}toString() Method{} if one exists, or converted to a string implicitly.":"{}Struct{} 或 {}Instance{} 类型的值将使用该结构或实例的 {}toString() 方法 {}( 如果存在) 转换为字符串,或者隐式转换为字符串。", "Values of type {}Struct{} or {}Instance{} will be converted to a string using that struct\u0027s or instance\u0027s {}toString() Method{} if one exists, or converted to a string implicitly.":"{}结构{}或{}实例{}类型的值将使用该结构或实例的 {}toString() 方法{} (如果存在)转换为字符串,或者隐式转换为字符串。", + "Values of type {}{}Handle{}{} will be converted to a string that shows the handle info: {}{}\"ref <type> <id>\"{}{}.":"{}{}Handle{}{} 类型的值将转换为显示句柄信息的字符串:{}{}\"ref <type> <id>\"{}{}。", "Values of type {}{}Real{}{} that are an integer will have no decimal places in the string. Values of type {}{}Real{}{} that have a fractional part will have two decimal places in the string. If you need more decimal places in the output string you can use the function {}{}string_format{}{}.":"{}{}Real{}{} 类型为整数的值在字符串中不会有小数位。具有小数部分的 {}{}Real{}{} 类型的值在字符串中有两个小数位。如果在输出字符串中需要更多的小数位,可以使用函数 {}{}string_format{}{}。", "When only one argument is provided to the function, this argument is considered to be a value, which will be converted to a string from its original {}data type{}. When more than one argument is given, the first argument is considered a {}Format String{} and the arguments that follow it are considered the values to insert into the format string.":"当只向函数提供一个参数时,该参数被视为一个值,该值将从其原始{}数据类型{}转换为字符串。当给定多个参数时,第一个参数被视为{}格式字符串{},其后的参数被视为要插入到格式字符串中的值。", "When you pass more than one argument to the {}{}string{}{} function, the first argument will be treated as a {}format string{}. In a format string you can use {}placeholders{} of the form \"{0}\", \"{1}\", \"{2}\", etc.":"当您向{0}{1}string{2}{3}函数传递多个参数时,第一个参数将被视为{}格式字符串{}。在格式字符串中,您可以使用 \"{0}\"、\"{1}\"、\"{2}\" 等形式的{}占位符{}。",