@using Sandbox; @using Sandbox.UI; @using MenuProject.UI; @inherits Panel @{ var hero = Group.Groupings.Where(x => x.Style == "hero").FirstOrDefault(); if ( hero != null ) {
} } @foreach (var entry in Group.Groupings ) { if ( entry.Style =="large" ) { continue; } if ( entry.Style =="regular" ) { continue; } if ( entry.Style =="squaresmall" ) { continue; } if ( entry.Style =="tall" ) { continue; } if ( entry.Style =="hero" ) { // we ignore this type, because it's at the top of the page continue; } }
@code { [Parameter] public Package.ListResult Group { get; set; } public static void OnLaunch(Package package) { if ( package.TypeName == "game" ) { MenuHelpers.LaunchGame(package.FullIdent); return; } if (package.TypeName == "map") { MenuHelpers.LaunchGame(package.FullIdent); return; } Game.Overlay.ShowPackageModal(package.FullIdent); } public static void OnMenu(Panel root, Package package) { MenuHelpers.OpenPackageMenu(root, package); } }