Skip to content

Commit

Permalink
Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
setchi committed Jan 18, 2020
1 parent 8e800c8 commit 4169c12
Show file tree
Hide file tree
Showing 53 changed files with 180 additions and 59 deletions.
2 changes: 1 addition & 1 deletion Samples~/Sources/01_Basic/Cell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example01
{
public class Cell : FancyCell<ItemData>
class Cell : FancyCell<ItemData>
{
[SerializeField] Animator animator = default;
[SerializeField] Text message = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/01_Basic/Example01.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example01
{
public class Example01 : MonoBehaviour
class Example01 : MonoBehaviour
{
[SerializeField] ScrollView scrollView = default;

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/01_Basic/ItemData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace FancyScrollView.Example01
{
public class ItemData
class ItemData
{
public string Message { get; }

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/01_Basic/ScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example01
{
public class ScrollView : FancyScrollView<ItemData>
class ScrollView : FancyScrollView<ItemData>
{
[SerializeField] Scroller scroller = default;
[SerializeField] GameObject cellPrefab = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/02_FocusOn/Cell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example02
{
public class Cell : FancyCell<ItemData, Context>
class Cell : FancyCell<ItemData, Context>
{
[SerializeField] Animator animator = default;
[SerializeField] Text message = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/02_FocusOn/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace FancyScrollView.Example02
{
public class Context
class Context
{
public int SelectedIndex = -1;
public Action<int> OnCellClicked;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/02_FocusOn/Example02.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace FancyScrollView.Example02
{
public class Example02 : MonoBehaviour
class Example02 : MonoBehaviour
{
[SerializeField] ScrollView scrollView = default;
[SerializeField] Button prevCellButton = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/02_FocusOn/ItemData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace FancyScrollView.Example02
{
public class ItemData
class ItemData
{
public string Message { get; }

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/02_FocusOn/ScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace FancyScrollView.Example02
{
public class ScrollView : FancyScrollView<ItemData, Context>
class ScrollView : FancyScrollView<ItemData, Context>
{
[SerializeField] Scroller scroller = default;
[SerializeField] GameObject cellPrefab = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/03_InfiniteScroll/Cell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example03
{
public class Cell : FancyCell<ItemData, Context>
class Cell : FancyCell<ItemData, Context>
{
[SerializeField] Animator animator = default;
[SerializeField] Text message = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/03_InfiniteScroll/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace FancyScrollView.Example03
{
public class Context
class Context
{
public int SelectedIndex = -1;
public Action<int> OnCellClicked;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/03_InfiniteScroll/Example03.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example03
{
public class Example03 : MonoBehaviour
class Example03 : MonoBehaviour
{
[SerializeField] ScrollView scrollView = default;

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/03_InfiniteScroll/ItemData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace FancyScrollView.Example03
{
public class ItemData
class ItemData
{
public string Message { get; }

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/03_InfiniteScroll/ScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace FancyScrollView.Example03
{
public class ScrollView : FancyScrollView<ItemData, Context>
class ScrollView : FancyScrollView<ItemData, Context>
{
[SerializeField] Scroller scroller = default;
[SerializeField] GameObject cellPrefab = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/04_Metaball/Background.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace FancyScrollView.Example04
{
public class Background : MonoBehaviour, IPointerClickHandler
class Background : MonoBehaviour, IPointerClickHandler
{
[SerializeField] Image background = default;
[SerializeField] ScrollView scrollView = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/04_Metaball/Cell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace FancyScrollView.Example04
{
[ExecuteInEditMode]
public class Cell : FancyCell<ItemData, Context>
class Cell : FancyCell<ItemData, Context>
{
[SerializeField] Animator scrollAnimator = default;
[SerializeField] Animator selectAnimator = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/04_Metaball/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example04
{
public class Context
class Context
{
public int SelectedIndex = -1;

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/04_Metaball/Example04.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace FancyScrollView.Example04
{
public class Example04 : MonoBehaviour
class Example04 : MonoBehaviour
{
[SerializeField] ScrollView scrollView = default;
[SerializeField] Button prevCellButton = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/04_Metaball/ItemData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace FancyScrollView.Example04
{
public class ItemData
class ItemData
{
public string Message { get; }

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/04_Metaball/ScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace FancyScrollView.Example04
{
public class ScrollView : FancyScrollView<ItemData, Context>
class ScrollView : FancyScrollView<ItemData, Context>
{
[SerializeField] Scroller scroller = default;
[SerializeField] GameObject cellPrefab = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/05_Voronoi/Background.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace FancyScrollView.Example05
{
public class Background : MonoBehaviour, IPointerClickHandler
class Background : MonoBehaviour, IPointerClickHandler
{
[SerializeField] Image background = default;
[SerializeField] ScrollView scrollView = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/05_Voronoi/Cell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace FancyScrollView.Example05
{
[ExecuteInEditMode]
public class Cell : FancyCell<ItemData, Context>
class Cell : FancyCell<ItemData, Context>
{
[SerializeField] Animator scrollAnimator = default;
[SerializeField] Animator selectAnimator = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/05_Voronoi/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example05
{
public class Context
class Context
{
public int SelectedIndex = -1;

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/05_Voronoi/Example05.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace FancyScrollView.Example05
{
public class Example05 : MonoBehaviour
class Example05 : MonoBehaviour
{
[SerializeField] ScrollView scrollView = default;
[SerializeField] Button prevCellButton = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/05_Voronoi/ItemData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace FancyScrollView.Example05
{
public class ItemData
class ItemData
{
public string Message { get; }

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/05_Voronoi/ScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace FancyScrollView.Example05
{
public class ScrollView : FancyScrollView<ItemData, Context>
class ScrollView : FancyScrollView<ItemData, Context>
{
[SerializeField] Scroller scroller = default;
[SerializeField] GameObject cellPrefab = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/06_LoopTabBar/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace FancyScrollView.Example06
{
public class Context
class Context
{
public int SelectedIndex = -1;
public Action<int> OnCellClicked;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/06_LoopTabBar/Example06.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace FancyScrollView.Example06
{
public class Example06 : MonoBehaviour
class Example06 : MonoBehaviour
{
[SerializeField] ScrollView scrollView = default;
[SerializeField] Text selectedItemInfo = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/06_LoopTabBar/ItemData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace FancyScrollView.Example06
{
public class ItemData
class ItemData
{
public string Message { get; }

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/06_LoopTabBar/ScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace FancyScrollView.Example06
{
public class ScrollView : FancyScrollView<ItemData, Context>
class ScrollView : FancyScrollView<ItemData, Context>
{
[SerializeField] Scroller scroller = default;
[SerializeField] GameObject cellPrefab = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/06_LoopTabBar/SlideScreenTransition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example06
{
public class SlideScreenTransition : MonoBehaviour
class SlideScreenTransition : MonoBehaviour
{
[SerializeField] RectTransform targetTransform = default;
[SerializeField] GraphicRaycaster graphicRaycaster = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/06_LoopTabBar/Tab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace FancyScrollView.Example06
{
public class Tab : FancyCell<ItemData, Context>
class Tab : FancyCell<ItemData, Context>
{
[SerializeField] Animator animator = default;
[SerializeField] Text message = default;
Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/06_LoopTabBar/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace FancyScrollView.Example06
{
public class Window : MonoBehaviour
class Window : MonoBehaviour
{
[SerializeField] SlideScreenTransition transition = default;

Expand Down
2 changes: 1 addition & 1 deletion Samples~/Sources/07_ScrollRect/Alignment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace FancyScrollView.Example07
{
public enum Alignment
enum Alignment
{
Upper,
Middle,
Expand Down
8 changes: 7 additions & 1 deletion Samples~/Sources/07_ScrollRect/Cell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@

namespace FancyScrollView.Example07
{
public class Cell : FancyScrollRectCell<ItemData, Context>
class Cell : FancyScrollRectCell<ItemData, Context>
{
[SerializeField] Text message = default;
[SerializeField] Image image = default;
[SerializeField] Button button = default;

public override void Initialize()
{
button.onClick.AddListener(() => Context.OnCellClicked?.Invoke(Index));
}

public override void UpdateContent(ItemData itemData)
{
Expand Down
45 changes: 45 additions & 0 deletions Samples~/Sources/07_ScrollRect/Cell.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 1865951358068953827}
- component: {fileID: 1865951358068953829}
- component: {fileID: 1865951358068953826}
- component: {fileID: 352471458600884356}
- component: {fileID: 1865951358068953828}
m_Layer: 5
m_Name: Cell
Expand Down Expand Up @@ -75,6 +76,49 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &352471458600884356
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1865951358068953824}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1865951358068953826}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1865951358068953828
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -89,6 +133,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
message: {fileID: 8720386530366365077}
image: {fileID: 1865951358068953826}
button: {fileID: 352471458600884356}
--- !u!1 &6700329325592271122
GameObject:
m_ObjectHideFlags: 0
Expand Down
Loading

0 comments on commit 4169c12

Please sign in to comment.