Link to proposal: https://bosonhuang.com/2019/10/31/engine-system-proposal/
Link to Advanced User Input1: https://bosonhuang.com/2019/11/03/advanced-user-input/
Summary of works:
- Clarify the overall structure
- Modify names to make files easier to read, add comments to some functions
- Restructure the update function to fix the release event bug
- Add more helper functions and easier to use
- Make the delegate handler template
- Support member function binding
- Support axis binding with static / member function
|AdvancedUserInput||The core structs to help user use input tools, read input data|
|ActionBinding||Some input involves only one key|
|AxisBinding||Some input involves two keys|
|EInputType||Different input event for action binding|
|KeyCodes||Available keys in the keyboard|
|IDelegateHandler||Interface for all delegates|
|StaticFuncDelegate||Static function delegate, return void, input parameter can be null|
|MemberFuncDelegate||Member function delegate, return void, input parameter can be null|
Overall tests framework
Template type Delegate Handler
I will only show part of the delegate class and explain how the template work a little bit.
The following code is MemberFuncDelegate class.
It is a template class, T is the class type. “…ParamType” allows user to type in more than one parameter type or no parameter. Such as in the following code pieces, I called the
MemberFuncDelegate<T, float>::CreateMemberDelegate(i_ptr, i_func)
to create a
It is an interface pointer. The “T” is decided when the user actually pass in a class instance. So, I stored a member function with void return and float input in this interface pointer.
I did not test if the passed in function have more than one input parameter will trigger an assert or not.
- Add more helper functions
- Read human-readable files to project, use handle to handle it
- Try implement Multi-cast binding
- Try implement IT_DoubleClick
- Try implement let player modify the key binding