Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ LoadSpecialRulesFor_GameSense_Keyboard()

static void Terraria.Initializers.ChromaInitializer.LoadSpecialRulesFor_GameSense_Keyboard ( List< Bind_Event > eventsToBind)
inlinestaticprivate

Definition at line 724 of file ChromaInitializer.cs.

725 {
726 Dictionary<string, byte> xnaKeyNamesToSteelSeriesKeyIndex = HIDCodes.XnaKeyNamesToSteelSeriesKeyIndex;
728 foreach (KeyValuePair<string, List<string>> item3 in PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus)
729 {
730 string key = item3.Key;
731 List<string> value = item3.Value;
732 List<byte> list = new List<byte>();
733 foreach (string item4 in value)
734 {
736 {
737 list.Add(value2);
738 }
739 }
741 new ColorStatic
742 {
743 red = white.R,
744 green = white.G,
745 blue = white.B
746 };
747 Bind_Event item = new Bind_Event("TERRARIA", "KEY_" + key.ToUpper(), 0, 10, EventIconId.Default, new AbstractHandler[1]
748 {
749 new ContextColorEventHandlerType
750 {
751 ContextFrameKey = key,
752 DeviceZone = deviceZone
753 }
754 });
756 }
757 Bind_Event item2 = new Bind_Event("TERRARIA", "DO_RAINBOWS", 0, 10, EventIconId.Default, new AbstractHandler[1]
758 {
759 new PartialBitmapEventHandlerType
760 {
761 EventsToExclude = eventsToBind.Select((Bind_Event x) => x.eventName).ToArray()
762 }
763 });
765 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
static PlayerInputProfile CurrentProfile

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), Terraria.GameInput.PlayerInput.CurrentProfile, System.item, System.key, System.list, System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), System.value, and Microsoft.Xna.Framework.Color.White.

Referenced by Terraria.Initializers.ChromaInitializer.LoadSpecialRulesFor_GameSense().