picturescrollviewer - eisclimber/ExPresS-XR GitHub Wiki
Class in ExPresSXR.Presentation.Pictures
Inherits from UnityEngine.MonoBehaviour
Allows scrolling through a set of pictures interactively.
public class PictureScrollViewer : MonoBehaviour| Name | Description |
|---|---|
| OnAutoScrollActive | Emitted when auto scrolling was activated, providing the values for scrolling left and right respectively. |
| OnAutoScrollInactive | Emitted when auto scrolling was deactivated. |
| OnPictureDataAdded | Emitted when the picture data was changed to a not-null value. |
| OnPictureDataChanged | Emitted when the picture data changes. |
| OnPictureDataRemoved | Emitted when the picture data was changed to null. |
| OnPicturesEndReached | Emitted when the scrolling reached the end. |
| OnPicturesMidReached | Emitted when scrolling to a midpoint (not start or end). |
| OnPictureSnapped | Emitted when snapping to a picture. Requires ScrollType set to PictureSnap. |
| OnPicturesStartReached | Emitted when the scrolling reached the start. |
| Name | Description |
|---|---|
| AddDeltaScrollRectOffset(float) | Adds the given delta offset to the scroll. |
| ChangeScrollValue(float,bool) | Sets the current scroll value and optionally controlling the slider too. |
| InternalUpdatePictureData() | Internally use to update the picture data in the editor. |
| ScrollManualLeft() | Scrolls a bit to the left. |
| ScrollManualRight() | Scrolls a bit to the right. |
| Name | Description |
|---|---|
| AutoScrollDuration | Duration in seconds it takes when (auto) scrolling from side to side. _scrollType must be set to ScrollType.ConstantDuration. |
| AutoScrollLeft | If true, enabled will automatically scroll left. If AutoScrollRight is also enabled, scrolling will be stopped. |
| AutoScrollRight | If true, enabled will automatically scroll right. If AutoScrollLeft is also enabled, scrolling will be stopped. |
| AutoScrollSpeed | Speed in pixel per seconds when (auto) scrolling from side to side. _scrollType must be set to ScrollType.ConstantSpeed. |
| ContentWidth | Calculated width of the displayed images. Zero if no picture data exists. |
| HasPictureData | The viewer hold any picture data. |
| NumPictures | Number of pictures in the current picture data. Zero if no picture data exists. |
| PictureData | Current picture data currently displayed. |
| Pictures | A list of the sprites displaying the pictures. An empty array if no picture data exists. |
| PictureSnapDuration | Duration in seconds a single picture is shown when (auto) scrolling from left to right. _scrollType must be set to ScrollType.PictureSnap. |
| ScrollBehavior | Mode how (automatic) scrolls behave. Both ConstantDuration and ConstantSpeed scroll smooth while PictureSnap snaps to each picture. |