1 using System.Collections.Generic;
13 internal readonly
Mod mod;
14 internal readonly
string name;
15 internal readonly
string uniqueName;
16 internal readonly
string defaultKey;
18 internal ModHotKey(
Mod mod,
string name,
string defaultKey) {
21 this.defaultKey = defaultKey;
22 this.uniqueName = mod.
Name +
": " + name;
31 return PlayerInput.CurrentProfile.InputModes[mode].KeyStatus[uniqueName];
34 public bool RetroCurrent {
36 if (Main.drawingPlayerChat || Main.player[Main.myPlayer].talkNPC != -1 || Main.player[Main.myPlayer].sign != -1)
return false;
44 public bool Current => PlayerInput.Triggers.Current.KeyStatus[uniqueName];
49 public bool JustPressed => PlayerInput.Triggers.JustPressed.KeyStatus[uniqueName];
54 public bool JustReleased => PlayerInput.Triggers.JustReleased.KeyStatus[uniqueName];
59 public bool Old => PlayerInput.Triggers.Old.KeyStatus[uniqueName];
Represents a loaded hotkey. It is suggested to access the hotkey status only in ModPlayer.ProcessTriggers.
virtual string Name
Stores the name of the mod. This name serves as the mod's identification, and also helps with saving ...
Mod is an abstract class that you will override. It serves as a central place from which the mod's co...
List< string > GetAssignedKeys(InputMode mode=InputMode.Keyboard)
Gets the currently assigned keybindings. Useful for prompts, tooltips, informing users.