Project Zomboid

Project Zomboid

TchernoLib
Tchernobill  [developer] Jul 5, 2023 @ 5:34am
Keybind simple interface
add this at the start of your lua file
require 'UI/KeyBindMod'

call this at file load time.
KBM.addKeyBinding(category,nameValue,defaultKey)

parameters:
  1. category (string): expected within brackets, e.g '[UI]'.
  2. nameValue (string): used as keyword for access from the rest of the model. used as keyword (suffix) for translation, e.g 'Auto_Loot_Config' -> matches translation of 'UI_optionscreen_binding_Auto_Loot_Config'.
  3. defaultKey (Key / integer): see Keyboard definition. if nil, Keyboard.KEY_NONE will be used.

Exemple:
require 'UI/KeyBindMod' KBM.addKeyBinding('[UI]', 'Auto_Loot_Config', Keyboard.KEY_NONE) KBM.addKeyBinding('[UI]', 'Auto_Loot_Toggle')



Compatible with other interfaces. Credits to ModOptions
Compatible Solo and Multiplayer.
Last edited by Tchernobill; Jul 5, 2023 @ 5:40am