@quenty/inputobjectutils 2.0.3-canary.256.edbbcfc.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [2.0.3-canary.256.edbbcfc.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/inputobjectutils@2.0.2...@quenty/inputobjectutils@2.0.3-canary.256.edbbcfc.0) (2022-03-27)
6
+ # [3.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/inputobjectutils@2.1.0...@quenty/inputobjectutils@3.0.0) (2022-05-21)
7
+
8
+ **Note:** Version bump only for package @quenty/inputobjectutils
9
+
10
+
11
+
12
+
13
+
14
+ # [2.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/inputobjectutils@2.0.2...@quenty/inputobjectutils@2.1.0) (2022-03-27)
7
15
 
8
16
  **Note:** Version bump only for package @quenty/inputobjectutils
9
17
 
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014-2021 Quenty
3
+ Copyright (c) 2014-2022 Quenty
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/inputobjectutils",
3
- "version": "2.0.3-canary.256.edbbcfc.0",
3
+ "version": "3.0.0",
4
4
  "description": "Provides utility functions involving input objects",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "edbbcfc38516772a791d50dc43cd6b304ffc4aff"
30
+ "gitHead": "9f7eaea7543c33c89d2e32c38491b13f9271f4f7"
31
31
  }
@@ -13,11 +13,17 @@ local MOUSE_USER_INPUT_TYPES = {
13
13
  [Enum.UserInputType.MouseMovement] = true;
14
14
  }
15
15
 
16
+ local MOUSE_BUTTON_USER_INPUT_TYPES = {
17
+ [Enum.UserInputType.MouseButton1] = true;
18
+ [Enum.UserInputType.MouseButton2] = true;
19
+ [Enum.UserInputType.MouseButton3] = true;
20
+ }
21
+
16
22
  --[=[
17
23
  Returns whether a user input type involves the mouse.
18
24
 
19
25
  @param userInputType UserInputType
20
- @return true
26
+ @return boolean
21
27
  ]=]
22
28
  function InputObjectUtils.isMouseUserInputType(userInputType)
23
29
  assert(typeof(userInputType) == "EnumItem", "Bad userInputType")
@@ -25,6 +31,18 @@ function InputObjectUtils.isMouseUserInputType(userInputType)
25
31
  return MOUSE_USER_INPUT_TYPES[userInputType] or false
26
32
  end
27
33
 
34
+ --[=[
35
+ Returns whether a user input type is a mouse button specifically.
36
+
37
+ @param userInputType UserInputType
38
+ @return boolean
39
+ ]=]
40
+ function InputObjectUtils.isMouseButtonInputType(userInputType)
41
+ assert(typeof(userInputType) == "EnumItem", "Bad userInputType")
42
+
43
+ return MOUSE_BUTTON_USER_INPUT_TYPES[userInputType] or false
44
+ end
45
+
28
46
  --[=[
29
47
  Compares the two input objects and determines if they are the same thing. For example,
30
48
  a finger being dragged across a screen, or a mouse input being used as a cursor.