Commit Graph

262 Commits

Author SHA1 Message Date
ben hoffman
35daf13171 Deprecate the Input Editor pieces that reference Player Mappable Input Configs
#jira UE-175936
#prerflight 644ad724b208f61af83532af
#rb trivial

[CL 25225421 by ben hoffman in ue5-main branch]
2023-04-27 18:48:10 -04:00
jodon karlik
472b38353a Properly deprecate old IsDataValid for a new, const version with FDataValidationContext.
This allows your assets to warn on top of erroring out.

#jira UE-183475
#preflight 644ae7701c2846595cbe0e21

[CL 25224515 by jodon karlik in ue5-main branch]
2023-04-27 17:53:18 -04:00
ben hoffman
d38e2797c8 Deprecate the EI Blueprint Library functions to access player mappable slots
#jira UE-175936
#rb trivial
#rnx
#preflight 644ab08a09453df548701b84

[CL 25221263 by ben hoffman in ue5-main branch]
2023-04-27 15:10:11 -04:00
ben hoffman
d1c83dbd22 Correctly update the Display Category and AssociatedInputAction fields when creating a new player-made mapping.
#rb trivial
#rnx
[FYI] Michel.Champoux

[CL 25206567 by ben hoffman in ue5-main branch]
2023-04-26 16:41:11 -04:00
ben hoffman
084eca511d Modify how the OnKeyMappingRegistered function is called so that you can potentially modify the MappingRow from within it. Do this by keeping track of what mapping elements were updated and register them after the initial iteration of existing mappings.
#rb Michel.Champoux
#rnx
#preflight skip

[CL 25205645 by ben hoffman in ue5-main branch]
2023-04-26 15:58:14 -04:00
ben hoffman
7ed71e5338 Add a virtual OnKeyMappingRegistered function that will get called for each key mapping once it is registered with the Enhanced Input user settings. This is a good place to do any Post Initalize logic per key mapping. For example, you are upgrading to this system and already had a key mapping system in place, you can set the key here!
#rb Michel.Champoux
#rnx
#preflight skip

[CL 25202920 by ben hoffman in ue5-main branch]
2023-04-26 13:55:36 -04:00
ben hoffman
d67a263f4f Add some helper functions to the user settings to access the key profile
#rb trivial
#rnx
#preflight skip

[CL 25184510 by ben hoffman in ue5-main branch]
2023-04-25 13:51:48 -04:00
ben hoffman
2dedccb3e9 Expose LogEnhancedInput as part of the API so that it can be used in other modules
#rb trivial
#rnx
#preflight skip

[CL 25134603 by ben hoffman in ue5-main branch]
2023-04-20 15:28:36 -04:00
kirill zorin
d78d7d61ae Updating callsites of ToRawPtr{*}Unsafe in preparation for upcoming mutable TObjectPtr container restrictions.
#rb zousar.shaker
#preflight 64416b5f4f243417cd7c41d7

[CL 25130429 by kirill zorin in ue5-main branch]
2023-04-20 13:00:27 -04:00
kirill zorin
a469aafd78 Update callsites to prepare for upcoming TArray/TArrayView<TObjectPtr<...>> restrictions
#rb zousar.shaker
#rb devin.doucette
#rb steve.robb
#rb robert.manuszewski
#rb saam.barati
#preflight 643f4c09a35280ed4f53ccb3

[CL 25100071 by kirill zorin in ue5-main branch]
2023-04-18 22:39:29 -04:00
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