@@ -147,14 +147,14 @@ void ResetBoxRect(){
147147
148148 void BeginSelection ( ) {
149149 // Click somewhere in the Game View.
150- if ( ! Input . GetMouseButtonDown ( 0 ) )
150+ if ( ! UIExtensionsInputManager . GetMouseButtonDown ( 0 ) )
151151 return ;
152152
153153 //The boxRect will be inactive up until the point we start selecting
154154 boxRect . gameObject . SetActive ( true ) ;
155155
156156 // Get the initial click position of the mouse.
157- origin = new Vector2 ( Input . mousePosition . x , Input . mousePosition . y ) ;
157+ origin = new Vector2 ( UIExtensionsInputManager . MousePosition . x , UIExtensionsInputManager . MousePosition . y ) ;
158158
159159 //If the initial click point is not inside the selection mask, we abort the selection
160160 if ( ! PointIsValidAgainstSelectionMask ( origin ) ) {
@@ -185,7 +185,7 @@ void BeginSelection(){
185185 selectableList . Add ( selectable ) ;
186186
187187 //We're using left shift to act as the "Add To Selection" command. So if left shift isn't pressed, we want everything to begin deselected
188- if ( ! Input . GetKey ( KeyCode . LeftShift ) ) {
188+ if ( ! UIExtensionsInputManager . GetKey ( KeyCode . LeftShift ) ) {
189189 selectable . selected = false ;
190190 }
191191 }
@@ -211,7 +211,7 @@ bool PointIsValidAgainstSelectionMask(Vector2 screenPoint){
211211
212212 IBoxSelectable GetSelectableAtMousePosition ( ) {
213213 //Firstly, we cannot click on something that is not inside the selection mask (if we have one)
214- if ( ! PointIsValidAgainstSelectionMask ( Input . mousePosition ) ) {
214+ if ( ! PointIsValidAgainstSelectionMask ( UIExtensionsInputManager . MousePosition ) ) {
215215 return null ;
216216 }
217217
@@ -227,7 +227,7 @@ IBoxSelectable GetSelectableAtMousePosition() {
227227
228228 //Once we've found the rendering camera, we check if the selectables rectTransform contains the click. That way we
229229 //Can click anywhere on a rectTransform to select it.
230- if ( RectTransformUtility . RectangleContainsScreenPoint ( rectTransform , Input . mousePosition , screenCamera ) ) {
230+ if ( RectTransformUtility . RectangleContainsScreenPoint ( rectTransform , UIExtensionsInputManager . MousePosition , screenCamera ) ) {
231231
232232 //And if it does, we select it and send it back
233233 return selectable ;
@@ -240,7 +240,7 @@ IBoxSelectable GetSelectableAtMousePosition() {
240240 var selectableScreenPoint = GetScreenPointOfSelectable ( selectable ) ;
241241
242242 //Check that the click fits within the screen-radius of the selectable
243- if ( Vector2 . Distance ( selectableScreenPoint , Input . mousePosition ) <= radius ) {
243+ if ( Vector2 . Distance ( selectableScreenPoint , UIExtensionsInputManager . MousePosition ) <= radius ) {
244244
245245 //And if it does, we select it and send it back
246246 return selectable ;
@@ -255,11 +255,11 @@ IBoxSelectable GetSelectableAtMousePosition() {
255255
256256 void DragSelection ( ) {
257257 //Return if we're not dragging or if the selection has been aborted (BoxRect disabled)
258- if ( ! Input . GetMouseButton ( 0 ) || ! boxRect . gameObject . activeSelf )
258+ if ( ! UIExtensionsInputManager . GetMouseButton ( 0 ) || ! boxRect . gameObject . activeSelf )
259259 return ;
260260
261261 // Store the current mouse position in screen space.
262- Vector2 currentMousePosition = new Vector2 ( Input . mousePosition . x , Input . mousePosition . y ) ;
262+ Vector2 currentMousePosition = new Vector2 ( UIExtensionsInputManager . MousePosition . x , UIExtensionsInputManager . MousePosition . y ) ;
263263
264264 // How far have we moved the mouse?
265265 Vector2 difference = currentMousePosition - origin ;
@@ -414,7 +414,7 @@ public IBoxSelectable[] GetAllSelected(){
414414
415415 void EndSelection ( ) {
416416 //Get out if we haven't finished selecting, or if the selection has been aborted (boxRect disabled)
417- if ( ! Input . GetMouseButtonUp ( 0 ) || ! boxRect . gameObject . activeSelf )
417+ if ( ! UIExtensionsInputManager . GetMouseButtonUp ( 0 ) || ! boxRect . gameObject . activeSelf )
418418 return ;
419419
420420 clickedAfterDrag = GetSelectableAtMousePosition ( ) ;
0 commit comments