#Aligning Content Rating Image to bottom right

1 messages ยท Page 1 of 1 (latest)

strong raptor
#

Can someone help me align the content rating image to the bottom right?

boreal heraldBOT
#

Welcome @strong raptor!

Someone from <@&938443185347244033> will assist when they're available.

Including the meta.log from the beginning is a huge help, type !logs for more information.

#

You can press the "Close Post" button above or type /close at any time to close this post.

strong raptor
#

Here is what I have/have tried so far

#
        template_variables:
          back_color: 00
          addon_offset: 0
          addon_position: right
          vertical_align: bottom
          horizontal_align: right
          vertical_offset: 0
          horizontal_offset: 0
crystal mantle
#

What happens if you adjust the offset?

strong raptor
#

I think when I tried that, it worked for moving the "R" but when a movie was "PG" or "PG-13", it would cut off the right side a bit

crystal mantle
#

Anyone here is going to have to run experiments with various values, so you could try the same controlled experiments with different values and show the results.

#

Yours, unmodified [I left my black bars on there from the last experiments]:

libraries:
  Movies:
    overlay_files:
      - file: config/the-89-overlays.yml
      - pmm: content_rating_us_movie
        template_variables:
          back_color: 00
          addon_offset: 0
          addon_position: right
          vertical_align: bottom
          horizontal_align: right
          vertical_offset: 0
          horizontal_offset: 0
#

The overlay value is relative to the alignment [right in this case] so let's try a big number just to see:

          horizontal_offset: 500

This behaves as expected:

#

However, you can't use negative offsets to move it further right:

| Overlay Error: overlay horizontal_offset: -200 must be a number 0 or greater                       |

So a new tack is needed.

Let's align left and use a large offset:

          horizontal_align: left
          horizontal_offset: 900

Close, but:

#
          horizontal_offset: 780

produces:

open otter
#

maybe a horizontal align right?

crystal mantle
#

I don't think there's a way to right-align the images themselves without modifying the YAML

open otter
#

so that the R goes to the right

#

hmmmI thought that was the purpose of the align

crystal mantle
open otter
#

right/correct

#

so this seems to be an issue when the overlays are different sizes

#

ie. pg-13 is wider than R

muted citrus
#

Maybe try to also set the background size to 0 I think pmm will put the box at the designate coordinate and then center the img in the box

versed edge
#

Are you using the ribbon overlay?

strong raptor
open otter
#

Try back_width: 0 or 1 which should allow you to push the R and other square logos to the right

crystal mantle
#

I think I tried that to no avail.

versed edge
#

The issue is that there is a "block" of space for the overlay (in this case the rating). PG-13 might occupy all of that space but G or R will only occupy the center section of it. Unless you can left or right justify the actual graphic (and I haven't looked to see if the graphic is a fixed size) the smaller graphics will not extend to the corner.

#

So I took a peek and it looks like the graphics are different sizes so whatever in is the yaml must center them in the available space. You'd have to edit the yaml to right justify them to the right edge, which would get overwritten on upgrades. Possibly a feature upgrade?

open otter
#
    - pmm: content_rating_us_movie
      template_variables:
        horizontal_align: right
        vertical_align: bottom
        horizontal_offset: 120
        horizontal_offset_nr: 60
        vertical_offset: 60
        back_color: '#00000000'
        back_width: 1
        back_height: 1
#

horizontal_offset_nr: 60 was the cheat code for this one

versed edge
crystal mantle
#

I imagine changing "bottom" to "top" would be the first step.

open otter
#
    - pmm: content_rating_us_movie
      template_variables:
        horizontal_align: left
        vertical_align: top
        horizontal_offset: 120
        horizontal_offset_nr: 60
        vertical_offset: 60
        back_color: '#00000000'
        back_width: 1
        back_height: 1
#

And then run and see what happens and tweak till you are happy

versed edge
versed edge
open otter
#

So... the reason I shared a screenshot with my code is because the little logo on the spears and Munson item is Not Rated and the <<key>> for us content is nr. So that game cheat code is that you can further alter what you want to do by tacking on the <<key>> to the template variable

#

So people need to review the possible overlays and the "square" ones get an additional line in the template_variables section with related key to push it even further.

#

The keys are there

#

Grab the images and check the dimensions and then take appropriate action with your template variables.

open otter
versed edge
boreal heraldBOT
#

Hello @strong raptor, a user has suggested that this thread has been resolved and can be closed.

Please confirm that you are happy to close this thread by typing /close or by pressing the Close Post button which is pinned to this thread.

strong raptor
#

Solution above.

Alternate solution below: Changing the images to the same