NETSCRIPT: Added changing tail font size through scripts (#1852)

This commit is contained in:
G4mingJon4s
2025-01-05 01:51:13 +01:00
committed by GitHub
parent 3db190c9a0
commit c622291eff
9 changed files with 97 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ export class LogBoxProperties {
y = window.innerHeight * 0.3;
width = 500;
height = 500;
fontSize: number | undefined = undefined;
rerender: () => void;
rootRef: React.RefObject<Draggable>;
@@ -68,6 +69,11 @@ export class LogBoxProperties {
this.rerender();
}
setFontSize(size?: number): void {
this.fontSize = size;
this.rerender();
}
isVisible(): boolean {
return this.rootRef.current !== null;
}
@@ -415,7 +421,7 @@ function LogWindow({ hidden, script, onClose }: LogWindowProps): React.ReactElem
text={line}
color={lineColor(line)}
styles={{
fontSize: Settings.styles.tailFontSize,
fontSize: propsRef.current.fontSize ?? Settings.styles.tailFontSize,
}}
/>
),