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.


Topics - allactiondan1

Pages: [1]
1
Scripting / PopUp.nut displaying image behind background
« on: March 04, 2023, 08:36:39 PM »
I want to have it that when I press a button it will display a help menu. I found an old thread here about doing just that using PopUp.nut. I did as the post said and it does display my image, but it's behind the background layer and every other layer instead of being right on top of everything. I can't seem to figure out how to change the Z order of the plugin image. I don't know if it matters but I'm using attract mode plus. Any help would be appreciated.

Here is the original thread http://forum.attractmode.org/index.php?topic=456.0

This is the script I used for popup.nut.
Code: [Select]
class UserConfig </ help="This plugin will show a popup image when the specified key is pressed." /> {
</ label="Image", help="The full path to the image that will be displayed", order=1 />
image="";
</ label="Key", help="The key that will display the image", is_input="yes", order=2 />
key="";
</ label="Hold Key", help="If enabled, you must hold the key down", options="Yes,No", order=3 />
hold="No";
};

class PopUpImage
{
        _image = null;
_key = null;
_hold = false;
_showing = false;
_key_delay = 250;
_last_check = 0;

        constructor()
        {
local config = fe.get_config();
_image = fe.add_image( config["image"], 0, 0, fe.layout.width, fe.layout.height );
_image.visible=false;
_image.preserve_aspect_ratio = true;
_key = config["key"];
_hold = config["hold"];
fe.add_ticks_callback( this, "on_tick" );
        }

function on_tick( ttime )
{
local is_down = fe.get_input_state( _key );
if ( _hold == "Yes" )
{
_image.visible = is_down;
_showing = is_down;
} else
{
if ( is_down )
{
if ( ttime - _last_check > _key_delay )
{
_last_check = ttime;
_image.visible = !_showing;
_showing = !_showing;
}
}
}
}
}

fe.plugin[ "PopUpImage" ] <- PopUpImage();

2
General / Gamesdb.net and ROM lists
« on: January 16, 2023, 04:37:21 PM »
I have been using attract mode for about five years now and I haven't needed to generate a ROM list for almost as log.  Im getting back into the scene and redoing/updating my setup.  It seems that thegamesbd. net  doesn't seem to work with attract mode for windows anymore. When I generate a list i get the windows blue ring of death and then it crashes. If i turn off info source/scraper it runs normally. My issue is that I like to have all the other info about the games that gamesdb would gather. (how many players, genres, ect..) I have tried on different days thinking that the server is down, but after some googling I found that the legacy server is off line. What are you guys using to build your ROM lists?

Thanks for any help.

Dan

Pages: [1]