public static bool InitializeQuickSlotDisplaysPatch(KeyboardQuickSlotPanel __instance)
        {
            // Add 8 new quickslot ids to the array and assign them the new ids we added.
            Array.Resize(ref __instance.DisplayOrder, __instance.DisplayOrder.Length + ExtendedQuickslots.numSlots);
            int s = 12;

            for (int x = ExtendedQuickslots.numSlots; x >= 1; x--)
            {
                __instance.DisplayOrder[__instance.DisplayOrder.Length - x] = (QuickSlot.QuickSlotIDs)s++;
            }
            return(true);
        }
Exemple #2
0
            public static void Prefix(KeyboardQuickSlotPanel __instance)
            {
                var self = __instance;

                Array.Resize(ref self.DisplayOrder, self.DisplayOrder.Length + settings.NumberOfQuickSlotsToAdd);
                int s = 12;

                for (int x = settings.NumberOfQuickSlotsToAdd; x >= 1; x--)
                {
                    self.DisplayOrder[self.DisplayOrder.Length - x] = (QuickSlot.QuickSlotIDs)(s++);
                }
            }
Exemple #3
0
            public static void Prefix(KeyboardQuickSlotPanel __instance)
            {
                var self = __instance;

                var length = self.DisplayOrder.Length + SlotsToAdd;

                Array.Resize(ref self.DisplayOrder, length);

                // then add custom ones too
                int s = 12;

                for (int i = SlotsToAdd; i >= 1; i--)
                {
                    self.DisplayOrder[length - i] = (QuickSlot.QuickSlotIDs)s++;
                }
            }