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
1
Scripting / Favourite Icon doesn´t work
« on: June 16, 2018, 12:18:51 PM »
Tried to show a "favorite" icon on my layout.

Code: [Select]
::OBJECTS <- {
fav = fe.add_image( "favorite.png", 5, 55, 60, 60 ),
}

OBJECTS.fav.visible = false;

function show_favorite( ttype, var, ttime ) {
 switch ( ttype ) {
  case Transition.ToNewList:
  case Transition.ToNewSelection:
    local inf_fav=fe.game_info(Info.Favourite);
if (inf_fav=="1")
       OBJECTS.fav.visible  = true;
    else
           OBJECTS.fav.visible  = false;
    break;
  }
 return false;
}

fe.add_transition_callback( "show_favorite" );

The thing is the icon only shows "on layout start" and if I change the selected game , shows if I have the previous or the next game selected.
I mean . if I have three games, 1, 2, 3
2 is tag as favourite
If I move to 3 , the favourite icon is showed , same with 1 , but not with 2  :(
Only if I start the f.e. with the 2 game previously selected.

2
Scripting / Problems Login
« on: June 04, 2018, 07:29:15 AM »
I´m having problems with the login page and when I try to create a new post , redirects me to a blank page.
Some other users are having the same problem.

Sorry for posting here but the "wiki" and "bug reports" section.

3
Scripting / "Clickable - surface"
« on: May 18, 2018, 07:26:09 AM »
I want to create a little sub menu inside my layout.
Something like the mini nes theme.
The idea is simple.
Click "alt+down" to enter into this submenu and then navigate to one of the free icons , click enter and "search-keyboard" plugin enable . second icon - filters menu , third icon...


4
Emulators / Autoit Error
« on: May 17, 2018, 04:11:06 AM »
Trying to create a simple script for C64 with retroarch.
All my attempts with autoit failed.

Even a basic script is sending me an error:

Code: [Select]
#NoEnv

Sleep, 1000
SetKeyDelay, -1, 110
Send {F11}
Return

Code: [Select]
error: syntax error
Sleep,

Code: [Select]
---------------------------
Aut2Exe Error
---------------------------
Line 5  (File "C:\Users\User\Downloads\AutoIt v3 Script.au3"):

Send {F11}
Send ^ ERROR

Error:
---------------------------
Aceptar   
---------------------------

Any advice?

P.D. Windows 8.1 x64 , and Autoit v3.3.14.5 , tried Admin privileges run , x86 mode...

5
Scripting / Overview "on top" thanks to Josezpin
« on: May 01, 2018, 11:22:01 AM »
So Josezpin is devoloping a working code to align the overview descriptions on top , little preview here.






https://www.youtube.com/watch?v=KE--AaSuPmk&feature=youtu.be

6
Scripting / Can I set maximum text lines?
« on: April 29, 2018, 10:15:03 AM »
I want ot add the "Overview" text but cant align from top.
So is there any way to set a maximum number of some text , I mean:

I add this code to my layout.nut , but what about if I want to show only the first three lines?

Code: [Select]
local textoverview =fe.add_text("[Overview]", flx*0.084, fly*0.4, flw*0.52, flh*0.1)

7
Themes / Auto Wheel Creator Theme
« on: April 22, 2018, 04:00:59 AM »


Video demo:

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

Explanation:

conveyour_helper_mod.zip : extract inside "modules" folder, LITTLE MOD FROM ARCADEBLISS CONVEYOUR_HELPER , ALL CREDITS TO HIM FOR HIS WORK  :)

Three "border example wheels inside the zip" , credits to "Viking" from the launchbox forums.



Base wheel names has to be the "Emulator" names to work.

Basic_md.zip : extract inside layouts folder

Example for "Sega Mega Drive" emulator



Code: [Select]
fe.layout.font = fe.game_info(Info.Emulator); Needs to be alongside the layout.nut and with the same "Emulator" name

Code: [Select]
      // ----------- List Item Content: Text -----------
      spinList.text.message = "[Title]";
      spinList.text.alignment = Align.Centre;           // OPTIONS:left/right/center
      spinList.text.normal.font = fe.game_info(Info.Emulator);
      spinList.text.normal.size = 18;                // OPTIONS: text font size for every gameList item
      spinList.text.normal.color.red = 255;            // OPTIONS: text font red color channel 0 - 255
      spinList.text.normal.color.green = 255;         // OPTIONS: text font green color channel 0 - 255
      spinList.text.normal.color.blue = 255;            // OPTIONS: text font blue color channel 0 - 255
     
      spinList.text.currentlySelected.font = fe.game_info(Info.Emulator);
      spinList.text.currentlySelected.size = 18;       // OPTIONS: text font size for every gameList item
      spinList.text.currentlySelected.color.red = 255;   // OPTIONS: text font red color channel 0 - 255
      spinList.text.currentlySelected.color.green = 255; // OPTIONS: text font green color channel 0 - 255
      spinList.text.currentlySelected.color.blue = 255;  // OPTIONS: text font blue color channel 0 - 255

Customize text and color options when "logo wheel" is not found.

Code: [Select]
         temp = object.add_customGameItemContent("text", "[Title]", 5 ,30 ,190 ,120);
         temp.font = object.text.normal.font;
         temp.word_wrap = true;
         temp.charsize  = object.text.normal.size;
         temp.align = object.text.alignment;
         temp.set_rgb(object.text.normal.color.red, object.text.normal.color.green, object.text.normal.color.blue);

Text size and position.

Code: [Select]
         temp = object.add_customGameItemContent("artwork","wheel", 20 ,60 ,150 ,60 );
         temp.preserve_aspect_ratio = object.artwork.preserveAspect;
         temp.trigger = Transition.EndNavigation;
         object.gi_textFallback = true;

Base size and position.

8
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...

9
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?

10
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.




11
Themes / Scrolling gamelist machi
« on: November 19, 2017, 07:24:33 AM »

12
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" );

13
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

14
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

15
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
Code: [Select]
    when = Transition.FromGame,
    property = "alpha",
    start =255,
    end = 0,
    loop = false

Pages: [1] 2 3