Guidebook

Guidebook

6M Downloads

[Suggestion] Allow for displaying user keybinds/controls

TomaszewskiPatryk opened this issue ยท 1 comments

commented

Let's suppose you are making a guidebook which is supposed to introduce the player to a mod or a new mechanic. Somewhere in the book, you'll probably have something similar to "You can open the GUI using the G button."
Now, what if player already (maybe accidentaly) changed this keybind? Or what if you want to make a guidebook that works between modpacks? This would cause a lot of problems and confusion.
And writing something along the lines of "You can open the GUI using button that you can assign in Controls menu under name 'Open GUI'." isn't ideal either.

However, that could all be fixed if we had an element which value is always equal to the actuall keybind.
You just have to give it the keybind id and it will display the key as text automatically.
(Maybe even it being a link which takes you to the appropriate keybind in controls menu? That would be hard to code, though.)

Also, it would be perfect if we could make a condition "if keyind is set", to replace "You can open the GUI using the None button." with a nicer text.

commented

Actually, I decided to write it myself.
Later I will create a pull request, but before that, I might implement some conditions from #73.