aboutsummaryrefslogtreecommitdiff
path: root/features/streamsGUI
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-03-01 21:25:13 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-03-01 21:25:13 +0800
commitc71b4f83abb2697781f8e6eafa8ad35f924fbdf7 (patch)
tree7e992f047e1b19864cea8cee1671573a44cf20de /features/streamsGUI
parent556eedeb7d58909cb716abe16d2c40910acdc43c (diff)
downloadSoopyV2-c71b4f83abb2697781f8e6eafa8ad35f924fbdf7.tar.gz
SoopyV2-c71b4f83abb2697781f8e6eafa8ad35f924fbdf7.tar.bz2
SoopyV2-c71b4f83abb2697781f8e6eafa8ad35f924fbdf7.zip
many changes (will list in a bit)
Diffstat (limited to 'features/streamsGUI')
-rw-r--r--features/streamsGUI/index.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/features/streamsGUI/index.js b/features/streamsGUI/index.js
index 01040cd..b9912c2 100644
--- a/features/streamsGUI/index.js
+++ b/features/streamsGUI/index.js
@@ -93,8 +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).loadHeightFromImage()
+ let image = new SoopyImageElement().setImage(data.image).setLocation(0.1, 0.15+title.getHeight(), 0.8, 0.4)
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)
@@ -133,7 +134,7 @@ class StreamElement extends SoopyBoxElement {
this.channelElement = new SoopyTextElement().setLocation(0.1,0.025,0.8,0.1).setMaxTextScale(10)
- this.channelImg = new SoopyImageElement().setLocation(0.1,0.125,0.8,0.2).loadHeightFromImage()
+ this.channelImg = new SoopyImageElement().setLocation(0.1,0.125,0.8,0.2)
this.titleElement = new SoopyMarkdownElement().setLocation(0.1,0.45,0.8,0.1)
@@ -150,6 +151,7 @@ class StreamElement extends SoopyBoxElement {
this.addChild(this.channelElement)
this.addChild(this.titleElement)
this.addChild(this.channelImg)
+ this.channelImg.loadHeightFromImage()
}
setStream(stream, twitch){
@@ -161,6 +163,7 @@ class StreamElement extends SoopyBoxElement {
this.streamData.image = twitch ? `https://static-cdn.jtvnw.net/previews-ttv/live_user_${stream.user_login}-640x360.jpg` : stream.thumbnails.high.url
this.channelImg.setImage(this.streamData.image)
+ this.channelImg.loadHeightFromImage()
return this
}