mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
NETSCRIPT: Added changing tail font size through scripts (#1852)
This commit is contained in:
@@ -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,
|
||||
}}
|
||||
/>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user