Link to proposal:

Link to Advanced User Input1:

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

Overall structure

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

Call bind function
The binding functions
Temporarily binding data
Run-time data for action binding
Run-time data for axis binding

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.

Next week:

  • 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