ui.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. /* eslint-disable quote-props */
  2. module.exports = {
  3. classes: {
  4. 'cc': {
  5. 'UIRenderer': {
  6. properties: {
  7. customMaterial: {
  8. displayName: 'Custom Material',
  9. tooltip: 'Use custom material.',
  10. },
  11. color: {
  12. displayName: 'Color',
  13. tooltip: 'Rendering color.',
  14. },
  15. },
  16. },
  17. 'Label': {
  18. properties: {
  19. __extends__: 'classes.cc.UIRenderer.properties',
  20. 'string': {
  21. displayName: 'string',
  22. tooltip: 'The label text.',
  23. },
  24. 'horizontalAlign': {
  25. displayName: 'Horizontal Alignment',
  26. tooltip: 'Horizontal alignment mode.',
  27. tooltip_left: 'Align Left.',
  28. tooltip_right: 'Align Right.',
  29. tooltip_center: 'Align Center.',
  30. },
  31. 'verticalAlign': {
  32. displayName: 'Vertical Alignment',
  33. tooltip: 'Vertical alignment mode.',
  34. tooltip_top: 'Align Top.',
  35. tooltip_bottom: 'Align Bottom.',
  36. tooltip_center: 'Align Center.',
  37. },
  38. 'fontSize': {
  39. displayName: 'Font Size',
  40. tooltip: 'Font size, in points.',
  41. },
  42. 'lineHeight': {
  43. displayName: 'Line Height',
  44. tooltip: 'Line height, in points.',
  45. },
  46. 'spacingX': {
  47. displayName: 'Horizontal Spacing',
  48. tooltip: 'The spacing between text characters, only available if bitmap font was used.',
  49. },
  50. 'overflow': {
  51. displayName: 'Overflow Processing',
  52. tooltip: 'Text layout modes: <br> ' +
  53. '1. CLAMP: Text nodes outside the bounding box will be truncated. <br> ' +
  54. '2. SHRINK: Automatically shrink text box according to the constraint node. <br> ' +
  55. '3. RESIZE: Automatically updates the Node based on height of the text.',
  56. },
  57. 'enableWrapText': {
  58. displayName: 'Auto Newline',
  59. tooltip: 'Automatic newline.',
  60. },
  61. 'useSystemFont': {
  62. displayName: 'System Fonts',
  63. tooltip: 'Whether to use system default fonts. ' +
  64. '<br>The referenced font asset would be dereferenced once this option was checked.',
  65. },
  66. 'fontFamily': {
  67. displayName: 'Font Family',
  68. tooltip: 'Font names.',
  69. },
  70. 'font': {
  71. displayName: 'Font',
  72. tooltip: 'The font asset to use.',
  73. },
  74. 'cacheMode': {
  75. displayName: 'Cache Mode',
  76. tooltip: 'Text cache modes:<br> ' +
  77. '1. NONE: No cache,draw once. <br> ' +
  78. '2. BITMAP: Text is added as a static image to the dynamic atlas for batch merging, but its content cannot be dynamically modified frequently. <br> ' +
  79. '3. CHAR: Split the text into characters and cache the character texture into a character atlas for reuse, <br>' +
  80. 'which is suitable for text content with repeated character content and frequently updated.',
  81. },
  82. 'isBold': {
  83. displayName: 'Bold',
  84. tooltip: 'Make words bold.',
  85. },
  86. 'isItalic': {
  87. displayName: 'Italic',
  88. tooltip: 'Make words italic.',
  89. },
  90. 'isUnderline': {
  91. displayName: 'Underline',
  92. tooltip: 'Underscore the words.',
  93. },
  94. 'underlineHeight': {
  95. displayName: 'Underline Height',
  96. tooltip: 'The underline\'s height.',
  97. },
  98. 'enableOutline': {
  99. displayName: 'Enable Outline',
  100. tooltip: 'Whether outline is enabled.',
  101. },
  102. 'outlineColor': {
  103. displayName: 'Outline Color',
  104. tooltip: 'The color of outline.',
  105. },
  106. 'outlineWidth': {
  107. displayName: 'Outline Width',
  108. tooltip: 'The width of outline',
  109. },
  110. 'enableShadow': {
  111. displayName: 'Enable Shadow',
  112. tooltip: 'Whether shadow is enabled.',
  113. },
  114. 'shadowColor': {
  115. displayName: 'Enable Outline',
  116. tooltip: 'The color of shadow.',
  117. },
  118. 'shadowOffset': {
  119. displayName: 'Shadow Offset',
  120. tooltip: 'Offset between font and shadow.',
  121. },
  122. 'shadowBlur': {
  123. displayName: 'Shadow Blur',
  124. tooltip: 'A non-negative float specifying the level of shadow blur.',
  125. },
  126. },
  127. },
  128. 'RichText': {
  129. properties: {
  130. 'string': {
  131. displayName: 'string',
  132. tooltip: 'Text of the RichText, you could use BBcode in the string.',
  133. },
  134. 'horizontalAlign': {
  135. displayName: 'Horizontal Alignment',
  136. tooltip: 'Horizontal alignment mode.',
  137. tooltip_left: 'Align Left.',
  138. tooltip_right: 'Align Right.',
  139. tooltip_center: 'Align Center.',
  140. },
  141. 'verticalAlign': {
  142. displayName: 'Vertical Alignment',
  143. tooltip: 'Vertical alignment mode.',
  144. tooltip_top: 'Align Top.',
  145. tooltip_bottom: 'Align Bottom.',
  146. tooltip_center: 'Align Center.',
  147. },
  148. 'fontSize': {
  149. displayName: 'Font Size',
  150. tooltip: 'Font size, in points.',
  151. },
  152. 'fontColor': {
  153. displayName: 'Color',
  154. tooltip: 'Default text color for rich text. ' +
  155. '<br>It takes effect when the text content does not have a color parameter set. ' +
  156. '<br>Color cascading is not supported yet.',
  157. },
  158. 'fontFamily': {
  159. displayName: 'Font Family',
  160. tooltip: 'Font names.',
  161. },
  162. 'font': {
  163. displayName: 'Font',
  164. tooltip: 'Custom TTF font of Rich Text.',
  165. },
  166. 'useSystemFont': {
  167. displayName: 'System Fonts',
  168. tooltip: 'Whether to use system default fonts. ' +
  169. '<br>The referenced font asset would be dereferenced once this option was checked.',
  170. },
  171. 'cacheMode': {
  172. displayName: 'Cache Mode',
  173. tooltip: 'Text cache modes:<br> ' +
  174. '1. NONE: No cache,draw once. <br> ' +
  175. '2. BITMAP: Text is added as a static image to the dynamic atlas for batch merging, but its content cannot be dynamically modified frequently. <br> ' +
  176. '3. CHAR: Split the text into characters and cache the character texture into a character atlas for reuse, <br>' +
  177. 'which is suitable for text content with repeated character content and frequently updated.',
  178. },
  179. 'maxWidth': {
  180. displayName: 'Max Width',
  181. tooltip: 'The maximize width of RichText, pass 0 means not limit the maximize width.',
  182. },
  183. 'lineHeight': {
  184. displayName: 'Line Height',
  185. tooltip: 'Line height, in points.',
  186. },
  187. 'imageAtlas': {
  188. displayName: 'Image Atlas',
  189. tooltip: 'The image atlas for the img tag. ' +
  190. '<br>For each src value in the img tag, ' +
  191. '<br>there should be a valid sprite frame in the image atlas.',
  192. },
  193. 'handleTouchEvent': {
  194. displayName: 'Block input events',
  195. tooltip: 'Once checked, the Rich Text will block all input events (mouse and touch) within the bounding box of the node, ' +
  196. '<br>preventing the input from penetrating into the underlying node.',
  197. },
  198. },
  199. },
  200. 'Sprite': {
  201. properties: {
  202. __extends__: 'classes.cc.UIRenderer.properties',
  203. 'grayscale': {
  204. displayName: 'Grayscale',
  205. tooltip: 'Whether turn on grayscale rendering mode.',
  206. },
  207. 'spriteAtlas': {
  208. displayName: 'Sprite Atlas',
  209. tooltip: 'Atlas that the image belongs to.',
  210. },
  211. 'spriteFrame': {
  212. displayName: 'Sprite Frame',
  213. tooltip: 'Sprite Frame image to use.',
  214. },
  215. 'type': {
  216. displayName: 'Type',
  217. tooltip: 'Rendering mode:' +
  218. '<br> - Simple: Modifying the size will stretch the image as a whole, which is suitable for sequence frame animation and normal images. <br>' +
  219. '- Sliced: When changing the size, the four corners will not stretch, which is suitable for UI buttons and panel backgrounds. <br>' +
  220. '- Tiled : When changing the size, the original size image will continue to be tiled. <br>' +
  221. '- Filled : set a certain starting position and direction of filling, and the picture can be cropped and displayed at a certain ratio.',
  222. },
  223. 'sizeMode': {
  224. displayName: 'Size Mode',
  225. tooltip: 'Set the size of the node on which the Sprite component is on. ' +
  226. '<br>CUSTOM for setting width and height manually;' +
  227. '<br>TRIMMED to use image size with transparent pixels trimmed; ' +
  228. '<br>RAW to use image size without trimming.',
  229. },
  230. 'trim': {
  231. displayName: 'Trim',
  232. tooltip: "Whether to render transparent pixels around image in node's bounding box. " +
  233. "<br>If you check this option the bounding box will not include transparent pixels around the image.",
  234. },
  235. },
  236. },
  237. 'UISkew': {
  238. properties: {
  239. 'rotational': {
  240. displayName: 'Rotational',
  241. tooltip: 'Whether to use the rotational style of skew ?',
  242. },
  243. 'skew': {
  244. displayName: 'Skew',
  245. tooltip: 'The skew value, unit is degree.',
  246. },
  247. },
  248. },
  249. },
  250. 'sp': {
  251. 'Skeleton': {
  252. properties: {
  253. __extends__: 'classes.cc.UIRenderer.properties',
  254. 'skeletonData': {
  255. displayName: 'SkeletonData',
  256. tooltip: 'The skeleton data contains the skeleton information, <br>drag the json file exported from Spine to get started.',
  257. },
  258. '_defaultSkinIndex': {
  259. displayName: 'Default skin',
  260. tooltip: 'Choose the default skin.',
  261. },
  262. '_animationIndex': {
  263. displayName: 'Animation',
  264. tooltip: 'The name of current playing animation.',
  265. },
  266. 'defaultCacheMode': {
  267. displayName: 'Animation Cache Mode',
  268. tooltip: 'Animation mode, with options for real-time mode, <br>private cached, or public cached mode.',
  269. },
  270. 'loop': {
  271. displayName: 'Loop',
  272. tooltip: 'Whether loop current animation',
  273. },
  274. 'timeScale': {
  275. displayName: 'Time Scale',
  276. tooltip: 'The time scale of animations of this skeleton',
  277. },
  278. 'debugSlots': {
  279. displayName: 'Debug Slots',
  280. tooltip: 'Indicates whether show debug slots.',
  281. },
  282. 'debugBones': {
  283. displayName: 'Debug Bones',
  284. tooltip: 'Indicates whether show debug bones.',
  285. },
  286. 'debugMesh': {
  287. displayName: 'Debug Mesh',
  288. tooltip: 'Indicates whether open debug mesh.',
  289. },
  290. 'useTint': {
  291. displayName: 'Use Tint',
  292. tooltip: 'Enabled two color tint.',
  293. },
  294. 'premultipliedAlpha': {
  295. displayName: 'Premultiplied Alpha',
  296. tooltip: 'Indicates whether to enable premultiplied alpha.',
  297. },
  298. 'enableBatch': {
  299. displayName: 'Enable Batch',
  300. tooltip: 'If rendering a large number of identical textures and simple skeletal animations,<br>' +
  301. 'enabling batching can reduce the number of draw calls and improve rendering performance.',
  302. },
  303. 'sockets': {
  304. displayName: 'Sockets',
  305. tooltip: 'The bone sockets this animation component maintains.<br>' +
  306. 'A SpineSocket object contains a path reference to bone, and a target node.',
  307. },
  308. },
  309. },
  310. },
  311. },
  312. };