Commit Graph

202 Commits

Author SHA1 Message Date
ben hoffman
119aaac9f9 Specify what asset is using the mapping name if one exists already, making it much easier to track down in use mappings :)
Add in a cvar 'EnhancedInput.Editor.EnableMappingNameValidation' to toggle name validation, just to make sure that we can do sanity checks that the validation is actually accurate

#rb nate.strohmyer
#rnx
#preflight 643712e90c4277fc0bce6fdf

[CL 25018938 by ben hoffman in ue5-main branch]
2023-04-12 19:29:49 -04:00
ben hoffman
1c84b5d6a4 Only broadcast the OnMappingContextRegistered delegate in the settings if it was successfully registered to all key profiles, not each time a mapping is added. Keep track of the hardware device that each mapping is in. This will allow you to have each hardware device in a unique slot!
#jira UE-182479
#rb justin.hare
#rb Michel.Champoux
#rnx
#preflight 64344012b4329f6f1aee63ea

[CL 24995388 by ben hoffman in ue5-main branch]
2023-04-11 14:38:31 -04:00
justin peterson
15fff01e33 [Backout] - CL24940453 - CIS Compile Error
[FYI] justin.peterson
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL24935839 - CIS EdTest Warning
[FYI] ben.hoffman
Original CL Desc
-----------------------------------------------------------------
Register IMC's to all saved key profiles instead of just the current only. Break out the registration of keys to a different function to allow us to re-register IMC's  when on serialize to ensure the mappings are up to date

#rb Jodon.Karlik
#rb Michel.Champoux
#rnx
#preflight skip

[CL 24951926 by justin peterson in ue5-main branch]
2023-04-06 15:01:53 -04:00
justin peterson
098f50e601 [Backout] - CL24935839 - CIS EdTest Warning
[FYI] ben.hoffman
Original CL Desc
-----------------------------------------------------------------
Register IMC's to all saved key profiles instead of just the current only. Break out the registration of keys to a different function to allow us to re-register IMC's  when on serialize to ensure the mappings are up to date

#rb Jodon.Karlik
#rb Michel.Champoux
#rnx
#preflight skip

[CL 24951911 by justin peterson in ue5-main branch]
2023-04-06 15:01:36 -04:00
ben hoffman
334168c028 Register IMC's to all saved key profiles instead of just the current only. Break out the registration of keys to a different function to allow us to re-register IMC's when on serialize to ensure the mappings are up to date
#rb Jodon.Karlik
#rb Michel.Champoux
#rnx
#preflight skip

[CL 24938094 by ben hoffman in ue5-main branch]
2023-04-05 18:00:07 -04:00
ben hoffman
1000f5f4a5 Serialize all customized keys, not just dirty ones. This fixes a bug where if you remap a key, save, exit, remap a different key, and save, then the first key wasn't being saved
#rb Michel.Champoux
#rb justin.hare
#rnx
#preflight skip

[CL 24915565 by ben hoffman in ue5-main branch]
2023-04-04 15:07:37 -04:00
ben hoffman
1216d08250 Add a "Experimental" display name to the user settings where you can enable/disable it.
#jira UE-182168
#rb trivial
#rnx
#preflight skip

[CL 24912890 by ben hoffman in ue5-main branch]
2023-04-04 12:42:25 -04:00
ben hoffman
d9598dabe8 Add a debug command to display the user's input settings. This will display all of the currently mapped keys by the player, what their default keys are, and if they are dirty or not.
Add another command to save the settings to a slot to make testing easier, without having to create some UI to do it in game

#rb none
#rnx
#preflight 6427068b472a24e5709c3fa9

[CL 24876610 by ben hoffman in ue5-main branch]
2023-03-31 15:19:48 -04:00
ben hoffman
dd6dc3f1de - Add some setters for Hardware device ID's on player mappable keys
- Initalize bIsDirty to false in the constructor
- Change IsCustomized to allow for the EKeys::Invalid key, which means that players can set a keybinding to "Unbound" if they desire. This means that the "CustomKey" will always be set to the default key now, and we check if it is different then the default key and not check it for validity
- Fix a few simple typos and make some structs final to make it impossible to subclass them, since it could risk serialization issues.

#rb trivial
#preflight 6426ddd49621ba9cb4aeece7

[FYI] Michel.Champoux

[CL 24872019 by ben hoffman in ue5-main branch]
2023-03-31 11:28:32 -04:00
ben hoffman
2ccd57c58c Make the EI user settings use just the local player instead of the input component so that it can be initalized earlier in the EI subsystem lifetime
#rb Michel.Champoux
#rnx
#preflight 6425def538075fa13ffeae34

[CL 24867864 by ben hoffman in ue5-main branch]
2023-03-31 02:42:28 -04:00
ben hoffman
44ba66999a [Backout] - CL24799736
[FYI] Michel.Champoux
Original CL Desc
-----------------------------------------------------------------
Exposed saving headers to allow subclasses access.
UpdateOriginalKey now sets the display category of a mapping.
Fixed Typos.

[FYI] [at]Ben.Hoffman

[CL 24867835 by ben hoffman in ue5-main branch]
2023-03-31 02:39:44 -04:00
nick edwards
442653b187 Uses of ::Sort/::StableSort replaced with Algo versions.
#preflight 6422f8d3710ec8400fc7471c
#jira none
#rb steve.robb

[CL 24818983 by nick edwards in ue5-main branch]
2023-03-28 10:56:46 -04:00
michel champoux
a8ca00cbf8 Exposed saving headers to allow subclasses access.
UpdateOriginalKey now sets the display category of a mapping.
Fixed Typos.

[FYI] [at]Ben.Hoffman

[CL 24799859 by michel champoux in ue5-main branch]
2023-03-27 02:02:50 -04:00
ben hoffman
9d5ad22071 Add an option to Query keys based on their slot
#rb trivial
#rnx
#pf trivial

[CL 24665387 by ben hoffman in ue5-main branch]
2023-03-15 19:44:02 -04:00
ben hoffman
aa76730cda Unshelved from pending changelist '24645662':
Add a display category FText to the Player Mappable keys to support all of the old features

#rb trivial
#rnx
#preflight 64121ec0924023147db1277d

[CL 24663465 by ben hoffman in ue5-main branch]
2023-03-15 18:02:38 -04:00
ben hoffman
56c8086c32 Fix for not being able to change player mappable key settings due to some incorrect post load logic
#rb nate.strohmyer
#rnx
#preflight skip

[CL 24660015 by ben hoffman in ue5-main branch]
2023-03-15 15:05:08 -04:00
ben hoffman
d3c01172d8 Make DoesMappingPassQueryOptions a public function so that UI generating code can use it
#rb trivial
#Rnx
#pf skip

[CL 24643908 by ben hoffman in ue5-main branch]
2023-03-14 16:47:48 -04:00
ben hoffman
4992f0a626 Add some querying options to the settings class that will allow us to filter down key mappings based on the current hardware device primary types and their supported features.
#jira UE-179200
#jira UE-169794

#rb justin.hare
#rb nate.strohmyer
#rb jodon.karlik

#preflight 640657575515f4f57bfb2c7b

[FYI] Michel.Champoux

[CL 24614317 by ben hoffman in ue5-main branch]
2023-03-13 12:18:59 -04:00
ben hoffman
fae7e937bc Make the pointer to the owning UPlayerInput object a weak pointer because that may change when the player controller changes. Instead, update that pointer whenever we get a new player controller to ensure that it is up to date.
#rb trivial
#rnx
#preflight 640b71f40e1f02786b0d9d3d

[CL 24601435 by ben hoffman in ue5-main branch]
2023-03-10 20:02:46 -05:00
RVillani
5172909c62 PR #9693: Hold triggers don't reset on mapping context changes (Contributed by RVillani)
This fixes an issue when comparing enhanced action mappings during RebuildControlMappings because we had made a deep copy of the modifiers and triggers arrays, so any time we compare a new instance to old instance it would return false no matter what.

#jira UE-168035
#jira UE-169967
#preflight 6408fa196e1dadfcda263fb7
#rb me

[CL 24568174 by RVillani in ue5-main branch]
2023-03-08 17:22:57 -05:00
ben hoffman
ca4fc0867b Allow for input injection based on a player key mapping name as well as a UInputAction pointer. We can do this by keeping track of the UInputAction* associated with each player mapping. Keep track of the owning Platform User ID of each player mappable key profile so that you can access the Local Player without needing to get the outer of the profile, which will be useful for custom profile subclasses.
Rename the templated version of the Get Key Profile template functions to GetKeyProfileAs to avoid compilation errors when using those functions

#jira UE-177249
#rb andy.davidson
#preflight 640654220c7df1967f252860

[CL 24542098 by ben hoffman in ue5-main branch]
2023-03-07 12:05:23 -05:00
ben hoffman
88cde04388 fix an ensure when binding settings delegates in enhanced input
#rb trivial
#rnx
#pf skip

[CL 24530963 by ben hoffman in ue5-main branch]
2023-03-06 16:41:54 -05:00
ben hoffman
b3a0c482d0 Check for a null local player when calling GetPlayerInput on the EI LP subsystem
#rb trivial
#rnx
#preflight skip

[CL 24529332 by ben hoffman in ue5-main branch]
2023-03-06 15:50:18 -05:00
ben hoffman
5285e3f906 Add a gameplay tag container to the player mappable key options to filter down key mappings based on the currently equipped key profile
#jira UE-169794
#rb trivial
#preflight 640271eb3206d45d20494504
#rnx

[CL 24525411 by ben hoffman in ue5-main branch]
2023-03-06 13:06:11 -05:00
ben hoffman
b5331db1d4 Move the templated GetUserSettings version to just the LP subsystem instead of the interface class
#rb Michel.Champoux
#rnx
#pf skip

[CL 24507854 by ben hoffman in ue5-main branch]
2023-03-03 17:03:49 -05:00