Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - PocketChange

Pages: [1]
1
Scripting / preserve_aspect_ratio flag not working with add_image?
« on: April 15, 2021, 02:17:45 PM »
I'm woking on a theme and am running into a possible bug. Would someone please help confirm that this is an issue with current AM 2.6.1.

When trying to use add_image, the preserve_aspect_ratio flag is not working and the image will always be stretched to the defined width/height. However, the flag does work correctly with add_artwork.

Looking through the forums I found a few older posts that seem to confirm that this is an issue, but I have not seen it directly addressed.  In case this is a platform specific issue then I am currently using Win10.

Thank you.

2
Scripting / Re: How to detect the layout is presenting the display menu?
« on: February 18, 2020, 11:30:27 AM »
On the Displays Menu layout options you can set the prompt name of the display. For example mine is "Main Menu"

Code: [Select]
if (fe.list.name == "Main Menu") {
//See if this works
}

3
Scripting / Re: Displays menu - detect current selection
« on: February 17, 2020, 02:14:04 PM »
fe.displays[fe.list.display_index].name ? Doing from memory. Correct if wrong.

From what I have researched this should work, but any usage of
Code: [Select]
local selectionname = fe.displays[fe.list.display_index].name; ends the script.  I'm not certain what is happening here yet.  It will not work to assign to a variable, or in a comparison.  I can see other examples of it's usage in these forums and in those examples the usage is no different.  Is there some extra context that is necessary? Maybe this property is not available when in the displays menu?

Update:
Testing has confirmed that while this works for normal themes, this will not work for the Displays menu.  Is there anything that can be used for the displays menu?  The current list selection has to be stored somewhere, right?

4
Scripting / Displays menu - detect current selection
« on: February 17, 2020, 11:49:12 AM »
I am trying to create a displays theme and am having difficulty with finding the currently selected display name.  The best option so far appears to be   fe.game_info(Info.Name), but I can only seem to get this value on the initial startup of the theme.

Code: [Select]
local selectionname = fe.game_info(Info.Name);

function my_transition_check( ttype, var, ttime ) {
   switch ( ttype ) {
    case Transition.StartLayout:
    case Transition.ToNewSelection:
    case Transition.ToNewList:
    case Transition.EndNavigation:
        selectionname = fe.game_info(Info.Name);
        local textselectionname = fe.add_text(selectionname, flx*0.18, fly*0.905, flw*0.3, flh*0.035 );
       break;
  }
 return false;
}
fe.add_transition_callback("my_transition_check" );

This works on Transition.StartLayout, but not for any other transitions. Just never updates when selecting from the wheel. If I enter a display and return back then it is updated with the new value.

I need someone else's eyes to point out my mistake. Any help is appreciated.


Pages: [1]