-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Target Devices): Dynamically add Capability Mappings
- Selecting different target devices will dynamically add capability maps and target devices, based on the target gamepad device, ensuring every feature works out of the box. These will only be applied if the source capability has not already been mapped in the device profile.
- Loading branch information
Showing
12 changed files
with
254 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
extends Resource | ||
class_name InputPlumberTouchEvent | ||
|
||
@export var button: String | ||
@export var motion: InputPlumberTouchMotionEvent | ||
|
||
|
||
static func from_dict(dict: Dictionary) -> InputPlumberTouchEvent: | ||
var event := InputPlumberTouchEvent.new() | ||
if "button" in dict: | ||
event.button = dict["button"] | ||
if "motion" in dict: | ||
event.motion = InputPlumberTouchMotionEvent.from_dict(dict["motion"]) | ||
|
||
return event | ||
|
||
|
||
func to_dict() -> Dictionary: | ||
var dict := {} | ||
if self.button: | ||
dict["button"] = self.button | ||
if self.motion: | ||
dict["motion"] = self.motion.to_dict() | ||
|
||
return dict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
extends Resource | ||
class_name InputPlumberTouchMotionEvent | ||
|
||
@export var region: String | ||
@export var speed_pps: int | ||
|
||
|
||
static func from_dict(dict: Dictionary) -> InputPlumberTouchMotionEvent: | ||
var event := InputPlumberTouchMotionEvent.new() | ||
if "region" in dict: | ||
event.region = dict["region"] | ||
if "speed_pps" in dict: | ||
event.speed_pps = dict["speed_pps"] | ||
|
||
return event | ||
|
||
|
||
func to_dict() -> Dictionary: | ||
var dict := {} | ||
if self.region: | ||
dict["region"] = self.region | ||
if self.speed_pps: | ||
dict["speed_pps"] = self.speed_pps | ||
|
||
return dict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
extends Resource | ||
class_name InputPlumberTouchpadEvent | ||
|
||
@export var name: String | ||
@export var touch: InputPlumberTouchEvent | ||
|
||
|
||
static func from_dict(dict: Dictionary) -> InputPlumberTouchpadEvent: | ||
var event := InputPlumberTouchpadEvent.new() | ||
if "name" in dict: | ||
event.name = dict["name"] | ||
if "touch" in dict: | ||
var touch = InputPlumberTouchEvent.from_dict(dict["touch"]) | ||
event.touch = touch | ||
|
||
return event | ||
|
||
|
||
func to_dict() -> Dictionary: | ||
var dict := {} | ||
if self.name: | ||
dict["name"] = self.name | ||
if self.touch: | ||
dict["touch"] = self.touch.to_dict() | ||
|
||
return dict |
Oops, something went wrong.