Thread: Fade image anchor point?

Results 1 to 10 of 10
  1. Collapse Details
    Fade image anchor point? 
    #1
    Junior Member
    MainSecondary
    Join Date
    Apr 2016
    Posts
    16
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site
    In:

    Fade - Info (Tab)
    Game Info Text
    Visibility
    Show Description As: Image

    Appearance
    Position: User Defined
    Text 1 Options

    How do I control the anchor point of the image?
    Setting an X & Y point sets my location of my image.
    But "Horizontal Alignment" & "Vertical Alignment" seem to have no barring of the image.

    Screenshot 1:
    SS1.jpg

    Screenshot 2:
    SS2.jpg

    As you can see. The Logos (Aka: "Description Image") both share the same X&Y start point, And they both grow Horizontally to the right.
    Is there a way to have the X&Y values be for the CENTER? of the image?


    Thank you.
     

  2. Collapse Details
    Re: Fade image anchor point? 
    #2
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    There is no support for different anchor points other than top left for images on the game info.

    The "Horizontal Alignment" & "Vertical Alignment" fields are used exclusively to position text.
    Images only use information contained on the "X", "Y" , "width" and "height" fields to determine their positions and sizes.

    However, you probably can use work arounds to position anything the way you like more on the fade screen.
    For example, if use images with the same width within a blank canvas you could simply define a value in the game info "width" field.

    I don't know exactly what do you want to achieve so it is difiicult to give you any better suggestion.

    And by the way, the fade animations code was always intended to be customizable by the end user, whenever you want to do something not currently supported by RL. So there is always this alternative also.
     

  3. Collapse Details
    Re: Fade image anchor point? 
    #3
    Junior Member
    MainSecondary
    Join Date
    Apr 2016
    Posts
    16
    I don't know exactly what do you want to achieve so it is difiicult to give you any better suggestion.
    Fade pulls the description image from "wheel" folder automatically based on the XML files game name.
    What I want is for the description image to be relatively centered in that "box area" shown in the previous screenshots regardless of what image is pulled.
    My images are a mix of height/width. They were got via the standard hyperspin upload bank.
    I COULD go and set all the images to a certain width and have blank canvas added. But that's ALOT of batching of images.
    Thousands of images I'm sure.


    And by the way, the fade animations code was always intended to be customizable by the end user, whenever you want to do something not currently supported by RL. So there is always this alternative also.
    I'm not fluent in coding. But I can tinker enough to possibly correct/edit things. How/where would I go about editing the fade code for solving my issue?

    Thank you for your previous responce.


    Thank you for your previous responce.
     

  4. Collapse Details
    Re: Fade image anchor point? 
    #4
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    The bulk image editing can be easily done using macros on Photoshop or using imagemagick scripts.

    But if you want the code path, here it is some more info about it.
    Keep in mind that I didn't test anything that I suggest bellow.
    It belongs to you to tinkering above them to achieve your desired results.

    Basically, what do you need to do is the following:
    1) Firstly set your fade coordinates to drawn the images aligned at the top left corner of your "box area"
    2) Secondly, add to the X position of the logo half of the difference between the width of your "box area" and the width of the actual image to centralize it on your screen.

    You probably already did the first step (you can do it by editing the X and Y coordinates on RLUI for the game info).

    For the second one you would need to edit the fade animations file code.

    Basically, the entire fade screen is defined inside the fade animations file.

    The X position of the game info element is defined inside the if statement around line 574:
    Code:
        If (fadeRomInfoTextPlacement="User Defined"){
        ...
        }
    The X position is saved on the variable: romInfoText[A_Index,6], where A_Index ranges from 1 to 7 and corresponds to the order defined at the "game info order" field on RLUI.

    What do you need to do is, after this code block and outside the if statement (around line 669), modify the X value to add the difference between the width of your box and of the image.

    The image width is stored on the variable: romInfoText[A_Index,8], so you should add something like this on line 669:

    Code:
    indexOfLogo := 1 ; change for the order of the game info object that you want to align on the "game info order" field on RLUI.
    widthOfBoxArea := 900 ;change this for whatever is the pixel size of the box area that you want to centralize the image
    romInfoText[indexOfLogo,6] := romInfoText[indexOfLogo,6] + ( widthOfBoxArea - romInfoText[indexOfLogo,8] )//2
    This should move the logo image to the right by the amount of pixels necessary to centralize it on your fade screen.

    Use tooltips and msgboxes to troubleshoot anything if necessary.
     

  5. Collapse Details
    Re: Fade image anchor point? 
    #5
    Junior Member
    MainSecondary
    Join Date
    Apr 2016
    Posts
    16
    Quote Originally Posted by bleasby View Post
    The bulk image editing can be easily done using macros on Photoshop or using imagemagick scripts.

    But if you want the code path, here it is some more info about it.
    Keep in mind that I didn't test anything that I suggest bellow.
    It belongs to you to tinkering above them to achieve your desired results.

    Basically, what do you need to do is the following:
    1) Firstly set your fade coordinates to drawn the images aligned at the top left corner of your "box area"
    2) Secondly, add to the X position of the logo half of the difference between the width of your "box area" and the width of the actual image to centralize it on your screen.

    You probably already did the first step (you can do it by editing the X and Y coordinates on RLUI for the game info).

    For the second one you would need to edit the fade animations file code.

    Basically, the entire fade screen is defined inside the fade animations file.

    The X position of the game info element is defined inside the if statement around line 574:
    Code:
        If (fadeRomInfoTextPlacement="User Defined"){
        ...
        }
    The X position is saved on the variable: romInfoText[A_Index,6], where A_Index ranges from 1 to 7 and corresponds to the order defined at the "game info order" field on RLUI.

    What do you need to do is, after this code block and outside the if statement (around line 669), modify the X value to add the difference between the width of your box and of the image.

    The image width is stored on the variable: romInfoText[A_Index,8], so you should add something like this on line 669:

    Code:
    indexOfLogo := 1 ; change for the order of the game info object that you want to align on the "game info order" field on RLUI.
    widthOfBoxArea := 900 ;change this for whatever is the pixel size of the box area that you want to centralize the image
    romInfoText[indexOfLogo,6] := romInfoText[indexOfLogo,6] + ( widthOfBoxArea - romInfoText[indexOfLogo,8] )//2
    This should move the logo image to the right by the amount of pixels necessary to centralize it on your fade screen.

    Use tooltips and msgboxes to troubleshoot anything if necessary.

    Thank you. Ill try this modification when i get home, & will report back on what it does. or if any errors it throws out.

    Im familiar with batch macroing in photoshop. Just was trying to find a better way via code. Lets hope

    Thank you again.
     

  6. Collapse Details
    Re: Fade image anchor point? 
    #6
    Junior Member
    MainSecondary
    Join Date
    Apr 2016
    Posts
    16
    Worked PERFECTLY. well semi. i removed 1 "/" at the end

    Code:
    indexOfLogo := 1 ; change for the order of the game info object that you want to align on the "game info order" field on RLUI.
    widthOfBoxArea := 856 ;change this for whatever is the pixel size of the box area that you want to centralize the image
    romInfoText[indexOfLogo,6] := romInfoText[indexOfLogo,6] + ( widthOfBoxArea - romInfoText[indexOfLogo,8] )/2
    This works for a 1920x1080 reso.
     

  7. Collapse Details
    Re: Fade image anchor point? 
    #7
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    Nice.
    Just keep in mind that whenever you update your RL install, the fade animations file will be replaced.
    Therefore, always keep a backup of your changes and add it to the updated files when necessary.
     

  8. Collapse Details
    Re: Fade image anchor point? 
    #8
    Junior Member
    MainSecondary
    Join Date
    Apr 2016
    Posts
    16
    Thanks. Ill remember that. ill save a copy of the edited file for when it auto-updates.

    Question: See the code below, I changed widthOfBoxArea to heightOfBoxArt in an attempt to center the image BOTH ways. When i inserted the code instead of centering it vertically. It moved the image horizontally. Its not a HUGE issue. Just thought id attempt to change your code to see if i could get image to center both ways.

    Code:
    indexOfLogo := 2 ; change for the order of the game info object that you want to align on the "game info order" field on RLUI.
    heightOfBoxArea := 500;change this for whatever is the pixel size of the box area that you want to centralize the image
    romInfoText[indexOfLogo,6] := romInfoText[indexOfLogo,6] + ( heightOfBoxArea - romInfoText[indexOfLogo,8] )/2
    Currently my set up has 2 images that are pulled.

    System Logo. (Game info 2)
    Game Description Logo. (Game info 1)


    All Game Description Logos have a width of 400px and varying heights, but none exceeding over 200px.
    I have the X & Y values set for the TOP LEFT of the image. I have a height set to 200px, so that the images scale upwards to a max of 200px height, and since they all have a 400px width, they scale width-wise to maintain aspect ratio.

    All System Logos have varying widths, and a height of 400px.
    I Have the X & Y values set for the TOP LEFT of the image.

    I have inserted that code you gave me for both of these logo images. They center Horizontally perfectly.

    Its not a HUGE issue. But ideally Id like to have these images centered vertically as well.
     

  9. Collapse Details
    Re: Fade image anchor point? 
    #9
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    The variable that stores the Y position is romInfoText[indexOfLogo,7]. If you want to center it vertically, you need to use it instead of the romInfoText[indexOfLogo,6]. You need also to change the variable that stores the Width by the one that stores the height.

    You are going to need something like this:

    Code:
    ;centralizing the game logo
    indexOfLogo := 1
    widthOfBoxArea := 856
    heightOfBoxArea := 500 
    romInfoText[indexOfLogo,6] := romInfoText[indexOfLogo,6] + ( widthOfBoxArea - romInfoText[indexOfLogo,8] )/2
    romInfoText[indexOfLogo,7] := romInfoText[indexOfLogo,7] - ( heightOfBoxArea - romInfoText[indexOfLogo,9] )/2
    
    ;centralizing the system logo
    indexOfLogo := 2
    widthOfBoxArea := 856
    heightOfBoxArea := 500 
    romInfoText[indexOfLogo,6] := romInfoText[indexOfLogo,6] + ( widthOfBoxArea - romInfoText[indexOfLogo,8] )/2
    romInfoText[indexOfLogo,7] := romInfoText[indexOfLogo,7] - ( heightOfBoxArea - romInfoText[indexOfLogo,9] )/2
    Just adjust the box area pixel sizes and the top left position accordingly to reflect the origin of your image box area.
     

  10. Collapse Details
    Re: Fade image anchor point? 
    #10
    Junior Member
    MainSecondary
    Join Date
    Apr 2016
    Posts
    16


    Everything SOLVED
    Last edited by rdyott ; 08-03-2016 at 09:10 PM.
     

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •