File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -223,12 +223,21 @@ private void SetScrollContainerPosition()
223223 /// <summary>
224224 /// used for changing / updating between screen resolutions
225225 /// </summary>
226- public void UpdateLayout ( )
226+ public void UpdateLayout ( bool resetPositionToStart = false )
227227 {
228228 _lerp = false ;
229229 DistributePages ( ) ;
230+
231+ if ( resetPositionToStart )
232+ {
233+ _currentPage = StartingScreen ;
234+ }
235+
230236 if ( MaskArea )
237+ {
231238 UpdateVisible ( ) ;
239+ }
240+
232241 SetScrollContainerPosition ( ) ;
233242 OnCurrentScreenChange ( _currentPage ) ;
234243 }
Original file line number Diff line number Diff line change @@ -218,11 +218,21 @@ private void SetScrollContainerPosition()
218218 /// <summary>
219219 /// used for changing / updating between screen resolutions
220220 /// </summary>
221- public void UpdateLayout ( )
221+ public void UpdateLayout ( bool resetPositionToStart = false )
222222 {
223223 _lerp = false ;
224224 DistributePages ( ) ;
225- if ( MaskArea ) UpdateVisible ( ) ;
225+
226+ if ( resetPositionToStart )
227+ {
228+ _currentPage = StartingScreen ;
229+ }
230+
231+ if ( MaskArea )
232+ {
233+ UpdateVisible ( ) ;
234+ }
235+
226236 SetScrollContainerPosition ( ) ;
227237 OnCurrentScreenChange ( _currentPage ) ;
228238 }
You can’t perform that action at this time.
0 commit comments