├── .gitattributes ├── .gitignore ├── ReadMe.md ├── assets ├── Scene.meta ├── Scene │ ├── Main.fire │ └── Main.fire.meta ├── Script.meta └── Script │ ├── NestableScrollView_Inner.js │ ├── NestableScrollView_Inner.js.meta │ ├── NestableScrollView_Outer.js │ ├── NestableScrollView_Outer.js.meta │ ├── TestBtnClick.js │ └── TestBtnClick.js.meta ├── demonstration └── demonstration.gif └── project.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /Library/ 2 | /local/ 3 | /packages/ 4 | /settings/ 5 | /temp/ 6 | -------------------------------------------------------------------------------- /ReadMe.md: -------------------------------------------------------------------------------- 1 | Cocos Creator 中ScrollView嵌套的解决办法。 2 | 3 | 现行支持版本:Cocos Creator v2.0+。 4 | 历史版本已放入分支:Cocos Creator v1.9+。 5 | 6 | 演示: 7 | https://github.com/NRatel/CCC-NestableScrollView/tree/master/demonstration/demonstration.gif 8 | ![Image](https://github.com/NRatel/CCC-NestableScrollView/tree/master/demonstration/demonstration.gif) 9 | 10 | 11 | 使用方法: 12 | 1.用NestableScrollView_Outer和NestableScrollView_Inner代替ScrollView组件,分别挂在需要嵌套的父子ScrollView上; 13 | 2.在NestableScrollView_Outer的 m_InnerScrollViews 属性上设置子数量,并拖上NestableScrollView_Inner; 14 | 3.分别设定父子ScrollView的方向。(一般不同向, 若同向会都滑动) 15 | 16 | 注意: 17 | 1.不打算解决多层嵌套的情况。比较复杂并且一般很难遇到这样的需求。 18 | 2.嵌套深度和数量太多会影响效率。 19 | 3.由于重写了ScrollView,别忘了把content结点重新拖上去。 20 | 4.代替ScrollView组件不会影响原项目有getComponent(cc.ScrollView)的地方,因为getComponent可以传父类取到子类。 21 | 5.很多人私信问我PageView和ScrollView怎么嵌套,最简单的办法就是基于两个ScrollView嵌套,附加自己另写的Page逻辑上去。(如果直接继承PageView并重写其部分方法,会让检视面板变乱,就要重写部分编辑器逻辑,比较麻烦) 22 | 23 | ------------------------------------------------------------------------------- 24 | 25 | 为了逻辑清晰高效, 26 | 现在的版本将原来的NestableScrollView拆为了NestableScrollView_Outer和NestableScrollView_Inner。 27 | 老版本(在分支中,最新版本已移除)已不推荐使用。 28 | -------------------------------------------------------------------------------- /assets/Scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Scene/Main.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "scene": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Scene", 13 | "_objFlags": 0, 14 | "_parent": null, 15 | "_children": [ 16 | { 17 | "__id__": 2 18 | } 19 | ], 20 | "_active": true, 21 | "_level": 0, 22 | "_components": [], 23 | "_prefab": null, 24 | "_opacity": 255, 25 | "_color": { 26 | "__type__": "cc.Color", 27 | "r": 255, 28 | "g": 255, 29 | "b": 255, 30 | "a": 255 31 | }, 32 | "_contentSize": { 33 | "__type__": "cc.Size", 34 | "width": 0, 35 | "height": 0 36 | }, 37 | "_anchorPoint": { 38 | "__type__": "cc.Vec2", 39 | "x": 0, 40 | "y": 0 41 | }, 42 | "_scale": { 43 | "__type__": "cc.Vec3", 44 | "x": 0.2646176911544228, 45 | "y": 0.2646176911544228, 46 | "z": 1 47 | }, 48 | "_quat": { 49 | "__type__": "cc.Quat", 50 | "x": 0, 51 | "y": 0, 52 | "z": 0, 53 | "w": 1 54 | }, 55 | "_zIndex": 0, 56 | "groupIndex": 0, 57 | "autoReleaseAssets": false, 58 | "_id": "55cd1fb1-3022-425a-a191-464d127334fb" 59 | }, 60 | { 61 | "__type__": "cc.Node", 62 | "_name": "Canvas", 63 | "_objFlags": 0, 64 | "_parent": { 65 | "__id__": 1 66 | }, 67 | "_children": [ 68 | { 69 | "__id__": 3 70 | }, 71 | { 72 | "__id__": 5 73 | }, 74 | { 75 | "__id__": 44 76 | } 77 | ], 78 | "_active": true, 79 | "_level": 0, 80 | "_components": [ 81 | { 82 | "__id__": 51 83 | }, 84 | { 85 | "__id__": 52 86 | } 87 | ], 88 | "_prefab": null, 89 | "_opacity": 255, 90 | "_color": { 91 | "__type__": "cc.Color", 92 | "r": 255, 93 | "g": 255, 94 | "b": 255, 95 | "a": 255 96 | }, 97 | "_contentSize": { 98 | "__type__": "cc.Size", 99 | "width": 750, 100 | "height": 1334 101 | }, 102 | "_anchorPoint": { 103 | "__type__": "cc.Vec2", 104 | "x": 0.5, 105 | "y": 0.5 106 | }, 107 | "_position": { 108 | "__type__": "cc.Vec3", 109 | "x": 375, 110 | "y": 667, 111 | "z": 0 112 | }, 113 | "_scale": { 114 | "__type__": "cc.Vec3", 115 | "x": 1, 116 | "y": 1, 117 | "z": 1 118 | }, 119 | "_rotationX": 0, 120 | "_rotationY": 0, 121 | "_quat": { 122 | "__type__": "cc.Quat", 123 | "x": 0, 124 | "y": 0, 125 | "z": 0, 126 | "w": 1 127 | }, 128 | "_skewX": 0, 129 | "_skewY": 0, 130 | "_zIndex": 0, 131 | "groupIndex": 0, 132 | "_id": "13vw7d9+RGn5/rp8JLdpzk" 133 | }, 134 | { 135 | "__type__": "cc.Node", 136 | "_name": "Main Camera", 137 | "_objFlags": 0, 138 | "_parent": { 139 | "__id__": 2 140 | }, 141 | "_children": [], 142 | "_active": true, 143 | "_level": 1, 144 | "_components": [ 145 | { 146 | "__id__": 4 147 | } 148 | ], 149 | "_prefab": null, 150 | "_opacity": 255, 151 | "_color": { 152 | "__type__": "cc.Color", 153 | "r": 255, 154 | "g": 255, 155 | "b": 255, 156 | "a": 255 157 | }, 158 | "_contentSize": { 159 | "__type__": "cc.Size", 160 | "width": 0, 161 | "height": 0 162 | }, 163 | "_anchorPoint": { 164 | "__type__": "cc.Vec2", 165 | "x": 0.5, 166 | "y": 0.5 167 | }, 168 | "_position": { 169 | "__type__": "cc.Vec3", 170 | "x": 0, 171 | "y": 0, 172 | "z": 0 173 | }, 174 | "_scale": { 175 | "__type__": "cc.Vec3", 176 | "x": 1, 177 | "y": 1, 178 | "z": 1 179 | }, 180 | "_rotationX": 0, 181 | "_rotationY": 0, 182 | "_quat": { 183 | "__type__": "cc.Quat", 184 | "x": 0, 185 | "y": 0, 186 | "z": 0, 187 | "w": 1 188 | }, 189 | "_skewX": 0, 190 | "_skewY": 0, 191 | "_zIndex": 0, 192 | "groupIndex": 0, 193 | "_id": "e0Lykd+sFNrrvpetYPuBbf" 194 | }, 195 | { 196 | "__type__": "cc.Camera", 197 | "_name": "", 198 | "_objFlags": 0, 199 | "node": { 200 | "__id__": 3 201 | }, 202 | "_enabled": true, 203 | "_cullingMask": 4294967295, 204 | "_clearFlags": 7, 205 | "_backgroundColor": { 206 | "__type__": "cc.Color", 207 | "r": 0, 208 | "g": 0, 209 | "b": 0, 210 | "a": 255 211 | }, 212 | "_depth": -1, 213 | "_zoomRatio": 1, 214 | "_targetTexture": null, 215 | "_id": "62fP79N9FFYZV3bbDQEAng" 216 | }, 217 | { 218 | "__type__": "cc.Node", 219 | "_name": "ScrollViewA", 220 | "_objFlags": 0, 221 | "_parent": { 222 | "__id__": 2 223 | }, 224 | "_children": [ 225 | { 226 | "__id__": 6 227 | } 228 | ], 229 | "_active": true, 230 | "_level": 0, 231 | "_components": [ 232 | { 233 | "__id__": 42 234 | }, 235 | { 236 | "__id__": 43 237 | } 238 | ], 239 | "_prefab": null, 240 | "_opacity": 255, 241 | "_color": { 242 | "__type__": "cc.Color", 243 | "r": 144, 244 | "g": 213, 245 | "b": 252, 246 | "a": 255 247 | }, 248 | "_contentSize": { 249 | "__type__": "cc.Size", 250 | "width": 600, 251 | "height": 1182 252 | }, 253 | "_anchorPoint": { 254 | "__type__": "cc.Vec2", 255 | "x": 0.5, 256 | "y": 0.5 257 | }, 258 | "_position": { 259 | "__type__": "cc.Vec3", 260 | "x": 0, 261 | "y": 0, 262 | "z": 0 263 | }, 264 | "_scale": { 265 | "__type__": "cc.Vec3", 266 | "x": 1, 267 | "y": 1, 268 | "z": 1 269 | }, 270 | "_rotationX": 0, 271 | "_rotationY": 0, 272 | "_quat": { 273 | "__type__": "cc.Quat", 274 | "x": 0, 275 | "y": 0, 276 | "z": 0, 277 | "w": 1 278 | }, 279 | "_skewX": 0, 280 | "_skewY": 0, 281 | "_zIndex": 0, 282 | "groupIndex": 0, 283 | "_id": "05Y5vly5VHGKTfxmLPq+AS" 284 | }, 285 | { 286 | "__type__": "cc.Node", 287 | "_name": "view", 288 | "_objFlags": 0, 289 | "_parent": { 290 | "__id__": 5 291 | }, 292 | "_children": [ 293 | { 294 | "__id__": 7 295 | } 296 | ], 297 | "_active": true, 298 | "_level": 0, 299 | "_components": [ 300 | { 301 | "__id__": 41 302 | } 303 | ], 304 | "_prefab": null, 305 | "_opacity": 255, 306 | "_color": { 307 | "__type__": "cc.Color", 308 | "r": 255, 309 | "g": 255, 310 | "b": 255, 311 | "a": 255 312 | }, 313 | "_contentSize": { 314 | "__type__": "cc.Size", 315 | "width": 600, 316 | "height": 1201 317 | }, 318 | "_anchorPoint": { 319 | "__type__": "cc.Vec2", 320 | "x": 0.5, 321 | "y": 0.5 322 | }, 323 | "_position": { 324 | "__type__": "cc.Vec3", 325 | "x": 0, 326 | "y": -9, 327 | "z": 0 328 | }, 329 | "_scale": { 330 | "__type__": "cc.Vec3", 331 | "x": 1, 332 | "y": 1, 333 | "z": 1 334 | }, 335 | "_rotationX": 0, 336 | "_rotationY": 0, 337 | "_quat": { 338 | "__type__": "cc.Quat", 339 | "x": 0, 340 | "y": 0, 341 | "z": 0, 342 | "w": 1 343 | }, 344 | "_skewX": 0, 345 | "_skewY": 0, 346 | "_zIndex": 0, 347 | "groupIndex": 0, 348 | "_id": "24xvvV3WNLW4G96l/wRq3s" 349 | }, 350 | { 351 | "__type__": "cc.Node", 352 | "_name": "content", 353 | "_objFlags": 0, 354 | "_parent": { 355 | "__id__": 6 356 | }, 357 | "_children": [ 358 | { 359 | "__id__": 8 360 | }, 361 | { 362 | "__id__": 13 363 | }, 364 | { 365 | "__id__": 15 366 | }, 367 | { 368 | "__id__": 28 369 | } 370 | ], 371 | "_active": true, 372 | "_level": 0, 373 | "_components": [], 374 | "_prefab": null, 375 | "_opacity": 255, 376 | "_color": { 377 | "__type__": "cc.Color", 378 | "r": 255, 379 | "g": 255, 380 | "b": 255, 381 | "a": 255 382 | }, 383 | "_contentSize": { 384 | "__type__": "cc.Size", 385 | "width": 765, 386 | "height": 1945 387 | }, 388 | "_anchorPoint": { 389 | "__type__": "cc.Vec2", 390 | "x": 0.5, 391 | "y": 1 392 | }, 393 | "_position": { 394 | "__type__": "cc.Vec3", 395 | "x": 82, 396 | "y": 612, 397 | "z": 0 398 | }, 399 | "_scale": { 400 | "__type__": "cc.Vec3", 401 | "x": 1, 402 | "y": 1, 403 | "z": 1 404 | }, 405 | "_rotationX": 0, 406 | "_rotationY": 0, 407 | "_quat": { 408 | "__type__": "cc.Quat", 409 | "x": 0, 410 | "y": 0, 411 | "z": 0, 412 | "w": 1 413 | }, 414 | "_skewX": 0, 415 | "_skewY": 0, 416 | "_zIndex": 0, 417 | "groupIndex": 0, 418 | "_id": "c7LRYHZPROq6nB+8FTPQM3" 419 | }, 420 | { 421 | "__type__": "cc.Node", 422 | "_name": "Btn_A", 423 | "_objFlags": 0, 424 | "_parent": { 425 | "__id__": 7 426 | }, 427 | "_children": [ 428 | { 429 | "__id__": 9 430 | } 431 | ], 432 | "_active": true, 433 | "_level": 0, 434 | "_components": [ 435 | { 436 | "__id__": 11 437 | }, 438 | { 439 | "__id__": 12 440 | } 441 | ], 442 | "_prefab": null, 443 | "_opacity": 255, 444 | "_color": { 445 | "__type__": "cc.Color", 446 | "r": 255, 447 | "g": 255, 448 | "b": 255, 449 | "a": 255 450 | }, 451 | "_contentSize": { 452 | "__type__": "cc.Size", 453 | "width": 244, 454 | "height": 105 455 | }, 456 | "_anchorPoint": { 457 | "__type__": "cc.Vec2", 458 | "x": 0.5, 459 | "y": 0.5 460 | }, 461 | "_position": { 462 | "__type__": "cc.Vec3", 463 | "x": -91, 464 | "y": -75, 465 | "z": 0 466 | }, 467 | "_scale": { 468 | "__type__": "cc.Vec3", 469 | "x": 1, 470 | "y": 1, 471 | "z": 1 472 | }, 473 | "_rotationX": 0, 474 | "_rotationY": 0, 475 | "_quat": { 476 | "__type__": "cc.Quat", 477 | "x": 0, 478 | "y": 0, 479 | "z": 0, 480 | "w": 1 481 | }, 482 | "_skewX": 0, 483 | "_skewY": 0, 484 | "_zIndex": 0, 485 | "groupIndex": 0, 486 | "_id": "e1U+l7rNxCS7OzttX7abSx" 487 | }, 488 | { 489 | "__type__": "cc.Node", 490 | "_name": "Label", 491 | "_objFlags": 0, 492 | "_parent": { 493 | "__id__": 8 494 | }, 495 | "_children": [], 496 | "_active": true, 497 | "_level": 0, 498 | "_components": [ 499 | { 500 | "__id__": 10 501 | } 502 | ], 503 | "_prefab": null, 504 | "_opacity": 255, 505 | "_color": { 506 | "__type__": "cc.Color", 507 | "r": 0, 508 | "g": 0, 509 | "b": 0, 510 | "a": 255 511 | }, 512 | "_contentSize": { 513 | "__type__": "cc.Size", 514 | "width": 100, 515 | "height": 40 516 | }, 517 | "_anchorPoint": { 518 | "__type__": "cc.Vec2", 519 | "x": 0.5, 520 | "y": 0.5 521 | }, 522 | "_position": { 523 | "__type__": "cc.Vec3", 524 | "x": 0, 525 | "y": 0, 526 | "z": 0 527 | }, 528 | "_scale": { 529 | "__type__": "cc.Vec3", 530 | "x": 1, 531 | "y": 1, 532 | "z": 1 533 | }, 534 | "_rotationX": 0, 535 | "_rotationY": 0, 536 | "_quat": { 537 | "__type__": "cc.Quat", 538 | "x": 0, 539 | "y": 0, 540 | "z": 0, 541 | "w": 1 542 | }, 543 | "_skewX": 0, 544 | "_skewY": 0, 545 | "_zIndex": 0, 546 | "groupIndex": 0, 547 | "_id": "87SnBhFxVCKqDPximI7n2C" 548 | }, 549 | { 550 | "__type__": "cc.Label", 551 | "_name": "", 552 | "_objFlags": 0, 553 | "node": { 554 | "__id__": 9 555 | }, 556 | "_enabled": true, 557 | "_srcBlendFactor": 1, 558 | "_dstBlendFactor": 771, 559 | "_useOriginalSize": false, 560 | "_string": "Btn_A", 561 | "_N$string": "Btn_A", 562 | "_fontSize": 30, 563 | "_lineHeight": 40, 564 | "_enableWrapText": false, 565 | "_N$file": null, 566 | "_isSystemFontUsed": true, 567 | "_spacingX": 0, 568 | "_N$horizontalAlign": 1, 569 | "_N$verticalAlign": 1, 570 | "_N$fontFamily": "Arial", 571 | "_N$overflow": 1, 572 | "_id": "90qL2GJ3RCCZLs9MDJJTAB" 573 | }, 574 | { 575 | "__type__": "cc.Sprite", 576 | "_name": "", 577 | "_objFlags": 0, 578 | "node": { 579 | "__id__": 8 580 | }, 581 | "_enabled": true, 582 | "_srcBlendFactor": 770, 583 | "_dstBlendFactor": 771, 584 | "_spriteFrame": { 585 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 586 | }, 587 | "_type": 1, 588 | "_sizeMode": 0, 589 | "_fillType": 0, 590 | "_fillCenter": { 591 | "__type__": "cc.Vec2", 592 | "x": 0, 593 | "y": 0 594 | }, 595 | "_fillStart": 0, 596 | "_fillRange": 0, 597 | "_isTrimmedMode": true, 598 | "_state": 0, 599 | "_atlas": null, 600 | "_id": "66y3L1o25JMpVdbark+9Tk" 601 | }, 602 | { 603 | "__type__": "cc.Button", 604 | "_name": "", 605 | "_objFlags": 0, 606 | "node": { 607 | "__id__": 8 608 | }, 609 | "_enabled": true, 610 | "transition": 2, 611 | "pressedColor": { 612 | "__type__": "cc.Color", 613 | "r": 255, 614 | "g": 255, 615 | "b": 255, 616 | "a": 255 617 | }, 618 | "hoverColor": { 619 | "__type__": "cc.Color", 620 | "r": 255, 621 | "g": 255, 622 | "b": 255, 623 | "a": 255 624 | }, 625 | "duration": 0.1, 626 | "zoomScale": 1.2, 627 | "clickEvents": [], 628 | "_N$interactable": true, 629 | "_N$enableAutoGrayEffect": false, 630 | "_N$normalColor": { 631 | "__type__": "cc.Color", 632 | "r": 255, 633 | "g": 255, 634 | "b": 255, 635 | "a": 255 636 | }, 637 | "_N$disabledColor": { 638 | "__type__": "cc.Color", 639 | "r": 255, 640 | "g": 255, 641 | "b": 255, 642 | "a": 255 643 | }, 644 | "_N$normalSprite": { 645 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 646 | }, 647 | "_N$pressedSprite": { 648 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 649 | }, 650 | "pressedSprite": { 651 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 652 | }, 653 | "_N$hoverSprite": { 654 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 655 | }, 656 | "hoverSprite": { 657 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 658 | }, 659 | "_N$disabledSprite": { 660 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 661 | }, 662 | "_N$target": { 663 | "__id__": 8 664 | }, 665 | "_id": "bbhaVrZslGWpMNnIY2OUxY" 666 | }, 667 | { 668 | "__type__": "cc.Node", 669 | "_name": "item", 670 | "_objFlags": 0, 671 | "_parent": { 672 | "__id__": 7 673 | }, 674 | "_children": [], 675 | "_active": true, 676 | "_level": 0, 677 | "_components": [ 678 | { 679 | "__id__": 14 680 | } 681 | ], 682 | "_prefab": null, 683 | "_opacity": 255, 684 | "_color": { 685 | "__type__": "cc.Color", 686 | "r": 0, 687 | "g": 0, 688 | "b": 0, 689 | "a": 255 690 | }, 691 | "_contentSize": { 692 | "__type__": "cc.Size", 693 | "width": 300, 694 | "height": 120 695 | }, 696 | "_anchorPoint": { 697 | "__type__": "cc.Vec2", 698 | "x": 0, 699 | "y": 1 700 | }, 701 | "_position": { 702 | "__type__": "cc.Vec3", 703 | "x": -227, 704 | "y": -166, 705 | "z": 0 706 | }, 707 | "_scale": { 708 | "__type__": "cc.Vec3", 709 | "x": 1, 710 | "y": 1, 711 | "z": 1 712 | }, 713 | "_rotationX": 0, 714 | "_rotationY": 0, 715 | "_quat": { 716 | "__type__": "cc.Quat", 717 | "x": 0, 718 | "y": 0, 719 | "z": 0, 720 | "w": 1 721 | }, 722 | "_skewX": 0, 723 | "_skewY": 0, 724 | "_zIndex": 0, 725 | "groupIndex": 0, 726 | "_id": "549PrPneJCM4vtVZaKH3kI" 727 | }, 728 | { 729 | "__type__": "cc.Label", 730 | "_name": "", 731 | "_objFlags": 0, 732 | "node": { 733 | "__id__": 13 734 | }, 735 | "_enabled": true, 736 | "_srcBlendFactor": 1, 737 | "_dstBlendFactor": 771, 738 | "_useOriginalSize": false, 739 | "_string": "ScrollViewA, 它是竖向的\n\n", 740 | "_N$string": "ScrollViewA, 它是竖向的\n\n", 741 | "_fontSize": 30, 742 | "_lineHeight": 50, 743 | "_enableWrapText": true, 744 | "_N$file": null, 745 | "_isSystemFontUsed": true, 746 | "_spacingX": 0, 747 | "_N$horizontalAlign": 1, 748 | "_N$verticalAlign": 0, 749 | "_N$fontFamily": "Arial", 750 | "_N$overflow": 1, 751 | "_id": "9b/uTxC4ZH77SlJSnHpkxA" 752 | }, 753 | { 754 | "__type__": "cc.Node", 755 | "_name": "ScrollViewB", 756 | "_objFlags": 0, 757 | "_parent": { 758 | "__id__": 7 759 | }, 760 | "_children": [ 761 | { 762 | "__id__": 16 763 | } 764 | ], 765 | "_active": true, 766 | "_level": 0, 767 | "_components": [ 768 | { 769 | "__id__": 26 770 | }, 771 | { 772 | "__id__": 27 773 | } 774 | ], 775 | "_prefab": null, 776 | "_opacity": 255, 777 | "_color": { 778 | "__type__": "cc.Color", 779 | "r": 71, 780 | "g": 49, 781 | "b": 32, 782 | "a": 255 783 | }, 784 | "_contentSize": { 785 | "__type__": "cc.Size", 786 | "width": 500, 787 | "height": 300 788 | }, 789 | "_anchorPoint": { 790 | "__type__": "cc.Vec2", 791 | "x": 0.5, 792 | "y": 0.5 793 | }, 794 | "_position": { 795 | "__type__": "cc.Vec3", 796 | "x": -60, 797 | "y": -453, 798 | "z": 0 799 | }, 800 | "_scale": { 801 | "__type__": "cc.Vec3", 802 | "x": 1, 803 | "y": 1, 804 | "z": 1 805 | }, 806 | "_rotationX": 0, 807 | "_rotationY": 0, 808 | "_quat": { 809 | "__type__": "cc.Quat", 810 | "x": 0, 811 | "y": 0, 812 | "z": 0, 813 | "w": 1 814 | }, 815 | "_skewX": 0, 816 | "_skewY": 0, 817 | "_zIndex": 0, 818 | "groupIndex": 0, 819 | "_id": "041LYAFdlPaIwGBty4xiGc" 820 | }, 821 | { 822 | "__type__": "cc.Node", 823 | "_name": "view", 824 | "_objFlags": 0, 825 | "_parent": { 826 | "__id__": 15 827 | }, 828 | "_children": [ 829 | { 830 | "__id__": 17 831 | } 832 | ], 833 | "_active": true, 834 | "_level": 0, 835 | "_components": [ 836 | { 837 | "__id__": 25 838 | } 839 | ], 840 | "_prefab": null, 841 | "_opacity": 255, 842 | "_color": { 843 | "__type__": "cc.Color", 844 | "r": 255, 845 | "g": 255, 846 | "b": 255, 847 | "a": 255 848 | }, 849 | "_contentSize": { 850 | "__type__": "cc.Size", 851 | "width": 500, 852 | "height": 300 853 | }, 854 | "_anchorPoint": { 855 | "__type__": "cc.Vec2", 856 | "x": 0.5, 857 | "y": 0.5 858 | }, 859 | "_position": { 860 | "__type__": "cc.Vec3", 861 | "x": 0, 862 | "y": 0, 863 | "z": 0 864 | }, 865 | "_scale": { 866 | "__type__": "cc.Vec3", 867 | "x": 1, 868 | "y": 1, 869 | "z": 1 870 | }, 871 | "_rotationX": 0, 872 | "_rotationY": 0, 873 | "_quat": { 874 | "__type__": "cc.Quat", 875 | "x": 0, 876 | "y": 0, 877 | "z": 0, 878 | "w": 1 879 | }, 880 | "_skewX": 0, 881 | "_skewY": 0, 882 | "_zIndex": 0, 883 | "groupIndex": 0, 884 | "_id": "729hwgtHVGbphmx6Ln6qph" 885 | }, 886 | { 887 | "__type__": "cc.Node", 888 | "_name": "content", 889 | "_objFlags": 0, 890 | "_parent": { 891 | "__id__": 16 892 | }, 893 | "_children": [ 894 | { 895 | "__id__": 18 896 | }, 897 | { 898 | "__id__": 20 899 | } 900 | ], 901 | "_active": true, 902 | "_level": 0, 903 | "_components": [], 904 | "_prefab": null, 905 | "_opacity": 255, 906 | "_color": { 907 | "__type__": "cc.Color", 908 | "r": 255, 909 | "g": 255, 910 | "b": 255, 911 | "a": 255 912 | }, 913 | "_contentSize": { 914 | "__type__": "cc.Size", 915 | "width": 700, 916 | "height": 300 917 | }, 918 | "_anchorPoint": { 919 | "__type__": "cc.Vec2", 920 | "x": 0.5, 921 | "y": 1 922 | }, 923 | "_position": { 924 | "__type__": "cc.Vec3", 925 | "x": 100, 926 | "y": 149, 927 | "z": 0 928 | }, 929 | "_scale": { 930 | "__type__": "cc.Vec3", 931 | "x": 1, 932 | "y": 1, 933 | "z": 1 934 | }, 935 | "_rotationX": 0, 936 | "_rotationY": 0, 937 | "_quat": { 938 | "__type__": "cc.Quat", 939 | "x": 0, 940 | "y": 0, 941 | "z": 0, 942 | "w": 1 943 | }, 944 | "_skewX": 0, 945 | "_skewY": 0, 946 | "_zIndex": 0, 947 | "groupIndex": 0, 948 | "_id": "42+EXGG/ZMdYWH7ilJMhs8" 949 | }, 950 | { 951 | "__type__": "cc.Node", 952 | "_name": "item", 953 | "_objFlags": 0, 954 | "_parent": { 955 | "__id__": 17 956 | }, 957 | "_children": [], 958 | "_active": true, 959 | "_level": 0, 960 | "_components": [ 961 | { 962 | "__id__": 19 963 | } 964 | ], 965 | "_prefab": null, 966 | "_opacity": 255, 967 | "_color": { 968 | "__type__": "cc.Color", 969 | "r": 0, 970 | "g": 0, 971 | "b": 0, 972 | "a": 255 973 | }, 974 | "_contentSize": { 975 | "__type__": "cc.Size", 976 | "width": 347.84, 977 | "height": 120 978 | }, 979 | "_anchorPoint": { 980 | "__type__": "cc.Vec2", 981 | "x": 0, 982 | "y": 1 983 | }, 984 | "_position": { 985 | "__type__": "cc.Vec3", 986 | "x": -185, 987 | "y": -170, 988 | "z": 0 989 | }, 990 | "_scale": { 991 | "__type__": "cc.Vec3", 992 | "x": 1, 993 | "y": 1, 994 | "z": 1 995 | }, 996 | "_rotationX": 0, 997 | "_rotationY": 0, 998 | "_quat": { 999 | "__type__": "cc.Quat", 1000 | "x": 0, 1001 | "y": 0, 1002 | "z": 0, 1003 | "w": 1 1004 | }, 1005 | "_skewX": 0, 1006 | "_skewY": 0, 1007 | "_zIndex": 0, 1008 | "groupIndex": 0, 1009 | "_id": "aeqB7jQ75O/K3f9Yfgdozw" 1010 | }, 1011 | { 1012 | "__type__": "cc.Label", 1013 | "_name": "", 1014 | "_objFlags": 0, 1015 | "node": { 1016 | "__id__": 18 1017 | }, 1018 | "_enabled": true, 1019 | "_srcBlendFactor": 1, 1020 | "_dstBlendFactor": 771, 1021 | "_useOriginalSize": false, 1022 | "_string": "ScrollViewB, 它是横向的\n\n", 1023 | "_N$string": "ScrollViewB, 它是横向的\n\n", 1024 | "_fontSize": 30, 1025 | "_lineHeight": 40, 1026 | "_enableWrapText": true, 1027 | "_N$file": null, 1028 | "_isSystemFontUsed": true, 1029 | "_spacingX": 0, 1030 | "_N$horizontalAlign": 1, 1031 | "_N$verticalAlign": 0, 1032 | "_N$fontFamily": "Arial", 1033 | "_N$overflow": 0, 1034 | "_id": "905xwftfVKGbiFoOuF/9gj" 1035 | }, 1036 | { 1037 | "__type__": "cc.Node", 1038 | "_name": "Btn_B", 1039 | "_objFlags": 0, 1040 | "_parent": { 1041 | "__id__": 17 1042 | }, 1043 | "_children": [ 1044 | { 1045 | "__id__": 21 1046 | } 1047 | ], 1048 | "_active": true, 1049 | "_level": 0, 1050 | "_components": [ 1051 | { 1052 | "__id__": 23 1053 | }, 1054 | { 1055 | "__id__": 24 1056 | } 1057 | ], 1058 | "_prefab": null, 1059 | "_opacity": 255, 1060 | "_color": { 1061 | "__type__": "cc.Color", 1062 | "r": 255, 1063 | "g": 255, 1064 | "b": 255, 1065 | "a": 255 1066 | }, 1067 | "_contentSize": { 1068 | "__type__": "cc.Size", 1069 | "width": 244, 1070 | "height": 105 1071 | }, 1072 | "_anchorPoint": { 1073 | "__type__": "cc.Vec2", 1074 | "x": 0.5, 1075 | "y": 0.5 1076 | }, 1077 | "_position": { 1078 | "__type__": "cc.Vec3", 1079 | "x": -37, 1080 | "y": -70, 1081 | "z": 0 1082 | }, 1083 | "_scale": { 1084 | "__type__": "cc.Vec3", 1085 | "x": 1, 1086 | "y": 1, 1087 | "z": 1 1088 | }, 1089 | "_rotationX": 0, 1090 | "_rotationY": 0, 1091 | "_quat": { 1092 | "__type__": "cc.Quat", 1093 | "x": 0, 1094 | "y": 0, 1095 | "z": 0, 1096 | "w": 1 1097 | }, 1098 | "_skewX": 0, 1099 | "_skewY": 0, 1100 | "_zIndex": 0, 1101 | "groupIndex": 0, 1102 | "_id": "b1K0UlNNFN84zFkHSp5IAR" 1103 | }, 1104 | { 1105 | "__type__": "cc.Node", 1106 | "_name": "Label", 1107 | "_objFlags": 0, 1108 | "_parent": { 1109 | "__id__": 20 1110 | }, 1111 | "_children": [], 1112 | "_active": true, 1113 | "_level": 0, 1114 | "_components": [ 1115 | { 1116 | "__id__": 22 1117 | } 1118 | ], 1119 | "_prefab": null, 1120 | "_opacity": 255, 1121 | "_color": { 1122 | "__type__": "cc.Color", 1123 | "r": 0, 1124 | "g": 0, 1125 | "b": 0, 1126 | "a": 255 1127 | }, 1128 | "_contentSize": { 1129 | "__type__": "cc.Size", 1130 | "width": 100, 1131 | "height": 40 1132 | }, 1133 | "_anchorPoint": { 1134 | "__type__": "cc.Vec2", 1135 | "x": 0.5, 1136 | "y": 0.5 1137 | }, 1138 | "_position": { 1139 | "__type__": "cc.Vec3", 1140 | "x": 0, 1141 | "y": 0, 1142 | "z": 0 1143 | }, 1144 | "_scale": { 1145 | "__type__": "cc.Vec3", 1146 | "x": 1, 1147 | "y": 1, 1148 | "z": 1 1149 | }, 1150 | "_rotationX": 0, 1151 | "_rotationY": 0, 1152 | "_quat": { 1153 | "__type__": "cc.Quat", 1154 | "x": 0, 1155 | "y": 0, 1156 | "z": 0, 1157 | "w": 1 1158 | }, 1159 | "_skewX": 0, 1160 | "_skewY": 0, 1161 | "_zIndex": 0, 1162 | "groupIndex": 0, 1163 | "_id": "07KKN8fFNKLKgiKrIk73he" 1164 | }, 1165 | { 1166 | "__type__": "cc.Label", 1167 | "_name": "", 1168 | "_objFlags": 0, 1169 | "node": { 1170 | "__id__": 21 1171 | }, 1172 | "_enabled": true, 1173 | "_srcBlendFactor": 1, 1174 | "_dstBlendFactor": 771, 1175 | "_useOriginalSize": false, 1176 | "_string": "Btn_B", 1177 | "_N$string": "Btn_B", 1178 | "_fontSize": 30, 1179 | "_lineHeight": 40, 1180 | "_enableWrapText": false, 1181 | "_N$file": null, 1182 | "_isSystemFontUsed": true, 1183 | "_spacingX": 0, 1184 | "_N$horizontalAlign": 1, 1185 | "_N$verticalAlign": 1, 1186 | "_N$fontFamily": "Arial", 1187 | "_N$overflow": 1, 1188 | "_id": "664SCbS4NItL5gjPCU3eUt" 1189 | }, 1190 | { 1191 | "__type__": "cc.Sprite", 1192 | "_name": "", 1193 | "_objFlags": 0, 1194 | "node": { 1195 | "__id__": 20 1196 | }, 1197 | "_enabled": true, 1198 | "_srcBlendFactor": 770, 1199 | "_dstBlendFactor": 771, 1200 | "_spriteFrame": { 1201 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1202 | }, 1203 | "_type": 1, 1204 | "_sizeMode": 0, 1205 | "_fillType": 0, 1206 | "_fillCenter": { 1207 | "__type__": "cc.Vec2", 1208 | "x": 0, 1209 | "y": 0 1210 | }, 1211 | "_fillStart": 0, 1212 | "_fillRange": 0, 1213 | "_isTrimmedMode": true, 1214 | "_state": 0, 1215 | "_atlas": null, 1216 | "_id": "8dRES1t35AIb5q6h2irlY8" 1217 | }, 1218 | { 1219 | "__type__": "cc.Button", 1220 | "_name": "", 1221 | "_objFlags": 0, 1222 | "node": { 1223 | "__id__": 20 1224 | }, 1225 | "_enabled": true, 1226 | "transition": 2, 1227 | "pressedColor": { 1228 | "__type__": "cc.Color", 1229 | "r": 255, 1230 | "g": 255, 1231 | "b": 255, 1232 | "a": 255 1233 | }, 1234 | "hoverColor": { 1235 | "__type__": "cc.Color", 1236 | "r": 255, 1237 | "g": 255, 1238 | "b": 255, 1239 | "a": 255 1240 | }, 1241 | "duration": 0.1, 1242 | "zoomScale": 1.2, 1243 | "clickEvents": [], 1244 | "_N$interactable": true, 1245 | "_N$enableAutoGrayEffect": false, 1246 | "_N$normalColor": { 1247 | "__type__": "cc.Color", 1248 | "r": 255, 1249 | "g": 255, 1250 | "b": 255, 1251 | "a": 255 1252 | }, 1253 | "_N$disabledColor": { 1254 | "__type__": "cc.Color", 1255 | "r": 255, 1256 | "g": 255, 1257 | "b": 255, 1258 | "a": 255 1259 | }, 1260 | "_N$normalSprite": { 1261 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1262 | }, 1263 | "_N$pressedSprite": { 1264 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1265 | }, 1266 | "pressedSprite": { 1267 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1268 | }, 1269 | "_N$hoverSprite": { 1270 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1271 | }, 1272 | "hoverSprite": { 1273 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1274 | }, 1275 | "_N$disabledSprite": { 1276 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 1277 | }, 1278 | "_N$target": { 1279 | "__id__": 20 1280 | }, 1281 | "_id": "a51oMytQpIrpxbypz/zdCJ" 1282 | }, 1283 | { 1284 | "__type__": "cc.Mask", 1285 | "_name": "", 1286 | "_objFlags": 0, 1287 | "node": { 1288 | "__id__": 16 1289 | }, 1290 | "_enabled": true, 1291 | "_srcBlendFactor": 770, 1292 | "_dstBlendFactor": 771, 1293 | "_spriteFrame": null, 1294 | "_type": 0, 1295 | "_segments": 64, 1296 | "_N$alphaThreshold": 1, 1297 | "_N$inverted": false, 1298 | "_id": "82NdZU7JNDcpCcuyDcSo90" 1299 | }, 1300 | { 1301 | "__type__": "cc.Sprite", 1302 | "_name": "", 1303 | "_objFlags": 0, 1304 | "node": { 1305 | "__id__": 15 1306 | }, 1307 | "_enabled": true, 1308 | "_srcBlendFactor": 770, 1309 | "_dstBlendFactor": 771, 1310 | "_spriteFrame": { 1311 | "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" 1312 | }, 1313 | "_type": 1, 1314 | "_sizeMode": 0, 1315 | "_fillType": 0, 1316 | "_fillCenter": { 1317 | "__type__": "cc.Vec2", 1318 | "x": 0, 1319 | "y": 0 1320 | }, 1321 | "_fillStart": 0, 1322 | "_fillRange": 0, 1323 | "_isTrimmedMode": true, 1324 | "_state": 0, 1325 | "_atlas": null, 1326 | "_id": "c75lKw8xxFR4pdzwrOQqyM" 1327 | }, 1328 | { 1329 | "__type__": "3770etpsdpK4KiQAwSc8hBh", 1330 | "_name": "", 1331 | "_objFlags": 0, 1332 | "node": { 1333 | "__id__": 15 1334 | }, 1335 | "_enabled": true, 1336 | "horizontal": true, 1337 | "vertical": false, 1338 | "inertia": true, 1339 | "brake": 0.5, 1340 | "elastic": true, 1341 | "bounceDuration": 1, 1342 | "scrollEvents": [], 1343 | "cancelInnerEvents": true, 1344 | "_N$content": { 1345 | "__id__": 17 1346 | }, 1347 | "content": { 1348 | "__id__": 17 1349 | }, 1350 | "m_OuterScrollView": null, 1351 | "_id": "b14LUZMjNPf5LQ2bijXFyW" 1352 | }, 1353 | { 1354 | "__type__": "cc.Node", 1355 | "_name": "ScrollViewC", 1356 | "_objFlags": 0, 1357 | "_parent": { 1358 | "__id__": 7 1359 | }, 1360 | "_children": [ 1361 | { 1362 | "__id__": 29 1363 | } 1364 | ], 1365 | "_active": true, 1366 | "_level": 0, 1367 | "_components": [ 1368 | { 1369 | "__id__": 39 1370 | }, 1371 | { 1372 | "__id__": 40 1373 | } 1374 | ], 1375 | "_prefab": null, 1376 | "_opacity": 255, 1377 | "_color": { 1378 | "__type__": "cc.Color", 1379 | "r": 71, 1380 | "g": 49, 1381 | "b": 32, 1382 | "a": 255 1383 | }, 1384 | "_contentSize": { 1385 | "__type__": "cc.Size", 1386 | "width": 500, 1387 | "height": 300 1388 | }, 1389 | "_anchorPoint": { 1390 | "__type__": "cc.Vec2", 1391 | "x": 0.5, 1392 | "y": 0.5 1393 | }, 1394 | "_position": { 1395 | "__type__": "cc.Vec3", 1396 | "x": -60, 1397 | "y": -790, 1398 | "z": 0 1399 | }, 1400 | "_scale": { 1401 | "__type__": "cc.Vec3", 1402 | "x": 1, 1403 | "y": 1, 1404 | "z": 1 1405 | }, 1406 | "_rotationX": 0, 1407 | "_rotationY": 0, 1408 | "_quat": { 1409 | "__type__": "cc.Quat", 1410 | "x": 0, 1411 | "y": 0, 1412 | "z": 0, 1413 | "w": 1 1414 | }, 1415 | "_skewX": 0, 1416 | "_skewY": 0, 1417 | "_zIndex": 0, 1418 | "groupIndex": 0, 1419 | "_id": "5eod35KWJJVJkov/AqUlNp" 1420 | }, 1421 | { 1422 | "__type__": "cc.Node", 1423 | "_name": "view", 1424 | "_objFlags": 0, 1425 | "_parent": { 1426 | "__id__": 28 1427 | }, 1428 | "_children": [ 1429 | { 1430 | "__id__": 30 1431 | } 1432 | ], 1433 | "_active": true, 1434 | "_level": 0, 1435 | "_components": [ 1436 | { 1437 | "__id__": 38 1438 | } 1439 | ], 1440 | "_prefab": null, 1441 | "_opacity": 255, 1442 | "_color": { 1443 | "__type__": "cc.Color", 1444 | "r": 255, 1445 | "g": 255, 1446 | "b": 255, 1447 | "a": 255 1448 | }, 1449 | "_contentSize": { 1450 | "__type__": "cc.Size", 1451 | "width": 500, 1452 | "height": 300 1453 | }, 1454 | "_anchorPoint": { 1455 | "__type__": "cc.Vec2", 1456 | "x": 0.5, 1457 | "y": 0.5 1458 | }, 1459 | "_position": { 1460 | "__type__": "cc.Vec3", 1461 | "x": 0, 1462 | "y": 0, 1463 | "z": 0 1464 | }, 1465 | "_scale": { 1466 | "__type__": "cc.Vec3", 1467 | "x": 1, 1468 | "y": 1, 1469 | "z": 1 1470 | }, 1471 | "_rotationX": 0, 1472 | "_rotationY": 0, 1473 | "_quat": { 1474 | "__type__": "cc.Quat", 1475 | "x": 0, 1476 | "y": 0, 1477 | "z": 0, 1478 | "w": 1 1479 | }, 1480 | "_skewX": 0, 1481 | "_skewY": 0, 1482 | "_zIndex": 0, 1483 | "groupIndex": 0, 1484 | "_id": "231RHCdBBNqr4yW6ITRxTG" 1485 | }, 1486 | { 1487 | "__type__": "cc.Node", 1488 | "_name": "content", 1489 | "_objFlags": 0, 1490 | "_parent": { 1491 | "__id__": 29 1492 | }, 1493 | "_children": [ 1494 | { 1495 | "__id__": 31 1496 | }, 1497 | { 1498 | "__id__": 33 1499 | } 1500 | ], 1501 | "_active": true, 1502 | "_level": 0, 1503 | "_components": [], 1504 | "_prefab": null, 1505 | "_opacity": 255, 1506 | "_color": { 1507 | "__type__": "cc.Color", 1508 | "r": 255, 1509 | "g": 255, 1510 | "b": 255, 1511 | "a": 255 1512 | }, 1513 | "_contentSize": { 1514 | "__type__": "cc.Size", 1515 | "width": 751, 1516 | "height": 300 1517 | }, 1518 | "_anchorPoint": { 1519 | "__type__": "cc.Vec2", 1520 | "x": 0.5, 1521 | "y": 1 1522 | }, 1523 | "_position": { 1524 | "__type__": "cc.Vec3", 1525 | "x": 121, 1526 | "y": 149, 1527 | "z": 0 1528 | }, 1529 | "_scale": { 1530 | "__type__": "cc.Vec3", 1531 | "x": 1, 1532 | "y": 1, 1533 | "z": 1 1534 | }, 1535 | "_rotationX": 0, 1536 | "_rotationY": 0, 1537 | "_quat": { 1538 | "__type__": "cc.Quat", 1539 | "x": 0, 1540 | "y": 0, 1541 | "z": 0, 1542 | "w": 1 1543 | }, 1544 | "_skewX": 0, 1545 | "_skewY": 0, 1546 | "_zIndex": 0, 1547 | "groupIndex": 0, 1548 | "_id": "54n3R6TlpC0aoKbMQi3gkG" 1549 | }, 1550 | { 1551 | "__type__": "cc.Node", 1552 | "_name": "item", 1553 | "_objFlags": 0, 1554 | "_parent": { 1555 | "__id__": 30 1556 | }, 1557 | "_children": [], 1558 | "_active": true, 1559 | "_level": 0, 1560 | "_components": [ 1561 | { 1562 | "__id__": 32 1563 | } 1564 | ], 1565 | "_prefab": null, 1566 | "_opacity": 255, 1567 | "_color": { 1568 | "__type__": "cc.Color", 1569 | "r": 0, 1570 | "g": 0, 1571 | "b": 0, 1572 | "a": 255 1573 | }, 1574 | "_contentSize": { 1575 | "__type__": "cc.Size", 1576 | "width": 349.5, 1577 | "height": 120 1578 | }, 1579 | "_anchorPoint": { 1580 | "__type__": "cc.Vec2", 1581 | "x": 0, 1582 | "y": 1 1583 | }, 1584 | "_position": { 1585 | "__type__": "cc.Vec3", 1586 | "x": -326, 1587 | "y": -211, 1588 | "z": 0 1589 | }, 1590 | "_scale": { 1591 | "__type__": "cc.Vec3", 1592 | "x": 1, 1593 | "y": 1, 1594 | "z": 1 1595 | }, 1596 | "_rotationX": 0, 1597 | "_rotationY": 0, 1598 | "_quat": { 1599 | "__type__": "cc.Quat", 1600 | "x": 0, 1601 | "y": 0, 1602 | "z": 0, 1603 | "w": 1 1604 | }, 1605 | "_skewX": 0, 1606 | "_skewY": 0, 1607 | "_zIndex": 0, 1608 | "groupIndex": 0, 1609 | "_id": "592B3fqxNJ6Y7BBC40az3r" 1610 | }, 1611 | { 1612 | "__type__": "cc.Label", 1613 | "_name": "", 1614 | "_objFlags": 0, 1615 | "node": { 1616 | "__id__": 31 1617 | }, 1618 | "_enabled": true, 1619 | "_srcBlendFactor": 1, 1620 | "_dstBlendFactor": 771, 1621 | "_useOriginalSize": false, 1622 | "_string": "ScrollViewC, 它是横向的\n\n", 1623 | "_N$string": "ScrollViewC, 它是横向的\n\n", 1624 | "_fontSize": 30, 1625 | "_lineHeight": 40, 1626 | "_enableWrapText": true, 1627 | "_N$file": null, 1628 | "_isSystemFontUsed": true, 1629 | "_spacingX": 0, 1630 | "_N$horizontalAlign": 1, 1631 | "_N$verticalAlign": 0, 1632 | "_N$fontFamily": "Arial", 1633 | "_N$overflow": 0, 1634 | "_id": "e5ELXvmDdEDqq/vXtFQD7O" 1635 | }, 1636 | { 1637 | "__type__": "cc.Node", 1638 | "_name": "Btn_C", 1639 | "_objFlags": 0, 1640 | "_parent": { 1641 | "__id__": 30 1642 | }, 1643 | "_children": [ 1644 | { 1645 | "__id__": 34 1646 | } 1647 | ], 1648 | "_active": true, 1649 | "_level": 0, 1650 | "_components": [ 1651 | { 1652 | "__id__": 36 1653 | }, 1654 | { 1655 | "__id__": 37 1656 | } 1657 | ], 1658 | "_prefab": null, 1659 | "_opacity": 255, 1660 | "_color": { 1661 | "__type__": "cc.Color", 1662 | "r": 255, 1663 | "g": 255, 1664 | "b": 255, 1665 | "a": 255 1666 | }, 1667 | "_contentSize": { 1668 | "__type__": "cc.Size", 1669 | "width": 244, 1670 | "height": 105 1671 | }, 1672 | "_anchorPoint": { 1673 | "__type__": "cc.Vec2", 1674 | "x": 0.5, 1675 | "y": 0.5 1676 | }, 1677 | "_position": { 1678 | "__type__": "cc.Vec3", 1679 | "x": -178, 1680 | "y": -111, 1681 | "z": 0 1682 | }, 1683 | "_scale": { 1684 | "__type__": "cc.Vec3", 1685 | "x": 1, 1686 | "y": 1, 1687 | "z": 1 1688 | }, 1689 | "_rotationX": 0, 1690 | "_rotationY": 0, 1691 | "_quat": { 1692 | "__type__": "cc.Quat", 1693 | "x": 0, 1694 | "y": 0, 1695 | "z": 0, 1696 | "w": 1 1697 | }, 1698 | "_skewX": 0, 1699 | "_skewY": 0, 1700 | "_zIndex": 0, 1701 | "groupIndex": 0, 1702 | "_id": "37hoa0AiVNV4KPXu2Z10C8" 1703 | }, 1704 | { 1705 | "__type__": "cc.Node", 1706 | "_name": "Label", 1707 | "_objFlags": 0, 1708 | "_parent": { 1709 | "__id__": 33 1710 | }, 1711 | "_children": [], 1712 | "_active": true, 1713 | "_level": 0, 1714 | "_components": [ 1715 | { 1716 | "__id__": 35 1717 | } 1718 | ], 1719 | "_prefab": null, 1720 | "_opacity": 255, 1721 | "_color": { 1722 | "__type__": "cc.Color", 1723 | "r": 0, 1724 | "g": 0, 1725 | "b": 0, 1726 | "a": 255 1727 | }, 1728 | "_contentSize": { 1729 | "__type__": "cc.Size", 1730 | "width": 100, 1731 | "height": 40 1732 | }, 1733 | "_anchorPoint": { 1734 | "__type__": "cc.Vec2", 1735 | "x": 0.5, 1736 | "y": 0.5 1737 | }, 1738 | "_position": { 1739 | "__type__": "cc.Vec3", 1740 | "x": 0, 1741 | "y": 0, 1742 | "z": 0 1743 | }, 1744 | "_scale": { 1745 | "__type__": "cc.Vec3", 1746 | "x": 1, 1747 | "y": 1, 1748 | "z": 1 1749 | }, 1750 | "_rotationX": 0, 1751 | "_rotationY": 0, 1752 | "_quat": { 1753 | "__type__": "cc.Quat", 1754 | "x": 0, 1755 | "y": 0, 1756 | "z": 0, 1757 | "w": 1 1758 | }, 1759 | "_skewX": 0, 1760 | "_skewY": 0, 1761 | "_zIndex": 0, 1762 | "groupIndex": 0, 1763 | "_id": "fbkpgHZJFEi5lmMtg7aN40" 1764 | }, 1765 | { 1766 | "__type__": "cc.Label", 1767 | "_name": "", 1768 | "_objFlags": 0, 1769 | "node": { 1770 | "__id__": 34 1771 | }, 1772 | "_enabled": true, 1773 | "_srcBlendFactor": 1, 1774 | "_dstBlendFactor": 771, 1775 | "_useOriginalSize": false, 1776 | "_string": "Btn_C", 1777 | "_N$string": "Btn_C", 1778 | "_fontSize": 30, 1779 | "_lineHeight": 40, 1780 | "_enableWrapText": false, 1781 | "_N$file": null, 1782 | "_isSystemFontUsed": true, 1783 | "_spacingX": 0, 1784 | "_N$horizontalAlign": 1, 1785 | "_N$verticalAlign": 1, 1786 | "_N$fontFamily": "Arial", 1787 | "_N$overflow": 1, 1788 | "_id": "c8MZHHj29B2IuhyRpjFMLn" 1789 | }, 1790 | { 1791 | "__type__": "cc.Sprite", 1792 | "_name": "", 1793 | "_objFlags": 0, 1794 | "node": { 1795 | "__id__": 33 1796 | }, 1797 | "_enabled": true, 1798 | "_srcBlendFactor": 770, 1799 | "_dstBlendFactor": 771, 1800 | "_spriteFrame": { 1801 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1802 | }, 1803 | "_type": 1, 1804 | "_sizeMode": 0, 1805 | "_fillType": 0, 1806 | "_fillCenter": { 1807 | "__type__": "cc.Vec2", 1808 | "x": 0, 1809 | "y": 0 1810 | }, 1811 | "_fillStart": 0, 1812 | "_fillRange": 0, 1813 | "_isTrimmedMode": true, 1814 | "_state": 0, 1815 | "_atlas": null, 1816 | "_id": "e9m+uKpR1Aj6t22o6lcUwC" 1817 | }, 1818 | { 1819 | "__type__": "cc.Button", 1820 | "_name": "", 1821 | "_objFlags": 0, 1822 | "node": { 1823 | "__id__": 33 1824 | }, 1825 | "_enabled": true, 1826 | "transition": 2, 1827 | "pressedColor": { 1828 | "__type__": "cc.Color", 1829 | "r": 255, 1830 | "g": 255, 1831 | "b": 255, 1832 | "a": 255 1833 | }, 1834 | "hoverColor": { 1835 | "__type__": "cc.Color", 1836 | "r": 255, 1837 | "g": 255, 1838 | "b": 255, 1839 | "a": 255 1840 | }, 1841 | "duration": 0.1, 1842 | "zoomScale": 1.2, 1843 | "clickEvents": [], 1844 | "_N$interactable": true, 1845 | "_N$enableAutoGrayEffect": false, 1846 | "_N$normalColor": { 1847 | "__type__": "cc.Color", 1848 | "r": 255, 1849 | "g": 255, 1850 | "b": 255, 1851 | "a": 255 1852 | }, 1853 | "_N$disabledColor": { 1854 | "__type__": "cc.Color", 1855 | "r": 255, 1856 | "g": 255, 1857 | "b": 255, 1858 | "a": 255 1859 | }, 1860 | "_N$normalSprite": { 1861 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1862 | }, 1863 | "_N$pressedSprite": { 1864 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1865 | }, 1866 | "pressedSprite": { 1867 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1868 | }, 1869 | "_N$hoverSprite": { 1870 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1871 | }, 1872 | "hoverSprite": { 1873 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1874 | }, 1875 | "_N$disabledSprite": { 1876 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 1877 | }, 1878 | "_N$target": { 1879 | "__id__": 33 1880 | }, 1881 | "_id": "42HOQ/jXdCGLo6jMEfsAwr" 1882 | }, 1883 | { 1884 | "__type__": "cc.Mask", 1885 | "_name": "", 1886 | "_objFlags": 0, 1887 | "node": { 1888 | "__id__": 29 1889 | }, 1890 | "_enabled": true, 1891 | "_srcBlendFactor": 770, 1892 | "_dstBlendFactor": 771, 1893 | "_spriteFrame": null, 1894 | "_type": 0, 1895 | "_segments": 64, 1896 | "_N$alphaThreshold": 1, 1897 | "_N$inverted": false, 1898 | "_id": "6ea9cSus9FJL5Qyww0y0ve" 1899 | }, 1900 | { 1901 | "__type__": "cc.Sprite", 1902 | "_name": "", 1903 | "_objFlags": 0, 1904 | "node": { 1905 | "__id__": 28 1906 | }, 1907 | "_enabled": true, 1908 | "_srcBlendFactor": 770, 1909 | "_dstBlendFactor": 771, 1910 | "_spriteFrame": { 1911 | "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" 1912 | }, 1913 | "_type": 1, 1914 | "_sizeMode": 0, 1915 | "_fillType": 0, 1916 | "_fillCenter": { 1917 | "__type__": "cc.Vec2", 1918 | "x": 0, 1919 | "y": 0 1920 | }, 1921 | "_fillStart": 0, 1922 | "_fillRange": 0, 1923 | "_isTrimmedMode": true, 1924 | "_state": 0, 1925 | "_atlas": null, 1926 | "_id": "19t0XA1YpJ07nLaQEs+Z0n" 1927 | }, 1928 | { 1929 | "__type__": "3770etpsdpK4KiQAwSc8hBh", 1930 | "_name": "", 1931 | "_objFlags": 0, 1932 | "node": { 1933 | "__id__": 28 1934 | }, 1935 | "_enabled": true, 1936 | "horizontal": true, 1937 | "vertical": false, 1938 | "inertia": true, 1939 | "brake": 0.5, 1940 | "elastic": true, 1941 | "bounceDuration": 1, 1942 | "scrollEvents": [], 1943 | "cancelInnerEvents": true, 1944 | "_N$content": { 1945 | "__id__": 30 1946 | }, 1947 | "content": { 1948 | "__id__": 30 1949 | }, 1950 | "m_OuterScrollView": null, 1951 | "_id": "16R+UVZWxJwYAQy2tga/od" 1952 | }, 1953 | { 1954 | "__type__": "cc.Mask", 1955 | "_name": "", 1956 | "_objFlags": 0, 1957 | "node": { 1958 | "__id__": 6 1959 | }, 1960 | "_enabled": true, 1961 | "_srcBlendFactor": 770, 1962 | "_dstBlendFactor": 771, 1963 | "_spriteFrame": null, 1964 | "_type": 0, 1965 | "_segments": 64, 1966 | "_N$alphaThreshold": 1, 1967 | "_N$inverted": false, 1968 | "_id": "ae870kiqNHopka55f3swpe" 1969 | }, 1970 | { 1971 | "__type__": "cc.Sprite", 1972 | "_name": "", 1973 | "_objFlags": 0, 1974 | "node": { 1975 | "__id__": 5 1976 | }, 1977 | "_enabled": true, 1978 | "_srcBlendFactor": 770, 1979 | "_dstBlendFactor": 771, 1980 | "_spriteFrame": { 1981 | "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" 1982 | }, 1983 | "_type": 1, 1984 | "_sizeMode": 0, 1985 | "_fillType": 0, 1986 | "_fillCenter": { 1987 | "__type__": "cc.Vec2", 1988 | "x": 0, 1989 | "y": 0 1990 | }, 1991 | "_fillStart": 0, 1992 | "_fillRange": 0, 1993 | "_isTrimmedMode": true, 1994 | "_state": 0, 1995 | "_atlas": null, 1996 | "_id": "1eU4lWhopPBK5K0ETW88jO" 1997 | }, 1998 | { 1999 | "__type__": "cf479BP95xBxbLSGJP029QO", 2000 | "_name": "", 2001 | "_objFlags": 0, 2002 | "node": { 2003 | "__id__": 5 2004 | }, 2005 | "_enabled": true, 2006 | "horizontal": false, 2007 | "vertical": true, 2008 | "inertia": true, 2009 | "brake": 0.5, 2010 | "elastic": true, 2011 | "bounceDuration": 1, 2012 | "scrollEvents": [], 2013 | "cancelInnerEvents": true, 2014 | "_N$content": { 2015 | "__id__": 7 2016 | }, 2017 | "content": { 2018 | "__id__": 7 2019 | }, 2020 | "m_InnerScrollViews": [ 2021 | { 2022 | "__id__": 27 2023 | }, 2024 | { 2025 | "__id__": 40 2026 | } 2027 | ], 2028 | "m_PlanDir": 0, 2029 | "m_ScrollingInnerSv": null, 2030 | "_id": "74iDa69aBFaKtCfw2s4vWE" 2031 | }, 2032 | { 2033 | "__type__": "cc.Node", 2034 | "_name": "Btn_GiveStar", 2035 | "_objFlags": 0, 2036 | "_parent": { 2037 | "__id__": 2 2038 | }, 2039 | "_children": [ 2040 | { 2041 | "__id__": 45 2042 | }, 2043 | { 2044 | "__id__": 47 2045 | } 2046 | ], 2047 | "_active": true, 2048 | "_level": 0, 2049 | "_components": [ 2050 | { 2051 | "__id__": 49 2052 | }, 2053 | { 2054 | "__id__": 50 2055 | } 2056 | ], 2057 | "_prefab": null, 2058 | "_opacity": 255, 2059 | "_color": { 2060 | "__type__": "cc.Color", 2061 | "r": 255, 2062 | "g": 255, 2063 | "b": 255, 2064 | "a": 255 2065 | }, 2066 | "_contentSize": { 2067 | "__type__": "cc.Size", 2068 | "width": 200, 2069 | "height": 80 2070 | }, 2071 | "_anchorPoint": { 2072 | "__type__": "cc.Vec2", 2073 | "x": 0.5, 2074 | "y": 0.5 2075 | }, 2076 | "_position": { 2077 | "__type__": "cc.Vec3", 2078 | "x": 0, 2079 | "y": -539, 2080 | "z": 0 2081 | }, 2082 | "_scale": { 2083 | "__type__": "cc.Vec3", 2084 | "x": 1, 2085 | "y": 1, 2086 | "z": 1 2087 | }, 2088 | "_rotationX": 0, 2089 | "_rotationY": 0, 2090 | "_quat": { 2091 | "__type__": "cc.Quat", 2092 | "x": 0, 2093 | "y": 0, 2094 | "z": 0, 2095 | "w": 1 2096 | }, 2097 | "_skewX": 0, 2098 | "_skewY": 0, 2099 | "_zIndex": 0, 2100 | "groupIndex": 0, 2101 | "_id": "b5K7jlQKlNBIEokRhg3Dmu" 2102 | }, 2103 | { 2104 | "__type__": "cc.Node", 2105 | "_name": "Label", 2106 | "_objFlags": 0, 2107 | "_parent": { 2108 | "__id__": 44 2109 | }, 2110 | "_children": [], 2111 | "_active": true, 2112 | "_level": 0, 2113 | "_components": [ 2114 | { 2115 | "__id__": 46 2116 | } 2117 | ], 2118 | "_prefab": null, 2119 | "_opacity": 255, 2120 | "_color": { 2121 | "__type__": "cc.Color", 2122 | "r": 255, 2123 | "g": 0, 2124 | "b": 0, 2125 | "a": 255 2126 | }, 2127 | "_contentSize": { 2128 | "__type__": "cc.Size", 2129 | "width": 518, 2130 | "height": 100 2131 | }, 2132 | "_anchorPoint": { 2133 | "__type__": "cc.Vec2", 2134 | "x": 0.5, 2135 | "y": 0.5 2136 | }, 2137 | "_position": { 2138 | "__type__": "cc.Vec3", 2139 | "x": 0, 2140 | "y": 109, 2141 | "z": 0 2142 | }, 2143 | "_scale": { 2144 | "__type__": "cc.Vec3", 2145 | "x": 1, 2146 | "y": 1, 2147 | "z": 1 2148 | }, 2149 | "_rotationX": 0, 2150 | "_rotationY": 0, 2151 | "_quat": { 2152 | "__type__": "cc.Quat", 2153 | "x": 0, 2154 | "y": 0, 2155 | "z": 0, 2156 | "w": 1 2157 | }, 2158 | "_skewX": 0, 2159 | "_skewY": 0, 2160 | "_zIndex": 0, 2161 | "groupIndex": 0, 2162 | "_id": "30cE+ufilIabMUHnUrUpxK" 2163 | }, 2164 | { 2165 | "__type__": "cc.Label", 2166 | "_name": "", 2167 | "_objFlags": 0, 2168 | "node": { 2169 | "__id__": 45 2170 | }, 2171 | "_enabled": true, 2172 | "_srcBlendFactor": 1, 2173 | "_dstBlendFactor": 771, 2174 | "_useOriginalSize": false, 2175 | "_string": "建议在Github中Star标记。\n会随着Creator版本兼容更新。", 2176 | "_N$string": "建议在Github中Star标记。\n会随着Creator版本兼容更新。", 2177 | "_fontSize": 36, 2178 | "_lineHeight": 50, 2179 | "_enableWrapText": false, 2180 | "_N$file": null, 2181 | "_isSystemFontUsed": true, 2182 | "_spacingX": 0, 2183 | "_N$horizontalAlign": 1, 2184 | "_N$verticalAlign": 1, 2185 | "_N$fontFamily": "Arial", 2186 | "_N$overflow": 1, 2187 | "_id": "62WAZtCZlGIauIJgMYBKLi" 2188 | }, 2189 | { 2190 | "__type__": "cc.Node", 2191 | "_name": "Label", 2192 | "_objFlags": 0, 2193 | "_parent": { 2194 | "__id__": 44 2195 | }, 2196 | "_children": [], 2197 | "_active": true, 2198 | "_level": 0, 2199 | "_components": [ 2200 | { 2201 | "__id__": 48 2202 | } 2203 | ], 2204 | "_prefab": null, 2205 | "_opacity": 255, 2206 | "_color": { 2207 | "__type__": "cc.Color", 2208 | "r": 255, 2209 | "g": 0, 2210 | "b": 0, 2211 | "a": 255 2212 | }, 2213 | "_contentSize": { 2214 | "__type__": "cc.Size", 2215 | "width": 300, 2216 | "height": 100 2217 | }, 2218 | "_anchorPoint": { 2219 | "__type__": "cc.Vec2", 2220 | "x": 0.5, 2221 | "y": 0.5 2222 | }, 2223 | "_position": { 2224 | "__type__": "cc.Vec3", 2225 | "x": 0, 2226 | "y": 0, 2227 | "z": 0 2228 | }, 2229 | "_scale": { 2230 | "__type__": "cc.Vec3", 2231 | "x": 1, 2232 | "y": 1, 2233 | "z": 1 2234 | }, 2235 | "_rotationX": 0, 2236 | "_rotationY": 0, 2237 | "_quat": { 2238 | "__type__": "cc.Quat", 2239 | "x": 0, 2240 | "y": 0, 2241 | "z": 0, 2242 | "w": 1 2243 | }, 2244 | "_skewX": 0, 2245 | "_skewY": 0, 2246 | "_zIndex": 0, 2247 | "groupIndex": 0, 2248 | "_id": "beOs/xRr9Og5i3tn0suYYb" 2249 | }, 2250 | { 2251 | "__type__": "cc.Label", 2252 | "_name": "", 2253 | "_objFlags": 0, 2254 | "node": { 2255 | "__id__": 47 2256 | }, 2257 | "_enabled": true, 2258 | "_srcBlendFactor": 1, 2259 | "_dstBlendFactor": 771, 2260 | "_useOriginalSize": false, 2261 | "_string": "To Github", 2262 | "_N$string": "To Github", 2263 | "_fontSize": 40, 2264 | "_lineHeight": 50, 2265 | "_enableWrapText": false, 2266 | "_N$file": null, 2267 | "_isSystemFontUsed": true, 2268 | "_spacingX": 0, 2269 | "_N$horizontalAlign": 1, 2270 | "_N$verticalAlign": 1, 2271 | "_N$fontFamily": "Arial", 2272 | "_N$overflow": 1, 2273 | "_id": "748RZ38jVAFrinrR1IsvAS" 2274 | }, 2275 | { 2276 | "__type__": "cc.Sprite", 2277 | "_name": "", 2278 | "_objFlags": 0, 2279 | "node": { 2280 | "__id__": 44 2281 | }, 2282 | "_enabled": true, 2283 | "_srcBlendFactor": 770, 2284 | "_dstBlendFactor": 771, 2285 | "_spriteFrame": { 2286 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 2287 | }, 2288 | "_type": 1, 2289 | "_sizeMode": 0, 2290 | "_fillType": 0, 2291 | "_fillCenter": { 2292 | "__type__": "cc.Vec2", 2293 | "x": 0, 2294 | "y": 0 2295 | }, 2296 | "_fillStart": 0, 2297 | "_fillRange": 0, 2298 | "_isTrimmedMode": true, 2299 | "_state": 0, 2300 | "_atlas": null, 2301 | "_id": "f9yfZWAQRAD7Fj14YR029P" 2302 | }, 2303 | { 2304 | "__type__": "cc.Button", 2305 | "_name": "", 2306 | "_objFlags": 0, 2307 | "node": { 2308 | "__id__": 44 2309 | }, 2310 | "_enabled": true, 2311 | "transition": 2, 2312 | "pressedColor": { 2313 | "__type__": "cc.Color", 2314 | "r": 255, 2315 | "g": 255, 2316 | "b": 255, 2317 | "a": 255 2318 | }, 2319 | "hoverColor": { 2320 | "__type__": "cc.Color", 2321 | "r": 255, 2322 | "g": 255, 2323 | "b": 255, 2324 | "a": 255 2325 | }, 2326 | "duration": 0.1, 2327 | "zoomScale": 1.2, 2328 | "clickEvents": [], 2329 | "_N$interactable": true, 2330 | "_N$enableAutoGrayEffect": false, 2331 | "_N$normalColor": { 2332 | "__type__": "cc.Color", 2333 | "r": 255, 2334 | "g": 255, 2335 | "b": 255, 2336 | "a": 255 2337 | }, 2338 | "_N$disabledColor": { 2339 | "__type__": "cc.Color", 2340 | "r": 255, 2341 | "g": 255, 2342 | "b": 255, 2343 | "a": 255 2344 | }, 2345 | "_N$normalSprite": { 2346 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 2347 | }, 2348 | "_N$pressedSprite": { 2349 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 2350 | }, 2351 | "pressedSprite": { 2352 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 2353 | }, 2354 | "_N$hoverSprite": { 2355 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 2356 | }, 2357 | "hoverSprite": { 2358 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 2359 | }, 2360 | "_N$disabledSprite": { 2361 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 2362 | }, 2363 | "_N$target": { 2364 | "__id__": 44 2365 | }, 2366 | "_id": "e5H0GTVLZAKqUF24N4di2R" 2367 | }, 2368 | { 2369 | "__type__": "cc.Canvas", 2370 | "_name": "", 2371 | "_objFlags": 0, 2372 | "node": { 2373 | "__id__": 2 2374 | }, 2375 | "_enabled": true, 2376 | "_designResolution": { 2377 | "__type__": "cc.Size", 2378 | "width": 750, 2379 | "height": 1334 2380 | }, 2381 | "_fitWidth": false, 2382 | "_fitHeight": true, 2383 | "_id": "14swW5YzlAg6lVvYV9oKa0" 2384 | }, 2385 | { 2386 | "__type__": "dbc33692vZPmI1XAuYWptj8", 2387 | "_name": "", 2388 | "_objFlags": 0, 2389 | "node": { 2390 | "__id__": 2 2391 | }, 2392 | "_enabled": true, 2393 | "m_Btn_A": { 2394 | "__id__": 12 2395 | }, 2396 | "m_Btn_B": { 2397 | "__id__": 24 2398 | }, 2399 | "m_Btn_C": { 2400 | "__id__": 37 2401 | }, 2402 | "m_Btn_GiveStar": { 2403 | "__id__": 50 2404 | }, 2405 | "_id": "69v2PalMNH84seiRjCv1fS" 2406 | } 2407 | ] -------------------------------------------------------------------------------- /assets/Scene/Main.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "55cd1fb1-3022-425a-a191-464d127334fb", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /assets/Script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Script/NestableScrollView_Inner.js: -------------------------------------------------------------------------------- 1 | // 2 | // 可嵌套的ScrollView。ccc2.0+上可用(ccc1.9+已放入分支), 若之后新版本不可用, 请在github上联系我。 3 | // 开源地址:https://github.com/NRatel/CCC-NestableScrollView 4 | // 挂在嵌套内层ScrollView上 5 | // 6 | cc.Class({ 7 | extends: cc.ScrollView, 8 | 9 | properties: { 10 | m_OuterScrollView: { 11 | default: null, 12 | visible: false, 13 | } 14 | }, 15 | 16 | setOuterScrollView(outer) { 17 | this.m_OuterScrollView = outer; 18 | }, 19 | 20 | //#region 重写cc.ScrollView的方法 21 | _onTouchMoved: function (event, captureListeners) { 22 | if (!this.enabledInHierarchy) return; 23 | if (this._hasNestedViewGroup(event, captureListeners)) return; 24 | 25 | var touch = event.touch; 26 | var deltaMove = touch.getLocation().sub(touch.getStartLocation()); 27 | 28 | if (this.content) { 29 | if (!this.m_OuterScrollView.isDifferentBetweenSettingAndPlan(this)) { 30 | this._handleMoveLogic(touch); 31 | } 32 | } 33 | 34 | if (!this.cancelInnerEvents) { 35 | return; 36 | } 37 | 38 | if (deltaMove.mag() > 7) { 39 | if (!this._touchMoved && event.target !== this.node) { 40 | var cancelEvent = new cc.Event.EventTouch(event.getTouches(), event.bubbles); 41 | cancelEvent.type = cc.Node.EventType.TOUCH_CANCEL; 42 | cancelEvent.touch = event.touch; 43 | cancelEvent.simulate = true; 44 | event.target.dispatchEvent(cancelEvent); 45 | this._touchMoved = true; 46 | } 47 | } 48 | this._stopPropagationIfTargetIsMe(event); 49 | } 50 | //#endregion 51 | }); 52 | -------------------------------------------------------------------------------- /assets/Script/NestableScrollView_Inner.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "3770eb69-b1da-4ae0-a890-03049cf21061", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/NestableScrollView_Outer.js: -------------------------------------------------------------------------------- 1 | // 2 | // 可嵌套的ScrollView。ccc2.0+上可用(ccc1.9+已放入分支), 若之后新版本不可用, 请在github上联系我。 3 | // 开源地址:https://github.com/NRatel/CCC-NestableScrollView 4 | // 挂在嵌套外层ScrollView上 5 | // 6 | cc.Class({ 7 | extends: cc.ScrollView, 8 | 9 | properties: { 10 | m_InnerScrollViews: [require("NestableScrollView_Inner")], //挂内嵌的ScrollView 11 | m_PlanDir: { //计划方向, 本次滑动的目的方向。根据刚开始滑动的方向决定 0为不限制方向, 1为横, -1为纵 12 | default: null, 13 | visible: false, 14 | }, 15 | m_ScrollingInnerSv: { 16 | default: null, 17 | visible: false, 18 | }, 19 | }, 20 | 21 | onLoad: function () { 22 | this.m_PlanDir = null; 23 | this.m_InnerScrollViews.forEach(inner => { 24 | inner.setOuterScrollView(this); 25 | }); 26 | }, 27 | 28 | //是否为子物体 29 | //注意,这里递归, 如果child藏的太深, 可能影响效率。其实也还好,只是开始滑动时执行一次。 30 | _isHisChild(child, undeterminedParent) { 31 | if (child == undeterminedParent) { 32 | return true; 33 | } 34 | if (child.parent != null) { 35 | if (child.parent == undeterminedParent) { 36 | return true; 37 | } else { 38 | return this._isHisChild(child.parent, undeterminedParent); 39 | } 40 | } 41 | return false; 42 | }, 43 | 44 | //判断Target是否是InnerScrollView的子物体, 如果是,就返回这个InnerScrollView。 45 | //注意,这里遍历所有InnerScrollView, 如果InnerScrollView数量太多,可能影响效率。其实也还好,只是开始滑动时执行一次。 46 | _findScrollingInnerSv(target) { 47 | for (let i = 0; i < this.m_InnerScrollViews.length; i++) { 48 | let isHisChild = this._isHisChild(target, this.m_InnerScrollViews[i].node); 49 | if (isHisChild) { 50 | return this.m_InnerScrollViews[i]; 51 | } 52 | } 53 | return null; 54 | }, 55 | 56 | //检查实际与计划方向的一致性 57 | isDifferentBetweenSettingAndPlan(sv) { 58 | if (this.m_PlanDir == 0) { 59 | return false; 60 | } 61 | if (this.m_PlanDir == 1 && sv.horizontal) { 62 | return false; 63 | } 64 | if (this.m_PlanDir == -1 && sv.vertical) { 65 | return false; 66 | } 67 | return true; 68 | }, 69 | 70 | //#region 重写cc.ScrollView的方法 71 | _hasNestedViewGroup: function (event, captureListeners) { 72 | if (event.eventPhase !== cc.Event.CAPTURING_PHASE) return; 73 | //不阻止out上onTouch事件执行。 74 | return false; 75 | }, 76 | 77 | _onTouchBegan: function (event, captureListeners) { 78 | if (!this.enabledInHierarchy) return; 79 | if (this._hasNestedViewGroup(event, captureListeners)) return; 80 | 81 | //重置计划方向 82 | this.m_PlanDir = null; 83 | this.m_ScrollingInnerSv = null; 84 | 85 | var touch = event.touch; 86 | if (this.content) { 87 | this._handlePressLogic(touch); 88 | } 89 | this._touchMoved = false; 90 | this._stopPropagationIfTargetIsMe(event); 91 | }, 92 | 93 | _onTouchMoved: function (event, captureListeners) { 94 | // 答疑:为什么确定 m_ScrollingInnerSv, 不用captureListeners, 而要用this._findScrollingInnerSv? 95 | // 因为,在子ScrollView上拖动时, captureListeners中并不包含该子ScrollView本身。 96 | // cc.log("----------------------------"); 97 | // captureListeners.forEach((captureListener) => { 98 | // cc.log(captureListener.name); 99 | // }); 100 | 101 | if (!this.enabledInHierarchy) return; 102 | if (this._hasNestedViewGroup(event, captureListeners)) return; 103 | 104 | var touch = event.touch; 105 | var deltaMove = touch.getLocation().sub(touch.getStartLocation()); 106 | 107 | //在滑动时, 设置开始时滑动的方向为计划方向 108 | //为什么在Outer中做这件事? 109 | //因为Outer的_onTouchMoved比Inner的早执行, 如果在Inner里做, Outer中就得忽略一帧,体验可能会不好。 110 | if (this.m_PlanDir == null && deltaMove.mag() > 7) { 111 | this.m_ScrollingInnerSv = this._findScrollingInnerSv(event.target); 112 | if (this.m_ScrollingInnerSv != null) { 113 | let contentSize = this.m_ScrollingInnerSv.content.getContentSize(); 114 | let scrollViewSize = this.m_ScrollingInnerSv.node.getContentSize(); 115 | if ((this.m_ScrollingInnerSv.vertical && (contentSize.height > scrollViewSize.height)) || (this.m_ScrollingInnerSv.horizontal && (contentSize.width > scrollViewSize.width))) { 116 | this.m_PlanDir = Math.abs(deltaMove.x) > Math.abs(deltaMove.y) ? 1 : -1; 117 | } else { 118 | this.m_PlanDir = 0; 119 | } 120 | } else { 121 | this.m_PlanDir = 0; 122 | } 123 | } 124 | 125 | if (this.content) { 126 | if (!this.isDifferentBetweenSettingAndPlan(this)) { 127 | this._handleMoveLogic(touch); 128 | } 129 | } 130 | 131 | if (!this.cancelInnerEvents) { 132 | return; 133 | } 134 | 135 | //只取消会捕获事件的直接子物体(如Button)上的事件 136 | if (this.m_ScrollingInnerSv == null) { 137 | if (deltaMove.mag() > 7) { 138 | if (!this._touchMoved && event.target !== this.node) { 139 | var cancelEvent = new cc.Event.EventTouch(event.getTouches(), event.bubbles); 140 | cancelEvent.type = cc.Node.EventType.TOUCH_CANCEL; 141 | cancelEvent.touch = event.touch; 142 | cancelEvent.simulate = true; 143 | event.target.dispatchEvent(cancelEvent); 144 | this._touchMoved = true; 145 | } 146 | } 147 | this._stopPropagationIfTargetIsMe(event); 148 | } 149 | }, 150 | //#endregion 151 | }); -------------------------------------------------------------------------------- /assets/Script/NestableScrollView_Outer.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "cf47904f-f79c-41c5-b2d2-1893f4dbd40e", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/TestBtnClick.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | m_Btn_A: cc.Button, 6 | m_Btn_B: cc.Button, 7 | m_Btn_C: cc.Button, 8 | m_Btn_GiveStar: cc.Button, 9 | }, 10 | 11 | // use this for initialization 12 | onLoad: function () { 13 | this.m_Btn_A.clickEvents.push(this.CreateCCEventHandler(this.node, "TestBtnClick", "OnBtnClick", null)); 14 | this.m_Btn_B.clickEvents.push(this.CreateCCEventHandler(this.node, "TestBtnClick", "OnBtnClick", null)); 15 | this.m_Btn_C.clickEvents.push(this.CreateCCEventHandler(this.node, "TestBtnClick", "OnBtnClick", null)); 16 | this.m_Btn_GiveStar.clickEvents.push(this.CreateCCEventHandler(this.node, "TestBtnClick", "OnBtnClick", null)); 17 | }, 18 | 19 | OnBtnClick(eventData) { 20 | if (eventData.target == this.m_Btn_A.node) { 21 | cc.log("OnBtnClick A"); 22 | } 23 | if (eventData.target == this.m_Btn_B.node) { 24 | cc.log("OnBtnClick B"); 25 | } 26 | if (eventData.target == this.m_Btn_C.node) { 27 | cc.log("OnBtnClick C"); 28 | } 29 | if (eventData.target == this.m_Btn_GiveStar.node){ 30 | cc.log("OnBtnClick GiveStar"); 31 | cc.sys.openURL("https://github.com/NRatel/CCC-NestableScrollView"); 32 | } 33 | }, 34 | 35 | CreateCCEventHandler(target, component, handlerName, customEventData) { 36 | let eventHandler = new cc.Component.EventHandler(); 37 | eventHandler.target = target; 38 | eventHandler.component = component; 39 | eventHandler.handler = handlerName; 40 | eventHandler.customEventData = customEventData; 41 | return eventHandler; 42 | } 43 | }); 44 | -------------------------------------------------------------------------------- /assets/Script/TestBtnClick.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "dbc33ebd-daf6-4f98-8d57-02e616a6d8fc", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /demonstration/demonstration.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NRatel/CCC-NestableScrollView/e6369dac337080eb3d4073578dd249f83cde00b1/demonstration/demonstration.gif -------------------------------------------------------------------------------- /project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos2d-html5", 3 | "packages": "packages" 4 | } --------------------------------------------------------------------------------