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

Pages: [1] 2
1
General / [HELP] Adjust the position of the selected game
« on: September 16, 2018, 09:55:32 AM »
Hello everyone I'm having a hard time adjusting the position of the game when it is selected, natively it comes in the middle of the layout, I would like to adjust it more to the left over the "play game" image, please can anyone help?




Below I leave the code I'm using for someone to help.

Layout.nut:

Code: [Select]
// Include the converyour helper module
fe.load_module("conveyor_helper");

/*
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Horizontal List Demo
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A horizontal List with all valid options
Omitted options will use the defaults

*/

// initialize the horizontal list
local hList = MyGameList();

// ----------- General List Options -----------
hList.type = ch.Linear_Horizontal; // OPTIONS: ch.Spinwheel / ch.Linear_Vertical / ch.Linear_Horizontal
hList.bend.direction = ch.Right;  // OPTIONS: ch.Left / ch.Right
hList.x = 0; // OPTIONS: top left x-coordinate if gamelist is linear or the center x-coordinate if a spinwheel
hList.y = 195; // OPTIONS: top left y-coordinate if gamelist is linear or the center y-coordinate if a spinwheel
hList.width = fe.layout.width; // OPTIONS: linear game list total width in pixels
hList.height = 500; // OPTIONS: linear list's height in pixels
hList.ms_speed = 300; // OPTIONS: in milliseconds, sets the speed of the conveyor
hList.fade_after_nav = 255; // OPTIONS: 0-255 Fades the entire gamelist's alpha channel after navigation to this value. set to 255 to disable fading
hList.fade_delay = 1000; // the amount of time in milliseconds before the fade should start
hList.fade_speed = 1; // the mulitplier controlling the speed of the fade
hList.fade_selected = false; // OPTIONS: TRUE/FALSE fade selected game if gamelist fading is active

// ----------- Linear List options -----------
hList.linear.padding = 10; // the amount of padding in pixels between each gamelist item

// ----------- List Item  Options -----------
hList.item.contentTemplate = ch.Custom; // OPTIONS: ch.Artwork / ch.Text / ch.Artwork_and_Text / ch.Artwork_or_Text / ch.Flyer_and_Artwork
hList.item.count = 5; // OPTIONS: Total number of gamelist items to display
       
hList.item.sizeScaling.low = 0.90; // OPTIONS: 0-100 Scaling size percentage to use for the item furthest from the selected item
hList.item.sizeScaling.high = 0.90; // OPTIONS: 0-100 Scaling size percentage to use for item closest to the selected item
hList.item.sizeScaling.currentlySelected = 1.15; // OPTIONS: 0-100 Scaling size percentage to use for the currently selected item
       
hList.item.alphaScaling.low = 255; // OPTIONS: 0-100 Scaling size percentage to use for the item furthest from the selected item
hList.item.alphaScaling.high = 255; // OPTIONS: 0-100 Scaling size percentage to use for item closest to the selected item
hList.item.alphaScaling.currentlySelected = 255; // OPTIONS: 0-100 Scaling size percentage to use for the currently selected item
       
hList.item.height = 500; // OPTIONS: Height of each gameList item in pixels before scaling - dynamic with linear vertical lists
hList.item.width = 270; // OPTIONS: Width of each gameList item in pixels before scaling - dynamic with linear horizontal lists
       
hList.item.margin.left = 0; // OPTION: bounding box left margin size for all images and text
hList.item.margin.right = 12; // OPTION: bounding box right margin size for all images and text
hList.item.margin.top = 12; // OPTION: bounding box top margin size for all images and text
hList.item.margin.bottom = 12; // OPTION: bounding box bottom margin size for all images and text
       
// ----------- List Item Content: borders / backgrounds / gloss / colors  -----------
hList.item.toggle.backgroundColor = false; // if set to "TRUE" the game item background can be colored (use item.normal.color)
hList.item.toggle.backgroundFile = false; // if set to "TRUE" the game item will use a file as the background (file: item_backgroundFile.png)
hList.item.toggle.selectedBackgroundColor = true; // if set to "TRUE" the selected game item background can be colored (use item.currentlySelected.color)
hList.item.toggle.selectedBackgroundFile = false; // if set to "TRUE" the selected game item will use a file as the background (file: item_selectedBackgroundFile.png)
hList.item.toggle.glossOverlay = false; // if set to "TRUE" will overlay the game item with a gloss file (file: item_glossOverlay.png)
hList.item.toggle.borderOverlay = false; // if set to "TRUE" will overlay the game item with a boarder file (file: item_borderOverlay.png)

hList.item.normal.color.red = 0; // OPTIONS: background red color channel 0 - 255
hList.item.normal.color.green = 0;                // OPTIONS: background green color channel 0 - 255
hList.item.normal.color.blue = 0;                  // OPTIONS: background blue color channel 0 - 255
       
hList.item.currentlySelected.color.red=255; // OPTIONS: background red color channel 0 - 255
hList.item.currentlySelected.color.green=0;        // OPTIONS: background green color channel 0 - 255
hList.item.currentlySelected.color.blue=0;        // OPTIONS: background blue color channel 0 - 255
       
// ----------- List Item Content: Text -----------
hList.text.message = "[Title]";
hList.text.alignment = Align.Centre;  // OPTIONS:left/right/center
hList.text.normal.font = "Arial";
hList.text.normal.size = 18; // OPTIONS: text font size for every gameList item
hList.text.normal.color.red = 0; // OPTIONS: text font red color channel 0 - 255
hList.text.normal.color.green = 0; // OPTIONS: text font green color channel 0 - 255
hList.text.normal.color.blue = 255; // OPTIONS: text font blue color channel 0 - 255

hList.text.currentlySelected.font = "Arial";
hList.text.currentlySelected.size = 24; // OPTIONS: text font size for every gameList item
hList.text.currentlySelected.color.red = 255; // OPTIONS: text font red color channel 0 - 255
hList.text.currentlySelected.color.green = 0; // OPTIONS: text font green color channel 0 - 255
hList.text.currentlySelected.color.blue = 0;  // OPTIONS: text font blue color channel 0 - 255
       
// ----------- List Item Content: User Defined Artwork -----------
hList.artwork.type = "wheel"; // OPTIONS: name of the artwork to use for the conveyour
hList.artwork.type2 = "snap"; // OPTIONS: name of the artwork to use for the conveyour setting "Flyer_and_Artwork"
hList.artwork.preserveAspect = true; // OPTIONS: true / false


//---------------------------------------------------------
//
// Configure a custom game item instead of using the built
// in settings
//
//---------------------------------------------------------
if (hList.item.contentTemplate == ch.Custom)
{
local object = hList;
local temp = null;
local x = 0
local y = 0
local w = object.item.width
local h = object.item.height

//--------------------------------------------------------------------------------
// The Artwork and text object order is important because it determines the
// correct working of the text fallback function when artwork is not available.
// If the automatic process does not handle this correctly, it can specifically be
// set using the properties: 'text_fallback_index' and 'artwork_text_index'.
// The index numbers are calculate using the example below.
//--------------------------------------------------------------------------------


// Artwork index #2 - Flyer frame (Artwork index 0 & 1 are always background and selected images)
temp = object.add_customGameItemContent("image", fe.script_dir + "frameflyer.png", 8 , 0 , w-16 ,h );
temp.preserve_aspect_ratio = false;
temp.trigger = Transition.EndNavigation;

// Artwork index #3 - Game Flyer
temp = object.add_customGameItemContent("artwork", "flyer", 20 , 20 , w-40 ,h-40 );
temp.preserve_aspect_ratio = false;
temp.trigger = Transition.EndNavigation;

// Text index #0 - the word 'AttractMode Test' just written to the left of the flyer
temp = object.add_customGameItemContent("text", "AttractMode Test", x + object.text.normal.size/2, 10, h, 0);
temp.font = object.text.normal.font;
temp.align = Align.Left;
temp.charsize  = 12;
temp.rotation = 90;

// Artwork index #4 - show a video of the game and set the shader
//temp = object.add_customGameItemContent("artwork", "snap", w - w*0.40 , h - h*0.30 , w*0.40 ,h*0.30 );
//temp.preserve_aspect_ratio = false;
//temp.trigger = Transition.EndNavigation;
//local sh = fe.add_shader( Shader.VertexAndFragment, "shaders/crt.vert", "shaders/crt.frag" );
//sh.set_param( "rubyInputSize", 320, 240 );
//sh.set_param( "rubyOutputSize", ScreenWidth, ScreenHeight );
//sh.set_param( "rubyTextureSize", 320, 240 );
//sh.set_texture_param("rubyTexture");
//temp.shader = sh;

// Artwork #5 - add tvframe to the video
temp = object.add_customGameItemContent("image","TVframe.png",w - w*0.40 , h - h*0.30 , w*0.40 ,h*0.30 )

// Text object #1  - this will be configured as the 'text_fallback_index' because it has the name of the game
temp = object.add_customGameItemContent("text", "[Title]", x, h*0.5, w, 0);
temp.font = object.text.normal.font;
temp.charsize  = object.text.normal.size;
temp.align = object.text.alignment;

// insert Favorite Banner
object.add_favoriteImage(fe.script_dir + "favorite2.png", 8 , 2 , w-40 ,h-40);

// --------------------------------------------------------------------------------------------------------
// the next three settings are optional. Use gi_textFallback to activate the automatic showing of text,
// when artwork is not available for a game. The setting of  'text_fallback_index' and 'artwork_text_index'
// should only be used the automatic process is not working or the conveyour handling of the test is just wrong.
// --------------------------------------------------------------------------------------------------------
object.gi_textFallback = true;
object.text_fallback_index= 1; // text object to turn off/on when the "artwork_test_index" is not available
object.artwork_test_index = 3; // test for this artwork index if the game text should be shown

}
// show the horizontal list
hList.show();

Module Download:

http://www.mediafire.com/file/c5pc8873h1uublm/conveyor_helper.rar/file

2
General / Re: [HELP] Date does not appear in the layout
« on: September 15, 2018, 12:13:09 PM »
Couldn’t sleep. Fully working and tested example. I choose to go with magic function because it’s only called on signal. It might make things speedier not being called every tick. Shouldn’t need to update in real time I would think, unless displaying hours/min/sec.

Code: [Select]
// Date
function updateTimestamp() {
  local days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
  local months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
  local now = date();
  return now.day + "/" + months[now.month] + "/" + now.year;
}
local timestamp = fe.add_text("[!updateTimestamp]", 0, 0, fe.layout.width, fe.layout.height/20);

 :) :) :) :) :) :)keilmillerjr friend thank you very much your code worked perfectly in my layout, it was this result that I was wanting to get, great thank you for your support your codes are excellent.




3
General / Re: [HELP] Date does not appear in the layout
« on: September 14, 2018, 05:56:34 PM »
now.month returns a value 0-11, perfect for indexing an array.

I suggest starting simple. Comment out the function and object. Create an instance of the now class. Print to console the month. If value checks out, create your month array with string values, and print array with now.month as the index. Does it work?

I am super exhausted. Will check back with you tomorrow afternoon and help troubleshoot if your still having issues.

Thanks for the help, I'll try something else here.

4
General / [HELP] Date does not appear in the layout
« on: September 14, 2018, 03:23:44 PM »
Hello everyone, I am having difficulty with this code I would like the date to appear in layout but it does not work, I tried with another way it appears but the month is delayed, instead of being month 09, it is 08, I would like it to look at the names and present the names according to the code, can anyone help?

Code: [Select]
//Date
local dt = fe.add_text( "", ::flw * 0.350,::flh * 0.360,::flw * 0.411,::flh * 0.032 );
function update_date( ttime )

local days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
local months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]

{
local now = date();
dt.msg = ("%s", days[now.wday]) + "/" + ("%s", months[now.month]) + "/" + ("%02d", now.day ) + "/" + ("%04d", now.year );
}
fe.add_ticks_callback( this, "update_date" );

PS:
This code appears below but it does not work very well, it is not in the correct format:



Code: [Select]
//Date
local dt = fe.add_text( "", ::flw * 0.350,::flh * 0.360,::flw * 0.411,::flh * 0.032 );
function update_date( ttime )

{
local now = date();
dt.msg = ("%s", now.wday) + "/" + ("%s", now.month) + "/" + ("%02d", now.day ) + "/" + ("%04d", now.year );
}
fe.add_ticks_callback( this, "update_date" );

Help Please.


5
Scripting / Re: custom loading screen for every game.
« on: August 27, 2018, 03:52:33 PM »
Looks great! We can incorporate this feature to the plugin as optional and fade after loading screen is shown for a specific time.?


I use this plugin in AM PC, but when I start the game I get a black screen, and there is no image of the game.
Can you explain more about the plugin?

6
General / Re: Generate romlist from .tag files
« on: August 27, 2018, 03:01:07 PM »
Ok, you must use commandline arguments to start the exe.

In your case, Tag2Romlist -path . -romlist Favorites.txt -sort

Will not work just to double-click on the exe.

Big Thanks for use in cmd worked fine.

7
General / Re: [Help] Display Favorites
« on: August 26, 2018, 03:31:09 PM »
Check that the files are not read only. Check the permissions of the files. And run the batch as administrator. I do not have any problem.

And if you're working on disk C: I advise you to change from disk, to D:, for example, with a new partition or another disk.


thank you! I tried in all ways but it does not work for me, just like disc, C :, D:, E: and F: no directory, it does the work for MAME games but when it arrives on other console it gives the image error above.

8
General / Re: Generate romlist from .tag files
« on: August 26, 2018, 03:17:37 PM »
Hi, well that's what this program does.
If you got your romlists with .tag files in e.g. C:\Attract\romlists, you can run this program like this:

Tag2Romlist -path C:\Attract\romlists -romlist Favorites.txt -sort

It will then create a Favorites.txt in c:\Attract\romlists directory.

In my …\romlists directory, i got many .tag files. (Commodore 64.tag, Arcade.tag, Metal Slug Collection.tag etc...),
They have corresponding .txt files which contains all of their roms. (Commodore 64.txt, Arcade.txt Metal Slug Collection.txt etc....)
Check your ...\romlists and make sure you've got .tag files and .txt files there.

You can run the .exe from anywhere. I have made a shortcut on my desktop for easy execution.

See not work for my.

https://youtu.be/xVRO1uKMWlY

9
General / Re: Generate romlist from .tag files
« on: August 26, 2018, 12:31:03 PM »
Build for 64-bit windows. Maybe you need some redistributables installed.
hello,
the operating system and windows X, but the program does not really work, when running does not contain anything, tried to use in all possible directories, but not generate the list of favorite systems, please put the option to create the list in any directory, and also being able to execute the file anywhere is easier, but the current one really does not work.




what we really need and a file that reads all .tag files, and create a .txt file with the information of the .tag files to create a list of favorites, eg: nes.tag, snes.tag, mame.tag, and other systems in a single .txt file.

10
General / Re: [Help] Display Favorites
« on: August 26, 2018, 12:17:49 PM »
Change this path in batch file C:\HyperArcade\romlists\ for your path.  8)


yes I changed the path, but I get error in other favorites, when the names of the files contain space, the program does not read, it simply gives this message.

test please:

http://www.mediafire.com/file/fwhaxfskc9niz14/Desktop.rar/file


11
General / Re: Generate romlist from .tag files
« on: August 26, 2018, 11:53:45 AM »
not working.

12
General / Re: [Help] Display Favorites
« on: August 26, 2018, 08:01:24 AM »
Thanks!!! iOtero. to MAME I had a good success but for the other systems do not create list in Favorites.txt the bat file of a message that could not be located



Try this:

Code: [Select]

@echo off
setlocal EnableDelayedExpansion EnableExtensions
rem ================================================================================
rem This script basically does the same thing as DM's favorites romlist generator
rem but on Windows [Shouts to him for the pi version ;)].
rem How it works:
rem It grabs all the (tagged) favorites from every tag file, searches for them
rem through all the romlists, then generates a romlist called Favorites.txt
rem Written by Steve Sherrod, 05/20/17, as part of project HyperPie Expanded
rem ================================================================================

rem Default path (on windows). This should point to your attract modes romlists dir
cd "C:\HyperArcade\romlists\"

echo ==========================================================
echo     AM favorites romlist generator script for Windows
echo ==========================================================

sleep 1

echo - Backing up old Favorites.txt file

rem remove the old Favorites.txt and create the backup
if exist Favorites.txt (
move /y Favorites.txt Favorites.txt.backup
)

echo - Gathering list of favorites (tag files)

set /a numfavorites=0
set /a romlist=0

rem loop through each tag file
for %%f in (*.tag) do (
echo - Processing tag file: %%~nf.tag
set /a numtagfiles=numtagfiles+1

rem loop through favorites stored in tag file
for /f "tokens=*" %%a in ('type "%%~nf.tag"') do (

set /a numfavorites=numfavorites+1
set favorite=%%a

echo - Searching rom list: %%~nf.txt for rom: %%a

rem loop through each rom file and parse favorited (tagged) roms
for /f "tokens=*" %%s in ('type "%%~nf.txt"') do (
set /a romlist=romlist+1
set str=%%s
rem Search current line (for current favorite substring) and if found, append it to Favorites.txt
echo."!str!" | findstr /C:%%a>nul && (
echo "!str!">>"Favorites.txt"
)
)
)

echo - Favorites.txt romlist generated. !numtagfiles! romlists read, !numfavorites! favorites written to disk
echo - Done
echo.
echo Add a display in Attract Mode and set its romlist to the newly created Favorites.txt
)

13
General / [Help] Display Favorites
« on: August 26, 2018, 07:33:47 AM »
Hello everyone, I'm working on the Favorites screen, but I'm not getting AM to read all the .tag files that are inside the "romlist" directory, for the new screen it only gives me the option to select a single screen to display the favorite files, my question is how do I make AM read all the .tag files of favorites and show them all in just one screen?
PS: Arcade.tag, nes.tag, atari.tag -----> in just one screen.




14
Themes / Re: Arcadebliss and newstation custom mix
« on: August 17, 2018, 05:53:12 PM »
For me the favorites are not working after pressing the F key . Does anyone have any ideas?




15
Scripting / Re: KeyboardSearch module
« on: August 13, 2018, 07:01:19 PM »
my search screen is in the upper left corner, my question is, and how do I get it to the center of the screen?

Pages: [1] 2