Exemplo n.º 1
0
 protected override void OnFinalize()
 {
     this._gauntletLayer.IsFocusLayer = false;
     ScreenManager.TryLoseFocus((ScreenLayer)this._gauntletLayer);
     this._dataSource.OnFinalize();
     this._dataSource = (VartsLeaderboardWorkshopVM)null;
     this._gauntletLayer.ReleaseMovie(this._movie);
     this.MenuViewContext.RemoveLayer((ScreenLayer)this._gauntletLayer);
     this._movie         = (GauntletMovie)null;
     this._gauntletLayer = (GauntletLayer)null;
     base.OnFinalize();
 }
Exemplo n.º 2
0
        protected override void OnInitialize()
        {
            base.OnInitialize();
            this._dataSource = new VartsLeaderboardWorkshopVM()
            {
                IsEnabled = true
            };
            GauntletLayer gauntletLayer = new GauntletLayer(205, "GauntletLayer");

            gauntletLayer.Name  = "VartsLeaderboardWorkshopMenuView";
            this._gauntletLayer = gauntletLayer;
            this._gauntletLayer.InputRestrictions.SetInputRestrictions(true, InputUsageMask.All);
            this._gauntletLayer.Input.RegisterHotKeyCategory(HotKeyManager.GetCategory("GenericPanelGameKeyCategory"));
            this._movie =
                this._gauntletLayer.LoadMovie("VartsLeaderboardWorkshopMenuViewMovie", (ViewModel)this._dataSource);
            this._gauntletLayer.IsFocusLayer = true;
            ScreenManager.TrySetFocus((ScreenLayer)this._gauntletLayer);
            this.MenuViewContext.AddLayer((ScreenLayer)this._gauntletLayer);
        }