diff --git a/src/Arcade/ui/ArcadeRoot.tsx b/src/Arcade/ui/ArcadeRoot.tsx new file mode 100644 index 000000000..efb1f92d9 --- /dev/null +++ b/src/Arcade/ui/ArcadeRoot.tsx @@ -0,0 +1,43 @@ +import React, { useState } from "react"; +import { BBCabinetRoot } from "./BBCabinet"; + +import Button from "@mui/material/Button"; +import { use } from "../../ui/Context"; +import { AlertEvents } from "../../ui/React/AlertManager"; + +enum Page { + None, + Megabyteburner2000, +} + +export function ArcadeRoot(): React.ReactElement { + const player = use.Player(); + const [page, setPage] = useState(Page.None); + + function mbBurner2000(): void { + if (player.sourceFileLvl(1) === 0) { + AlertEvents.emit("This machine is broken."); + } else { + setPage(Page.Megabyteburner2000); + } + } + + if (page === Page.None) { + return ( + <> + + + ); + } + let currentGame = <>; + switch (page) { + case Page.Megabyteburner2000: + currentGame = ; + } + return ( + <> + + {currentGame} + + ); +} diff --git a/src/Arcade/ui/BBCabinet.tsx b/src/Arcade/ui/BBCabinet.tsx new file mode 100644 index 000000000..d88d7b61b --- /dev/null +++ b/src/Arcade/ui/BBCabinet.tsx @@ -0,0 +1,52 @@ +import React from "react"; +import Typography from "@mui/material/Typography"; + +const metaBB = "https://bitburner-official.github.io/bitburner-legacy/"; + +const style = { + width: "1060px", + height: "800px", + border: "0px", +} as any; + +export function BBCabinetRoot(): React.ReactElement { + // prettier-ignore + const joystick = + <> + + ,'" "', .-. + / \ ( ) + | | .-. '-' .-. + \ / ( ) ( ) + '.___.' '-' .-. '-' + ||| ( ) + ||| '-' + ; + return ( + <> +
+