Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: Edglaf on April 07, 2018, 12:53:38 pm

Title: Artwork .lay files, how to place the marquee image. Help!
Post by: Edglaf on April 07, 2018, 12:53:38 pm
After reading http://wiki.mamedev.org/index.php/LAY_File_Basics_-_Part_I (http://wiki.mamedev.org/index.php/LAY_File_Basics_-_Part_I) and testing over and over again, i just can`t get a the marquee image properly positioned on a 16:3 cut LCD panel (2nd display). No matter how a tweak the x=*.* and y=*.* values the image will always be at the centre on the screen (thus partially invisible). Is ther a way? what am i doing wrong? This is my default.lay file I am testing with:

<mamelayout version="2">
   <element name="marquee">
      <image file="3wonders_marquee.png" />
   </element>
   
   
   <view name="Marquee_Only">
      <marquee element="marquee">
         <bounds x="0" y="0" width="16" height="3" />
      </marquee>
   </view>
   
   
</mamelayout>

Help please!
Title: Re: Artwork .lay files, how to place the marquee image. Help!
Post by: PL1 on April 07, 2018, 11:39:53 pm
I'm just spitballing here, but have you tried the other way of defining bounds?
Code: [Select]
<bounds left="0" top="0" right="16" bottom="3" />
Quote
You can control the bounds either by specifying left/top/right/bottom coordinates, or by specifying x/y/width/height coordinates. But only one or the other.

If that doesn't work, maybe the X/Y or left/top/right/bottom values shouldn't be set to "0".
Code: [Select]
    <?xml version="1.0"?>
    <mamelayout version="2">
        <view name="Cocktail">
            <screen index="0">
                <bounds left="-1.33333" top="0.0" right="0.0" bottom="1.0" />
            </screen>
            <screen index="0">
                <bounds left="0.01" top="0.0" right="1.34333" bottom="1.0" />
                <orientation rotate="180" />
            </screen>
        </view>
    </mamelayout>

http://wiki.mamedev.org/index.php/Layouts_and_Rendering_for_MAME_Artwork_System (http://wiki.mamedev.org/index.php/Layouts_and_Rendering_for_MAME_Artwork_System)


Scott
Title: Re: Artwork .lay files, how to place the marquee image. Help!
Post by: nexusmtz on April 08, 2018, 03:08:38 am
Elements will be centered on the screen unless they have some position relative to something else, such as the bounds of the view.
In other words, the bounds of the view would establish that the whole view is 16:9, and the bounds of the marquee establish the marquee's position and size.

For a simplified example, if you have the "top third" of the original display, you'd want
Code: [Select]
    <view name="Marquee_Only">
      <bounds x="0" y="0" width="16" height="9" />
      <marquee element="marquee">
         <bounds x="0" y="0" width="16" height="3" />
      </marquee>
   </view>

For the "bottom third", you'd want
Code: [Select]
    <view name="Marquee_Only">
      <bounds x="0" y="0" width="16" height="9" />
      <marquee element="marquee">
         <bounds x="0" y="6" width="16" height="3" />
      </marquee>
   </view>

My marquee monitor is a full monitor with a mat that splits the screen into two bordered sections. I can place elements in the top or bottom section using this method (with different numbers, of course). You only have one usable section, but the concept is the same.
Title: Re: Artwork .lay files, how to place the marquee image. Help!
Post by: Edglaf on April 08, 2018, 05:56:31 am
That's right nexusmtz!

I had e-mailed to the expert Mr. Do and he has just replyed more or less the same.

This is what worked for me with a perfect fit:

<!-- marquee.lay -->

<mamelayout version="2">
   <element name="marquee">
      <image file="3wonders_marquee.png" />
   </element>
 
   
   <view name="Marquee_Only">
    <bounds x="0" y="0" width="1920" height="1080" />
      <marquee element="marquee">
         <bounds x="0" y="0" width="1920" height="360" />
      </marquee>
   </view>
 
 
</mamelayout>

The frame (first boundary to define the view area) seems to work for every nowadays regular LCD display. In the second boundaries line I just had to calculate the proportion in pixels, as the panel is cut only from the top 1/3 downwards. The horizontal parameter stays the same. Anyway, I could have saved the hazzle of calculating the proportions in terms of pixels. Just defining the bare proportion like Nexus did works exactly the same (16:9 and 16:3). It seems that mame will always to make the perfect stretch in pixels for you.

Thank you very much to both of you,