Beispiel #1
0
                internal static void HandleCreateButtons(List <patch_OuiFileSelectSlot.Button> buttons, OuiFileSelectSlot slot, bool fileExists)
                {
                    if (OnCreateButtons == null)
                    {
                        return;
                    }

                    foreach (Delegate del in OnCreateButtons.GetInvocationList())
                    {
                        // find the Everest module this delegate belongs to, and load the mod save data from it for the current slot.
                        EverestModule         matchingModule = _Modules.Find(module => module.GetType().Assembly == del.Method.DeclaringType.Assembly);
                        EverestModuleSaveData modSaveData    = null;
                        if (matchingModule != null)
                        {
                            modSaveData = matchingModule._SaveData;
                        }

                        // call the delegate.
                        del.DynamicInvoke(new object[] { buttons, slot, modSaveData, fileExists });
                    }
                }
Beispiel #2
0
 internal static void CreateButtons(_OuiMainMenu menu, List <MenuButton> buttons)
 => OnCreateButtons?.Invoke(menu, buttons);