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

Pages: 1 [2] 3
16
Scripting / Reload a module "Transition.ToNewList"
« on: April 21, 2018, 02:40:01 AM »
Any way to reload a module when I change to another gamelist?
I mean , I have made a little change to the conveyour_helper from Arcadebliss:

http://forum.attractmode.org/index.php?topic=1945.45

Lines 1989 - 1990

Code: [Select]
filename = "fe.script_dir "+fe.game_info(Info.Emulator)+".png";
filename = (fileExist(filename)) ? filename :  amPath + "modules/conveyour_helper/"+fe.game_info(Info.Emulator)+".png";

So , if I have the same layout for different systems it doesnt change my "emulatorbackground" I need the layout to reload the module every time I change to another list,system,emulator...

17
I made this function , the final goal is to show a "pdfIcon" when you have the game manual on the selected folder "pdffilepath"

Code: [Select]
// pdfIcon

local pdffilepath="H://Attract//layouts//Basic//pdf//";
local game_name = fe.game_info(Info.Name);
local pdffile = pdffilepath + game_name + config["extension"];

local littlepngicon = fe.add_image( "manual.png", 0, 0, 200, 200);

fe.load_module("file");
function file_exist(pdffile)
   {
   print(pdffilepath + game_name + config["extension"]);
   try {file(pdffile, "r" );return true;}catch(e){return false;}
   }

if (file_exist(pdffile)) littlepngicon.visible=true
else  littlepngicon.visible=false;

Thanks to Daimon , Oomek and the other people who helped with the code.

As I said , only works when I start the frontend, If I start AM and the last selected game has the pdf manual the icon shows.
But when I move between the diferent games it doesnt change.
I mean if appears when I start the f.e. keeps showing all the time and if I selected a game who doesnt have the pdf manual - close A.M. - and open it again the icon is gone and doesnt shows anymore even if I move to a game who has the pdf manual.

Any help?

18
Scripting / Styling the filters menu and exit window , how?
« on: January 27, 2018, 05:14:51 AM »
Is there any way to add a custom "style" to the filters menu?
I mean , I saw a custom "exit" window on some new A.M. versions but cant find how it works.




19
Themes / Scrolling gamelist machi
« on: November 19, 2017, 07:24:33 AM »
Maybe someone can take this code an "improve" a plugin or wathever to create scrolling gamelists.
Also I´m sharing a basic psd template to create your own background and change the default ones.

https://youtu.be/XRl2NmTsZP0


20
I see some layouts with "click" sounds but only using wheel module.
I want to add a "click.mp3" sound when I select a new game but with for example the "Basic" layout.
Tried this example:

Code: [Select]
function transition_callback(ttype, var, ttime)
{
    switch ( ttype )
    {
        //case Transition.StartLayout:
case Transition.ToNewSelection:
                 local Wheelclick = fe.add_sound("Click.mp3")
Wheelclick.playing=true
            break;
    }
    return false;
}

http://forum.attractmode.org/index.php?topic=221.0


But doesnt work.

UPDATE: Solved found the solution on fry theme , thanks @jedione

Code: [Select]
function fade_transitions( ttype, var, ttime ) {
 switch ( ttype ) {
  case Transition.ToNewSelection:
  case Transition.ToNewList:
local Wheelclick = fe.add_sound("Click.mp3")
      Wheelclick.playing=true
  break;
  }
 return false;
}

fe.add_transition_callback( "fade_transitions" );

21
Scripting / [Plugin WIP] SumatraPDF reader (only for windows)
« on: October 16, 2017, 07:56:53 AM »
Just for testing , ONLY WORK ON WINDOWS BUILD.

Its really easy to use , just decompress in the main AM folder.
Download Sumatrapdf portable.

https://www.sumatrapdfreader.org/dl/SumatraPDF-3.1.2.zip

Put exe on "plugins\SumatraPDF\SumatraPDF.exe"

And pdf manuals like:

plugins\SumatraPDF\Game Manuals\Atari 2600\Basketball (USA).pdf

Changing "Atari 2600" for your emulator name.

*IMPORTANT* Decompress on the main AM instalation folder.


P.D. Maybe someone with more "squirrel skills" can improve the code and add the manual image found.
I´ve tried but failed  :(


22
Scripting / Show an image if an object doesnt exists
« on: October 14, 2017, 01:11:35 PM »
I`m working on a little "pdf reader" plugin.
The main idea is read our game manuals from the layout.
So I need some help to show a little png, icon or somthing when there isnt pdf manual on the respective folder.

This is how it looks.

https://www.youtube.com/watch?v=CO16rOauGgU

What I want is as I said to show some info on the layout if the game hasn´t a pdf manual.

23
Scripting / Stop loop true animation when return form game.
« on: September 23, 2017, 10:31:52 AM »
Can I stop a loop animation when I return from game?

I made this:

Code: [Select]
    when = Transition.ToGame,
    property = "alpha",
    tween = Tween.Expo
    start = 0,
    end = 255,
    time = 800,
    loop = true

So I want to stop the loop , I´ve tried this but doesnt work:

Code: [Select]
    when = Transition.FromGame,
    property = "alpha",
    start =255,
    end = 0,
    loop = false

24
https://youtu.be/MFI0cYzkKX4

Working on this idea.
I´ll paste the code in next days , maybe one or two weeks  :)

25
Emulators / executable "cmd" on linux?
« on: August 07, 2017, 04:07:26 AM »
How can I set executable as a command line on a linux system?
On windows I set "cmd" and then pass the comand line with arguments.

26
General / Rpi log when launch emulator?
« on: August 03, 2017, 07:03:08 AM »
Is there a way to see the exact command line arguments executed by AM on a Rpi when I launch a game?

On windows I usually execute the f.e. on windowed mode and copy paste from the command window.
Can I search on some log file or anything?Thanks.


27
Emulators / Problems with dfend and resfix
« on: May 29, 2017, 06:15:32 AM »
I´ve got a custom Dosbox pack with defend f.e. working.
Added to AM without issues and works great but the main problem is that when I enable the resfix plugin it fails.

In this case AM launches first Defend.exe and then Dosbox , so the plugin makes the resolution fix after launch Defend , then AM launchs Dosbox and when I press the exit button my theme is totally messy.

Any help?Thanks.

28
Scripting / Launch "pdf-reader" from layout.nut
« on: April 17, 2017, 06:57:10 AM »
Anyone can create a custom function to launch an external software , like a pdf reader by pressing "custom_1" key from AM¿?

I was thinking that could be awesome read game instruccions before launch a game.
But the thing is I won´t like to add this with a .batch command.
Just launch the pdf and close when you read weathever you want without exit AM or launch the game if you don´t want to.

29
Emulators / [Tutorial] [Update] Commodore 64 Winvice
« on: April 04, 2017, 01:36:29 PM »
This is my config for winvice:

Code: [Select]
executable           cmd
args                 /c IF EXIST "[rompath]\[name].d64". (cd "PATH TO EMULATOR" & start /wait x64.exe -fullscreen -autostart "[rompath]\[name].d64".) ELSE IF EXIST "[rompath]\[name].crt". (cd "PATH TO EMULATOR" & start /wait x64.exe -fullscreen -cartcrt "[rompath]\[name].crt".) ELSE IF EXIST "[rompath]\[name].tap". (cd "PATH TO EMULATOR" & start /wait x64.exe -fullscreen -autostart "[rompath]\[name].tap".) ELSE (cd "PATH TO EMULATOR" & start /wait x64.exe -fullscreen -autostart "[rompath]\[name].t64".)

"PATH TO EMULATOR": Emulator path with quotes.

Code: [Select]
romext               .t64;.d64;.crt;.tap

30
Scripting / Distort gamelist position?
« on: March 30, 2017, 07:01:10 AM »
Is there any option-property to do something similar to this pick on an Attract Mode layout?


Pages: 1 [2] 3