Thank you very much. This is much more user-friendly than my old way.
However, I'm still having one small problem. I can't get the default key to work. I have the following in my Mod class.
Neither "CapsLock", Keys.CapsLock.ToString() or even "P" was recognised as the default key. I can manually change the key allright, but when I click Reset To Defaults it just goes back to <Unbound>. Any thoughts?Code:public override void Load() { hotBarSwap = RegisterHotKey("Swap Hot Bar", /*"CapsLock"*/ /*Keys.CapsLock.ToString()*/ "P"); }
On a slightly different topic, on very rare occasions I've had the following error pop up when I click Build & Reload:
After this happened, I'd click Continue, then reload again and everything would be fine. I've put this down to a tModLoader quirk, but I wonder if it could be this mod causing this glitch?Code:The given key was not present in the dictionary. at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Terraria.GameInput.PlayerInput.PostInput() at Terraria.GameInput.PlayerInput.UpdateInput() at Terraria.Main.DoUpdate(GameTime gameTime) at Terraria.Main.Update(GameTime gameTime)
"CapsLock" worked for me. Make sure you saved, rebuilt, and clicked the reset to defaults button, try again.
That reload error we know about.