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 - bjose2345

Pages: [1] 2 3 ... 8
Scripting / Re: Pause AM During Intro Movie?
« on: August 30, 2017, 03:08:26 PM »
hmm i think you need to change from the fadeart module to the animation in this case.

here is some example

Scripting / Re: Pause AM During Intro Movie?
« on: August 30, 2017, 01:18:20 PM »
hi calle81,

well the main idea is to have 2 flags and 1 timer

the function tick_fn( ttime ){} Does not have much loss there, just keep ticking a executing everyting inside the block

the first flag (max_delay) will help you to control the time in which you want to run the code

the second flag (music_active) will help to keep at bay the code inside the timer (Avoid repeating indefinitely, will execute only once or each time the layout.nut is loaded)

Scripting / Re: Pause AM During Intro Movie?
« on: August 27, 2017, 06:02:45 AM »
You can do it like keilmillerjr says

something like this

class UserConfig {
   </ label="Delay Time (0-999)", help="The amount of time (in milliseconds?) that it takes to wait for start the music", order=1 />
local music_active = false;
local delay = 0;
local max_delay = 0;
menumusic.playing = music_active;

max_delay=(max_delay>999 ? 100 : max_delay);

::fe.add_ticks_callback( this, "tick_fn" );

function tick_fn( ttime )
      if ( delay > max_delay )
         if (music_active == false){
            music_active = true;
            menumusic.playing = music_active;                     


The idea is you can configure how long you theme need to wait to start playing the music

Themes / Re: Possible to make Robospin scale with aspect ratio?
« on: August 17, 2017, 01:38:29 AM »
set the preserve_aspect_ratio = true?

Scripting / Re: Last played games
« on: August 16, 2017, 12:57:30 AM »
Does attract mode load the romlist after return from game? If so, you could use a plugin that will modify the romlist during to game transition, all in squirrel.

yeah i do that but with a shell script, here is the script

first you need to add this code in your theme, remember to register it like a callback function

Code: [Select]
function on_transition( ttype, var, ttime )

switch ( ttype )
case Transition.ToGame:
fe.plugin_command_bg( "/home/pi/.attract/", "\"" + fe.game_info(Info.Name) + ";" + fe.game_info(Info.Title) + ";" + fe.game_info(Info.Emulator) + "\"" );

and here the shell script

Code: [Select]
#!/usr/bin/env bash

# get the args

IFS=';' read -r -a array <<< "$args"

filename="/home/pi/.attract/romlists/Last Played Games.txt"
NUMOFLINES=$(wc -l < "$filename")

$(grep -q "${array[0]};${array[1]};${array[2]};;;;;;;;;;;;;;" "$filename")
if [ $? -eq 1 ]; then
if [ $NUMOFLINES -lt 11 ]; then
sed -i -e '$a\'"${array[0]};${array[1]};${array[2]};;;;;;;;;;;;;;" "$filename"
sed -i '2d' "$filename"
sed -i -e '$a\'"${array[0]};${array[1]};${array[2]};;;;;;;;;;;;;;" "$filename"

you can modify this line

Code: [Select]
if [ $NUMOFLINES -lt 11 ]; then
with any number you want if you want the last 20, put 21, because you need always 1 line in your romlist, the sed command doesnt work in empty files.

Scripting / Re: Last played games
« on: August 14, 2017, 11:52:06 PM »
I sorted this through a shell script, if some one want it I can post it, but still I'm perfecting it.

General / Re: debug Attract-mode with Microsoft Visual Studio?
« on: August 11, 2017, 03:39:58 AM »
I've not had a chance to try Attract-Mode in Visual Studio myself.  Is Visual Studio able to import project files from other programs?  If it can there is a codeblocks project in the attract-mode source directory that you might be able to use to get you started...

Sorry for resurrecting such old thread but I am looking to do the same now, where I can get the code block project? my main idea is starting to debug the code and try to learn more, go to the next step, or any other way to start to debug the code in windows.

thanks and kind regards

General / Re: Game info
« on: August 11, 2017, 12:47:00 AM »
Its depends on the system, for example when you scrap against, you need to put exactly the name of the system ...

hit tab > emulators > search your system (Atari 2600 for example), be sure that your system indentifier name is Atari 2600 and that is.

General / Re: So is this thing dead then?
« on: August 11, 2017, 12:30:16 AM »
Only in the freezer for some time but being as it is very functional and practical to use, I love attract mode that any other frontend because you can made almost (not all but almost all) from scratch.

Scripting / Re: Shell call to Attract Mode "exit emulator" function.
« on: August 11, 2017, 12:25:11 AM »
I think you need to search is for the pid for the emulators (if you are using retropie, searh for the route opt/retropie/emulators/ ) and if one of those are running you send the kill -QUIT command to that pid

Scripting / Last played games
« on: August 11, 2017, 12:19:07 AM »
Hi good fellas, i have the next question and I hope someone could help me on this

I'm looking to keep a list of the last 10 games played, there's a way to do that? I know that there is a functionality but I have not seen anything in the official documentation or forums.

Thanks and kind regards.

General / Re: Broken new user registrations
« on: August 06, 2017, 03:54:42 AM »
Thanks for sorted this out Ray.

Hope to see more updates in the future  ::)

Maybe my words were misinterpreted, I did not mean to say that it was an intentional behavior, but it is something that often happens  because of the way the code is made.

Themes / Re: Animate selected text color ?
« on: July 28, 2017, 11:29:14 AM »
I think you cant (maybe im wrong) ... but you can use for example 2 Overlays, one overlapping the other , Overlay A with blue color and Overlay B with a red color, then only put Overlay A alpha = 255 and Overlay B = 0 (hiding one and showing another), and animated the alpha property, from Overlay A to go from 255 to 0 and Overlay B do the opposite 0 to 255 and there you go.

It is the carousel script, the way it works

Pages: [1] 2 3 ... 8