Jump to content

[Resolved]Key option in modinfo


Recommended Posts

Is it possible to create a key binding control in mod options just like the vanilla keyboard options "Options>Controls"? Just press a key then the key is detected.

key.png

Edited by xlsean
Link to comment
Share on other sites

3 hours ago, xlsean said:

Sorry, after I read through the code, I think I should enable the mod then the modconfigurationscreen class is hooked. The UI is exactly what I am asking for.

It is suggested that you follow the grammar, 1.use is_keylist or iskey in modinfo; 2. use Tony's file or my file, you only need to modimport better_keyconfig.lua

Link to comment
Share on other sites

8 hours ago, Rickzzs said:

It is suggested that you follow the grammar, 1.use is_keylist or iskey in modinfo; 2. use Tony's file or my file, you only need to modimport better_keyconfig.lua

Sounds good! I will postpone the plan since I think it is still a kind of hacking way tho. Thanks for sharing the idea.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...