Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
Made the packs button open a (not yet modified) level select menu
Browse files Browse the repository at this point in the history
  • Loading branch information
REHERC committed Jul 4, 2021
1 parent 89f0daa commit c8e722a
Showing 1 changed file with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Centrifuge.Distance.Game;
using UnityEngine;

namespace Distance.AdventureMaker.Scripts.MainMenu
{
Expand All @@ -10,14 +11,31 @@ public class ContentPacksButton : MainMenuButton

protected override int ItemPosition => 5;

protected LevelSelectMenuAbstract levelSelect;

public override void Setup(MainMenuLogic menuLogic)
{
base.Setup(menuLogic);

LevelGridMenu levelGrid = menuLogic.levelSelectLogic_ as LevelGridMenu;

GameObject levelSelectObj = Instantiate(levelGrid.advancedMenu_.gameObject);
levelSelectObj.name = "CampaignSelectRoot";
levelSelect = levelSelectObj.GetComponent<LevelSelectMenuLogic>();
}

protected override void OnButtonClick()
{
MessageBox.Create("This feature isn't currently implemented.", ButtonText).Show();
//SetVisible(false);
//MenuLogic.levelSelectLogic_
levelSelect.Display(LevelSelectMenuAbstract.DisplayType.Arcade, new LevelSelectMenuAbstract.OnLevelSelectedDelegate((_, __) => { }), null);



return;
/*
var controller = MenuLogic.gameObject.GetComponent<MainMenuButtonController>();
//MessageBox.Create("This feature isn't currently implemented.", ButtonText).Show();

//return;

/*var controller = MenuLogic.gameObject.GetComponent<MainMenuButtonController>();
if (!controller) return;
Expand All @@ -28,17 +46,15 @@ protected override void OnButtonClick()
controller.Workshop.Visible = false;
controller.ContentPacks.Visible = false;
controller.Garage.Visible = false;
controller.ReportBug.Visible = true;
controller.ReportBug.Visible = false;
controller.Options.Visible = false;
controller.Quit.Visible = true;
controller.Quit.Visible = false;
var title = MenuLogic.transform.Find("UI Root/Panel - Main/DistanceTitle").GetComponent<UILabel>();
title.text = "N O";
title.text = "S A M P L E T E X T";
var version = MenuLogic.transform.Find("UI Root/Panel - Main/VersionNumber").GetComponent<UILabel>();
version.text = "";
*/
version.text = "";*/
}
}
}

0 comments on commit c8e722a

Please sign in to comment.