From dec1b15b799313a6a5e776d37605d2fb783cf8de Mon Sep 17 00:00:00 2001 From: candry7731 <83685828+candry7731@users.noreply.github.com> Date: Thu, 2 Jun 2022 21:04:07 -0500 Subject: [PATCH 1/5] Fix Episode Image errors --- components/data/HomeData.brs | 2 +- components/home/LoadItemsTask.brs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/data/HomeData.brs b/components/data/HomeData.brs index a5d1489b..de82c422 100644 --- a/components/data/HomeData.brs +++ b/components/data/HomeData.brs @@ -37,7 +37,7 @@ sub setData() imgParams.Append({ "maxHeight": 261 }) imgParams.Append({ "maxWidth": 464 }) - m.top.thumbnailURL = ImageURL(datum.SeriesId, "Primary", imgParams) + m.top.thumbnailURL = ImageURL(datum.Id, "Primary", imgParams) ' Add Wide Poster (Series Backdrop) if datum.ParentThumbImageTag <> invalid diff --git a/components/home/LoadItemsTask.brs b/components/home/LoadItemsTask.brs index d9207e13..338f570e 100644 --- a/components/home/LoadItemsTask.brs +++ b/components/home/LoadItemsTask.brs @@ -37,7 +37,7 @@ sub loadItems() tmp = CreateObject("roSGNode", "HomeData") item.ImageURL = ImageURL(item.Id, "Primary", params) if item.type = "Episode" - item.ImageURL = ImageURL(item.SeriesId) + item.ImageURL = ImageURL(item.Id) end if tmp.json = item results.push(tmp) From 9c33c6b580198ef633b8dc4cc5055af2c7b1a2a2 Mon Sep 17 00:00:00 2001 From: candry7731 <83685828+candry7731@users.noreply.github.com> Date: Thu, 2 Jun 2022 21:06:05 -0500 Subject: [PATCH 2/5] Move Alpha to left of item grid --- components/ItemGrid/Alpha.xml | 2 +- components/ItemGrid/ItemGrid.brs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/ItemGrid/Alpha.xml b/components/ItemGrid/Alpha.xml index 743061be..64c48a22 100644 --- a/components/ItemGrid/Alpha.xml +++ b/components/ItemGrid/Alpha.xml @@ -2,7 +2,7 @@ Date: Fri, 3 Jun 2022 00:25:00 -0500 Subject: [PATCH 3/5] Resize item poster base on alpha/grid focus --- components/ItemGrid/GridItem.brs | 20 +++++++++++++------- components/ItemGrid/ItemGrid.brs | 4 +++- components/ItemGrid/ItemGrid.xml | 1 + 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/components/ItemGrid/GridItem.brs b/components/ItemGrid/GridItem.brs index e9a9e642..9be3231f 100644 --- a/components/ItemGrid/GridItem.brs +++ b/components/ItemGrid/GridItem.brs @@ -17,16 +17,16 @@ sub init() if m.alwaysShowTitles then m.itemText.maxWidth = 250 'Parent is MarkupGrid and it's parent is the ItemGrid - topParent = m.top.GetParent().GetParent() + m.topParent = m.top.GetParent().GetParent() 'Get the imageDisplayMode for these grid items - if topParent.imageDisplayMode <> invalid - m.itemPoster.loadDisplayMode = topParent.imageDisplayMode + if m.topParent.imageDisplayMode <> invalid + m.itemPoster.loadDisplayMode = m.topParent.imageDisplayMode end if end sub sub itemContentChanged() - + ' Set Random background colors from pallet posterBackgrounds = m.global.constants.poster_bg_pallet m.backdrop.blendColor = posterBackgrounds[rnd(posterBackgrounds.count()) - 1] @@ -74,20 +74,26 @@ end sub ' 'Use FocusPercent to animate scaling of Poser Image sub focusChanging() - scaleFactor = 0.85 + (m.top.focusPercent * 0.15) - m.posterMask.scale = [scaleFactor, scaleFactor] + if m.topParent.alphaActive = "true" + m.posterMask.scale = [0.85, 0.85] + else + scaleFactor = 0.85 + (m.top.focusPercent * 0.15) + m.posterMask.scale = [scaleFactor, scaleFactor] + end if end sub ' 'Display or hide title Visibility on focus change sub focusChanged() - if m.top.itemHasFocus = true m.itemText.visible = true m.itemText.repeatCount = -1 + scaleFactor = 0.85 + (m.top.focusPercent * 0.15) + m.posterMask.scale = [scaleFactor, scaleFactor] else m.itemText.visible = m.alwaysShowTitles m.itemText.repeatCount = 0 + m.posterMask.scale = [0.85, 0.85] end if end sub diff --git a/components/ItemGrid/ItemGrid.brs b/components/ItemGrid/ItemGrid.brs index ed373db3..fedf8684 100644 --- a/components/ItemGrid/ItemGrid.brs +++ b/components/ItemGrid/ItemGrid.brs @@ -255,7 +255,7 @@ end sub ' 'Handle loaded data, and add to Grid sub ItemDataLoaded(msg) - + m.top.alphaActive = "false" itemData = msg.GetData() m.loadItemsTask.unobserveField("content") m.loadItemsTask.content = [] @@ -530,11 +530,13 @@ function onKeyEvent(key as string, press as boolean) as boolean topGrp.setFocus(false) alpha = m.Alpha.getChild(0).findNode("Alphamenu") alpha.setFocus(true) + m.top.alphaActive = "true" return true else if key = "right" and m.Alpha.isinFocusChain() m.Alpha.setFocus(false) m.Alpha.visible = true topGrp.setFocus(true) + m.top.alphaActive = "false" return true end if return false diff --git a/components/ItemGrid/ItemGrid.xml b/components/ItemGrid/ItemGrid.xml index fd7f3172..67964ee8 100644 --- a/components/ItemGrid/ItemGrid.xml +++ b/components/ItemGrid/ItemGrid.xml @@ -39,6 +39,7 @@ +