mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 02:03:58 +01:00
Merge pull request #1511 from danielyxie/dev
script editor save button more often on screen.
This commit is contained in:
commit
f3d9cd9964
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -315,7 +315,7 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
monaco.languages.typescript.typescriptDefaults.addExtraLib(libSource, "netscript.d.ts");
|
monaco.languages.typescript.typescriptDefaults.addExtraLib(libSource, "netscript.d.ts");
|
||||||
loadThemes(monaco);
|
loadThemes(monaco);
|
||||||
}
|
}
|
||||||
|
const h = window.innerHeight;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box display="flex" flexDirection="row" alignItems="center">
|
<Box display="flex" flexDirection="row" alignItems="center">
|
||||||
@ -337,7 +337,7 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
beforeMount={beforeMount}
|
beforeMount={beforeMount}
|
||||||
onMount={onMount}
|
onMount={onMount}
|
||||||
loading={<Typography>Loading script editor!</Typography>}
|
loading={<Typography>Loading script editor!</Typography>}
|
||||||
height="90%"
|
height={90 - h / 100 + "%"}
|
||||||
defaultLanguage="javascript"
|
defaultLanguage="javascript"
|
||||||
defaultValue={code}
|
defaultValue={code}
|
||||||
onChange={updateCode}
|
onChange={updateCode}
|
||||||
|
@ -11,7 +11,8 @@ import { ResizableBox } from "react-resizable";
|
|||||||
import makeStyles from "@mui/styles/makeStyles";
|
import makeStyles from "@mui/styles/makeStyles";
|
||||||
import createStyles from "@mui/styles/createStyles";
|
import createStyles from "@mui/styles/createStyles";
|
||||||
import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
|
import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
|
||||||
import _ from "lodash";
|
|
||||||
|
let layerCounter = 0;
|
||||||
|
|
||||||
export const LogBoxEvents = new EventEmitter<[RunningScript]>();
|
export const LogBoxEvents = new EventEmitter<[RunningScript]>();
|
||||||
|
|
||||||
@ -92,7 +93,8 @@ function LogWindow(props: IProps): React.ReactElement {
|
|||||||
function updateLayer(): void {
|
function updateLayer(): void {
|
||||||
const c = container.current;
|
const c = container.current;
|
||||||
if (c === null) return;
|
if (c === null) return;
|
||||||
c.style.zIndex = (new Date().getTime() % 1000000000) + 1500 + "";
|
c.style.zIndex = 1500 + layerCounter + "";
|
||||||
|
layerCounter++;
|
||||||
rerender();
|
rerender();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user