mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
UI: Update toolbar of in-game editor (#2551)
This commit is contained in:
@@ -19,9 +19,10 @@ type DocumentationAutocompleteProps = {
|
||||
* "path" is always "nsDoc/filename.md"
|
||||
*/
|
||||
onChange: (path: string, external: boolean) => void;
|
||||
width?: number;
|
||||
};
|
||||
|
||||
export function DocumentationAutocomplete({ sx, onChange }: DocumentationAutocompleteProps) {
|
||||
export function DocumentationAutocomplete({ sx, onChange, width }: DocumentationAutocompleteProps) {
|
||||
return (
|
||||
<AutoCompleteSearchBox
|
||||
sx={sx}
|
||||
@@ -45,6 +46,7 @@ export function DocumentationAutocomplete({ sx, onChange }: DocumentationAutocom
|
||||
onChange(`nsDoc/${path}`, external);
|
||||
}
|
||||
}}
|
||||
width={width}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,11 @@ export function Toolbar({ editor, onSave, onRun, onBeautify }: IProps) {
|
||||
>
|
||||
Beautify
|
||||
</Button>
|
||||
<Button color={isUpdatingRAM ? "secondary" : "primary"} sx={{ mx: 1 }} onClick={openRAMInfo}>
|
||||
<Button
|
||||
color={isUpdatingRAM ? "secondary" : "primary"}
|
||||
sx={{ mx: 1, whiteSpace: "nowrap" }}
|
||||
onClick={openRAMInfo}
|
||||
>
|
||||
{ram}
|
||||
</Button>
|
||||
<Tooltip title={parseKeyCombinationsToString(CurrentKeyBindings[ScriptEditorAction.Save])}>
|
||||
@@ -105,6 +109,7 @@ export function Toolbar({ editor, onSave, onRun, onBeautify }: IProps) {
|
||||
}
|
||||
openDocumentationPopUp(path);
|
||||
}}
|
||||
width={350}
|
||||
/>
|
||||
<Typography>
|
||||
<DocumentationLink
|
||||
|
||||
Reference in New Issue
Block a user