Skip to content

Commit

Permalink
Merge branch 'master' into feature/make_props_public
Browse files Browse the repository at this point in the history
  • Loading branch information
Haruma-K committed Aug 28, 2022
2 parents 4ea4a46 + 67938d1 commit f9c1afc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Carousel View for Unity uGUI using <a href="https://github.com/setchi/FancyScrollView">Fancy Scroll View</a>.

<p align="center">
<img width=700 src="https://user-images.githubusercontent.com/47441314/136406607-a3bc489f-2c77-40bc-bc6d-d2858f82a73c.gif" alt="Demo">
<img width="80%" src="https://user-images.githubusercontent.com/47441314/136406607-a3bc489f-2c77-40bc-bc6d-d2858f82a73c.gif" alt="Demo">
</p>

## Table of Contents
Expand Down Expand Up @@ -62,7 +62,7 @@ So you need to install both of them.
* https://github.com/Haruma-K/FancyCarouselView.git?path=/Assets/FancyCarouselView

<p align="center">
<img width=500 src="https://user-images.githubusercontent.com/47441314/118421190-97842b00-b6fb-11eb-9f94-4dc94e82367a.png" alt="Package Manager">
<img width="60%" src="https://user-images.githubusercontent.com/47441314/118421190-97842b00-b6fb-11eb-9f94-4dc94e82367a.png" alt="Package Manager">
</p>

Or, open Packages/manifest.json and add the following to the dependencies block.
Expand Down Expand Up @@ -211,7 +211,7 @@ If you implement your own class that derived from `CarouselProgressView` or `Cli
If you want to change only the color or size of the dot while using `DotCarouselProgressView`, you can do so by replacing only the Progress Element Prefab in the Inspector of `DotCarouselProgressView`.

<p align="center">
<img width=700 src="https://user-images.githubusercontent.com/47441314/143854073-ce7b5f99-22b8-438d-b6dc-44a2aa1eb52f.gif" alt="Custom Progress View">
<img width="80%" src="https://user-images.githubusercontent.com/47441314/143854073-ce7b5f99-22b8-438d-b6dc-44a2aa1eb52f.gif" alt="Custom Progress View">
</p>

#### Custom cell movements
Expand All @@ -233,23 +233,23 @@ protected override void OnPositionUpdated(float position)
```

<p align="center">
<img width=700 src="https://user-images.githubusercontent.com/47441314/136646317-d2138797-024a-44d4-af4c-b3d389972890.gif" alt="Demo">
<img width="80%" src="https://user-images.githubusercontent.com/47441314/136646317-d2138797-024a-44d4-af4c-b3d389972890.gif" alt="Demo">
</p>

#### Use with scroll view
When you use the carousel view as the content of the scroll view, the carousel view blocks the dragging of the scroll view according to the Unity specification.
In other words, dragging the carousel view will not scroll the scroll view.

<p align="center">
<img width=600 src="https://user-images.githubusercontent.com/47441314/139780467-5678bf8a-fe4b-46d4-a8e6-34c66c24d4f2.gif" alt="Demo">
<img width="70%" src="https://user-images.githubusercontent.com/47441314/139780467-5678bf8a-fe4b-46d4-a8e6-34c66c24d4f2.gif" alt="Demo">
</p>

In such a case, attach the `Scroll Event Propagator` component to the Carousel View GameObject.
This component will propagate drag events to the parent `ScrollRect` properly.
As a result, the scroll view and carousel view will work properly as shown below.

<p align="center">
<img width=600 src="https://user-images.githubusercontent.com/47441314/139779762-13e992e1-ccc6-4819-a283-9ec5a79ce4e9.gif" alt="Demo">
<img width="70%" src="https://user-images.githubusercontent.com/47441314/139779762-13e992e1-ccc6-4819-a283-9ec5a79ce4e9.gif" alt="Demo">
</p>

## License
Expand Down
12 changes: 6 additions & 6 deletions README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a href="https://github.com/setchi/FancyScrollView">Fancy Scroll View</a>を使用した、UnityのuGUI用のカルーセルビューです。

<p align="center">
<img width=700 src="https://user-images.githubusercontent.com/47441314/136406607-a3bc489f-2c77-40bc-bc6d-d2858f82a73c.gif" alt="Demo">
<img width="80%" src="https://user-images.githubusercontent.com/47441314/136406607-a3bc489f-2c77-40bc-bc6d-d2858f82a73c.gif" alt="Demo">
</p>

## 目次
Expand Down Expand Up @@ -62,7 +62,7 @@ Fancy Carousel Viewは低レイヤー実装として<a href="https://github.com/
* https://github.com/Haruma-K/FancyCarouselView.git?path=/Assets/FancyCarouselView

<p align="center">
<img width=500 src="https://user-images.githubusercontent.com/47441314/118421190-97842b00-b6fb-11eb-9f94-4dc94e82367a.png" alt="Package Manager">
<img width="60%" src="https://user-images.githubusercontent.com/47441314/118421190-97842b00-b6fb-11eb-9f94-4dc94e82367a.png" alt="Package Manager">
</p>

あるいはPackages/manifest.jsonを開き、dependenciesブロックに以下を追記します。
Expand Down Expand Up @@ -212,7 +212,7 @@ Fancy Carousel Viewはカルーセルの進捗を表すプログレスビュー
`DotCarouselProgressView`のInspectorからProgress Element Prefabだけを差し替えることで実現できます。

<p align="center">
<img width=600 src="https://user-images.githubusercontent.com/47441314/143854073-ce7b5f99-22b8-438d-b6dc-44a2aa1eb52f.gif" alt="Custom Progress View">
<img width="70%" src="https://user-images.githubusercontent.com/47441314/143854073-ce7b5f99-22b8-438d-b6dc-44a2aa1eb52f.gif" alt="Custom Progress View">
</p>

#### セルの動きをカスタムする
Expand All @@ -234,7 +234,7 @@ protected override void OnPositionUpdated(float position)
```

<p align="center">
<img width=600 src="https://user-images.githubusercontent.com/47441314/136646317-d2138797-024a-44d4-af4c-b3d389972890.gif" alt="Demo">
<img width="70%" src="https://user-images.githubusercontent.com/47441314/136646317-d2138797-024a-44d4-af4c-b3d389972890.gif" alt="Demo">
</p>

#### スクロールビューと併せて使う
Expand All @@ -243,15 +243,15 @@ Unityの仕様によりカルーセルビューがスクロールビューのド
すなわち、カルーセルビューをドラッグしてもスクロールビューはスクロールしません。

<p align="center">
<img width=600 src="https://user-images.githubusercontent.com/47441314/139780467-5678bf8a-fe4b-46d4-a8e6-34c66c24d4f2.gif" alt="Demo">
<img width="70%" src="https://user-images.githubusercontent.com/47441314/139780467-5678bf8a-fe4b-46d4-a8e6-34c66c24d4f2.gif" alt="Demo">
</p>

このような場合にはカルーセルビューのGameObjectに`Scroll Event Propagator`コンポーネントをアタッチします。
このコンポーネントはドラッグイベントを適切に親の`ScrollRect`に伝播します。
結果として以下のようにスクロールビューとカルーセルビューが適切に動作します。

<p align="center">
<img width=600 src="https://user-images.githubusercontent.com/47441314/139779762-13e992e1-ccc6-4819-a283-9ec5a79ce4e9.gif" alt="Demo">
<img width="70%" src="https://user-images.githubusercontent.com/47441314/139779762-13e992e1-ccc6-4819-a283-9ec5a79ce4e9.gif" alt="Demo">
</p>

## ライセンス
Expand Down

0 comments on commit f9c1afc

Please sign in to comment.