From dc7032bbb937cbff276d18fba263ef1625834c6b Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Wed, 1 Jun 2022 18:40:02 +0800 Subject: + add stat history graph gui + fix streams gui stream previews sometimes being wayyy too tall --- features/streamsGUI/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'features/streamsGUI') diff --git a/features/streamsGUI/index.js b/features/streamsGUI/index.js index 492728a..d7d75cd 100644 --- a/features/streamsGUI/index.js +++ b/features/streamsGUI/index.js @@ -10,7 +10,6 @@ import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"; import BoxWithText from "../../../guimanager/GuiElement/BoxWithText"; -import { drawBoxAtBlock } from "../../utils/renderUtils"; import { fetch } from "../../utils/networkUtils"; class StreamsGui extends Feature { @@ -94,9 +93,9 @@ class StreamPage extends GuiPage { let title = new SoopyMarkdownElement().setText(data.title).setLocation(0.1, 0.15, 0.8, 0.1) sidebar.addChild(title) - let image = new SoopyImageElement().setImage(data.image).setLocation(0.1, 0.15 + title.getHeight(), 0.8, 0.4) + let image = new SoopyImageElement().setLocation(0.1, 0.15 + title.getHeight(), 0.8, 0.4).setImage(data.image) sidebar.addChild(image) - image.loadHeightFromImage() + let button = new ButtonWithArrow().setText("ยง0Watch on Twitch").setLocation(0.1, 0.15 + image.location.size.y.get() + title.getHeight(), 0.8, 0.1) sidebar.addChild(button) @@ -118,6 +117,7 @@ class StreamPage extends GuiPage { button.location.location.y.set(0.15 + image.location.size.y.get() + title.getHeight()) if (language) language.location.location.y.set(0.25 + image.location.size.y.get() + title.getHeight()) }, this) + image.loadHeightFromImage() } onOpen() { -- cgit