Exemple #1
0
 public static void Prefix(ref ScreenBase __instance, ref ScreenLayer layer)
 {
     if (__instance is GauntletPartyScreen && screenLayer != null && layer.Input.IsCategoryRegistered(HotKeyManager.GetCategory("PartyHotKeyCategory")))
     {
         __instance.RemoveLayer(screenLayer);
         enhancementVm.OnFinalize();
         enhancementVm = null;
         screenLayer   = null;
     }
 }
Exemple #2
0
        public new void OnFinalize()
        {
            base.OnFinalize();
            PartyScreenConfig.Save();
            if (Game.Current != null)
            {
                Game.Current.AfterTick = (Action <float>)Delegate.Remove(Game.Current.AfterTick, new Action <float>(AfterTick));
            }

            _partyEnhancementsVm = null;
            _sorterPane          = null;
            _generalPane         = null;
        }
Exemple #3
0
        public SettingScreenVM(PartyEnhancementsVM parent, GauntletPartyScreen parentScreen)
        {
            _partyEnhancementsVm = parent;
            _parentScreen        = parentScreen;
            _sorterPane          = new SettingSorterOverlayVM(this);
            _generalPane         = new SettingGeneralPaneVM();
            _miscPane            = new SettingMiscPaneVM();

            if (Game.Current != null)
            {
                Game.Current.AfterTick = (Action <float>)Delegate.Combine(Game.Current.AfterTick, new Action <float>(AfterTick));
            }
        }
Exemple #4
0
        public static void Postfix(ref ScreenBase __instance)
        {
            if (__instance is GauntletPartyScreen partyScreen && screenLayer == null)
            {
                screenLayer = new GauntletLayer(10);

                var        traverser  = Traverse.Create(partyScreen);
                PartyVM    partyVM    = traverser.Field <PartyVM>("_dataSource").Value;
                PartyState partyState = traverser.Field <PartyState>("_partyState").Value;

                enhancementVm = new PartyEnhancementsVM(partyVM, partyState.PartyScreenLogic, partyScreen);
                screenLayer.LoadMovie("PartyScreenEnhancements", enhancementVm);
                screenLayer.InputRestrictions.SetInputRestrictions(true, InputUsageMask.All);
                partyScreen.AddLayer(screenLayer);
            }
        }