| | 1 | | namespace DCL.ECSComponents |
| | 2 | | { |
| | 3 | | public static class PBPointerEvents_Extensions |
| | 4 | | { |
| | 5 | | public static ActionButton GetButton(this PBPointerEvents.Types.Info self) |
| | 6 | | { |
| 0 | 7 | | return self.HasButton ? self.Button : ActionButton.Any; |
| | 8 | | } |
| | 9 | |
|
| | 10 | | public static string GetHoverText(this PBPointerEvents.Types.Info self) |
| | 11 | | { |
| 4 | 12 | | return self.HasHoverText ? self.HoverText : "Interact"; |
| | 13 | | } |
| | 14 | |
|
| | 15 | | public static float GetMaxDistance(this PBPointerEvents.Types.Info self) |
| | 16 | | { |
| 7 | 17 | | return self.HasMaxDistance ? self.MaxDistance : 10; |
| | 18 | | } |
| | 19 | |
|
| | 20 | | public static bool GetShowFeedback(this PBPointerEvents.Types.Info self) |
| | 21 | | { |
| 0 | 22 | | return !self.HasShowFeedback || self.ShowFeedback; |
| | 23 | | } |
| | 24 | | } |
| | 25 | | } |