contextually hide sidebar items

This commit is contained in:
Olivier Gagnon
2021-09-14 15:23:16 -04:00
parent 8a0f33daf0
commit f895da118d
7 changed files with 508 additions and 952 deletions
+10 -1
View File
@@ -22,9 +22,10 @@ import { processPassiveFactionRepGain, inviteToFaction } from "./Faction/Faction
import { FactionList } from "./Faction/ui/FactionList";
import { Root as BladeburnerRoot } from "./Bladeburner/ui/Root";
import { Root as GangRoot } from "./Gang/ui/Root";
import { SidebarRoot } from "./Sidebar/ui/Sidebar2Root";
import { SidebarRoot } from "./Sidebar/ui/SidebarRoot";
import { CorporationRoot } from "./Corporation/ui/CorporationRoot";
import { ResleeveRoot } from "./PersonObjects/Resleeving/ui/ResleeveRoot";
import { GameOptionsRoot } from "./ui/React/GameOptionsRoot";
import { SleeveRoot } from "./PersonObjects/Sleeve/ui/SleeveRoot";
import { displayInfiltrationContent } from "./Infiltration/Helper";
import {
@@ -354,6 +355,14 @@ const Engine = {
ReactDOM.render(<ResleeveRoot player={Player} />, Engine.Display.content);
},
loadGameOptionsContent: function () {
Engine.hideAllContent();
routing.navigateTo(Page.GameOptions);
Engine.Display.content.style.display = "block";
MainMenuLinks.City.classList.add("active");
ReactDOM.render(<GameOptionsRoot />, Engine.Display.content);
},
// Helper function that hides all content
hideAllContent: function () {
Engine.Display.terminalContent.style.display = "none";