UI: Update toolbar of in-game editor (#2551)

This commit is contained in:
catloversg
2026-03-04 05:07:08 +07:00
committed by GitHub
parent 45366a1a42
commit 5e71612fd7
2 changed files with 9 additions and 2 deletions

View File

@@ -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}
/>
);
}

View File

@@ -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