We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
可以把按键的事件传入回调里,这样子多个按键,按键里有多个事件,写起来就不需要那么多回调了。
The text was updated successfully, but these errors were encountered:
回调里会把整个handle都作为参数传进去了
Sorry, something went wrong.
如果按键数量很多,有十几二十个的话,一个个注册有点太麻烦。
可以添加一种注册方式,建一张注册表,里面包含Button,事件,回调函数,然后调用函数之间初始化整张表。
不是有一个state嘛,可以只写一个回调,再回调里判断这个state就行了
No branches or pull requests
可以把按键的事件传入回调里,这样子多个按键,按键里有多个事件,写起来就不需要那么多回调了。
The text was updated successfully, but these errors were encountered: