KeybindingHelper - 105-Code/SFS-Modloader GitHub Wiki

KeybindingHelper

Description

This class is used to add keybiding for building and world scenes.
Note: When you change the scene the keybiding will remove, so you need add again.

Events

There are not events for this class.

Properties

There are not properties for this class.

Public Methods

static void AddOnKeyDownWorld( I_key key, Action action);

This method allow you to add a keybiding on wold scene. When the user press the key value you pass, it will execute the action that you pass.

KeybindingsPC.Key MyKey = KeyCode.T;
KeybindingHelper.AddOnKeyDownWorld( MyKey, ()=>{ } );

static void AddOnKeyDownBuilder( I_key key, Action action);

This method allow you to add a keybiding on building scene. When the user press the key value you pass, it will execute the action that you pass.

KeybindingsPC.Key MyKey = KeyCode.T;
KeybindingHelper.AddOnKeyDownBuilder( MyKey, ()=>{ } );
⚠️ **GitHub.com Fallback** ⚠️