| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This patch adds a new "formatter: (T) -> String" parameter to the AbstractSetting abstract class. This allows for formatter functions to be passed to settings for them to display their value in a more user friendly way :) A possible usage of this would be to replace the unit parameter, as it simply concatenates the unit string to the setting value, which is a bit misleading IMO.
We now show "$x presses" by using the newly added setting formatter
|
this is very similar to the unit parameter which is only suffix. yours can be any format. so if you want you can add some default formattings like "x ticks" or "x blocks" and remove unit. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This patch adds a new "formatter: (T) -> String" parameter to the
AbstractSetting abstract class. This allows for formatter functions to
be passed to settings for them to display their value in a more user
friendly way :)
A possible usage of this would be to replace the unit parameter, as it
simply concatenates the unit string to the setting value, which is a bit
misleading IMO.
P.S. This PR also includes an actual usage of this new parameter in the AntiDisconnect module