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

Pages: [1]
1
Scripting / Attract-Mode BUG: Listbox not fade correctly.
« on: July 17, 2018, 10:33:53 AM »
I use this code to fade a listbox after 3.5 seconds:

Code: [Select]
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;

// Listbox
if(my_config["wheel_type"] == "listbox")
{
::OBJECTS <- {lbx = fe.add_listbox(flx*0.76, fly*0.33, flw*0.20, flh*0.64)}
OBJECTS.lbx.rows = 21;
OBJECTS.lbx.charsize = 24;
OBJECTS.lbx.align = Align.Centre;
OBJECTS.lbx.selbg_alpha = 0;
OBJECTS.lbx.set_selbg_rgb(255,255,255);
OBJECTS.lbx.set_rgb(0,0,0);
OBJECTS.lbx.set_sel_rgb(255,255,255);

// Fade Listbox
local move_lbx1 = { when = Transition.ToNewSelection, property = "alpha", start = 0, end = 255, time = 1} 
local move_lbx2 = { when = When.ToNewSelection, property = "alpha", start = 255, end = 0, time = 2500, delay = 3500} 
animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx1));
animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx2));
}

But it does not fade correctly.

The rest of the listbox fades correctly, but the selected field in the listbox remains visible.

It seems totally an Attract-Mode bug.

Does anyone know why this happens?

Is there any solution?

Edit: The bug has been confirmed in "Bug Reports" by Oomek. As soon as there is a solution, I will communicate it here.

2
Scripting / Two functions to create boxes and frames
« on: July 11, 2018, 06:45:40 AM »
It seems to me that AM does not have functions for this, so if someone can be useful, two functions to create boxes and frames:

Code: [Select]
// Two functions to create boxes and frames
//
// First: Create a white png 1x1 pixels sized. Save as "white_point.png"
// Create a folder named objs in your layout and copy "white_point.png" into it.
//
// Function draw_box(box_x,box_y,box_w,box_h,box_r,box_g,box_b,box_a,box_s)
//
// box_x --> The x coordinate of the top left corner of the box (in layout coordinates).
// box_y --> The y coordinate of the top left corner of the box (in layout coordinates).
// box_w --> The width of the box (in layout coordinates).
// box_h --> The height of the box (in layout coordinates).
// box_r --> Set red colour level for the box. Range is 0-255.
// box_g --> Set green colour level for the box. Range is 0-255.
// box_b --> Set blue colour level for the box. Range is 0-255.
// box_a --> Set alpha level for the box. Range is 0-255.
// box_s --> Width of the box shadow (in layout coordinates). Set 0 for no shadow.

function draw_box(box_x,box_y,box_w,box_h,box_r,box_g,box_b,box_a,box_s)
{
if(box_s != 0)
{
local bflw = fe.layout.width;
local bflh = fe.layout.height;

local dbox = fe.add_image("objs/sys/white_point.png", box_x+box_s, box_y+box_s, box_w, box_h);
dbox.set_rgb(0,0,0);
dbox.alpha=255;
}

local dbox = fe.add_image("objs/sys/white_point.png", box_x, box_y, box_w, box_h);
dbox.set_rgb(box_r,box_g,box_b);
dbox.alpha=box_a;

}

// Function draw_frame(box_x,box_y,box_w,box_h,box_r,box_g,box_b,box_a,box_s)
//
// frame_x --> The x coordinate of the top left corner of the frame (in layout coordinates).
// frame_y --> The y coordinate of the top left corner of the frame (in layout coordinates).
// frame_w --> The width of the frame (in layout coordinates).
// frame_h --> The height of the frame (in layout coordinates).
// frame_r --> Set red colour level for the frame. Range is 0-255.
// frame_g --> Set green colour level for the frame. Range is 0-255.
// frame_b --> Set blue colour level for the frame. Range is 0-255.
// frame_a --> Set alpha level for the frame. Range is 0-255.
// frame_fw --> The Width of the border of the frame (in layout coordinates).
// frame_fh --> The Height of the border of the frame (in layout coordinates).

function draw_frame(frame_x,frame_y,frame_w,frame_h,frame_r,frame_g,frame_b,frame_a,frame_fw,frame_fh)
{
local dframe1 = fe.add_image("objs/white_point.png", frame_x, frame_y, frame_w, frame_fh);
dframe1.set_rgb(frame_r,frame_g,frame_b);
dframe1.alpha=frame_a;

local dframe2 = fe.add_image("objs/white_point.png", frame_x, frame_y+frame_h, frame_w, frame_fh);
dframe2.set_rgb(frame_r,frame_g,frame_b);
dframe2.alpha=frame_a;

local dframe3 = fe.add_image("objs/white_point.png", frame_x, frame_y, frame_fw, frame_h);
dframe3.set_rgb(frame_r,frame_g,frame_b);
dframe3.alpha=frame_a;

local dframe4 = fe.add_image("objs/white_point.png", frame_x+frame_w, frame_y, frame_fw, frame_h+frame_fh);
dframe4.set_rgb(frame_r,frame_g,frame_b);
dframe4.alpha=frame_a;
}

// Example: Draw two boxes and one frame
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;
draw_box(flx*0.3, fly*0.3, flw*0.5, flh*0.5, 175, 175, 175, 255,flw*0.005);
draw_box(flx*0.35, fly*0.35, flw*0.4, flh*0.4, 135, 175, 50, 150,0);
draw_frame(flx*0.35, fly*0.35, flw*0.4, flh*0.4, 255, 0, 0, 255, flw*0.002, flh*0.003);

3
Scripting / Animate a Shuffle List
« on: June 28, 2018, 03:35:00 PM »
I want to make an animation of a Shuffle List made with the keilmillerjr module.

It is this:

Code: [Select]
// List
if (my_config["wheel_type"] == "list")
{

fe.load_module("shuffle");

local list = Shuffle(10, "text", "[Title]");

list.slots[0].set_pos(flx*0.75, fly*0.17, flw*0.25, flh*0.042);
list.slots[0].set_rgb(R,G,B);
list.slots[0].charsize = font_list_size;
list.slots[0].align = my_align;

list.slots[1].set_pos(flx*0.75, fly*0.20, flw*0.25, flh*0.042);
list.slots[1].set_rgb(R,G,B);
list.slots[1].charsize = font_list_size;
list.slots[1].align = my_align;

list.slots[2].set_pos(flx*0.75, fly*0.23, flw*0.25, flh*0.042);
list.slots[2].set_rgb(R,G,B);
list.slots[2].charsize = font_list_size;
list.slots[2].align = my_align;

list.slots[3].set_pos(flx*0.75, fly*0.26, flw*0.25, flh*0.042);
list.slots[3].set_rgb(R,G,B);
list.slots[3].charsize = font_list_size;
list.slots[3].align = my_align;

list.slots[4].set_pos(flx*0.75, fly*0.29, flw*0.25, flh*0.042);
list.slots[4].set_rgb(R,G,B);
list.slots[4].charsize = font_list_size;
list.slots[4].align = my_align;

list.slots[5].set_pos(flx*0.75, fly*0.32, flw*0.25, flh*0.042);
list.slots[5].set_rgb(R,G,B);
list.slots[5].charsize = font_list_size;
list.slots[5].align = my_align;

list.slots[6].set_pos(flx*0.75, fly*0.35, flw*0.25, flh*0.042);
list.slots[6].set_rgb(R,G,B);
list.slots[6].charsize = font_list_size;
list.slots[6].align = my_align;

list.slots[7].set_pos(flx*0.75, fly*0.38, flw*0.25, flh*0.042);
list.slots[7].set_rgb(R,G,B);
list.slots[7].charsize = font_list_size;
list.slots[7].align = my_align;

list.slots[8].set_pos(flx*0.75, fly*0.41, flw*0.25, flh*0.042);
list.slots[8].set_rgb(R,G,B);
list.slots[8].charsize = font_list_size;
list.slots[8].align = my_align;

list.slots[9].set_pos(flx*0.75, fly*0.44, flw*0.25, flh*0.042);
list.slots[9].set_rgb(R,G,B);
list.slots[9].charsize = font_list_size;
list.slots[9].align = my_align;


class ShufflePow extends Shuffle
{
function select(slot)
{
slot.visible = true;
}

function deselect(slot)
{
slot.visible = false;
}
}

local my_pointer = my_config["set_marker_rgb"] + ".png";

local pow = ShufflePow(10, "image", "pointers/" + my_pointer);

pow.slots[0].set_pos(flx*0.7498, fly*0.18, flw*0.25, flh*0.026);
pow.slots[1].set_pos(flx*0.7498, fly*0.21, flw*0.25, flh*0.026);
pow.slots[2].set_pos(flx*0.7498, fly*0.24, flw*0.25, flh*0.026);
pow.slots[3].set_pos(flx*0.7498, fly*0.27, flw*0.25, flh*0.026);
pow.slots[4].set_pos(flx*0.7498, fly*0.30, flw*0.25, flh*0.026);
pow.slots[5].set_pos(flx*0.7498, fly*0.33, flw*0.25, flh*0.026);
pow.slots[6].set_pos(flx*0.7498, fly*0.36, flw*0.25, flh*0.026);
pow.slots[7].set_pos(flx*0.7498, fly*0.39, flw*0.25, flh*0.026);
pow.slots[8].set_pos(flx*0.7498, fly*0.42, flw*0.25, flh*0.026);
pow.slots[9].set_pos(flx*0.7498, fly*0.45, flw*0.25, flh*0.026);


// Sound
function fade_transitions(ttype, var, ttime) {
switch (ttype) {
case Transition.ToNewSelection:
case Transition.ToNewList:
local Wheelclick = fe.add_sound("pointers/clic.mp3")
Wheelclick.playing=true
break;
}
return false;
}

fe.add_transition_callback("fade_transitions");
}


To animate a normal ListBox, i use objects, as in this example, which makes it disappear on the right after 5 seconds:

Code: [Select]
// Listbox
if (my_config["wheel_type"] == "listbox")
{
::OBJECTS <- {lbx = fe.add_listbox(flx*0.75, fly*0.2, flw*0.25, flh*0.8)}
OBJECTS.lbx.rows = 27;
OBJECTS.lbx.charsize = font_list_size;
OBJECTS.lbx.set_selbg_rgb(Rs,Gs,Bs);
OBJECTS.lbx.set_rgb(R,G,B);
OBJECTS.lbx.set_sel_rgb(R,G,B);
OBJECTS.lbx.sel_style = Style.Bold;

// List Text Align
if (my_config["set_align"] == "centre") OBJECTS.lbx.align = Align.Centre;
if (my_config["set_align"] == "left") OBJECTS.lbx.align = Align.Left;
if (my_config["set_align"] == "right") OBJECTS.lbx.align = Align.Right;

local my_delay = 5000;

local move_lbx1 = { when = Transition.ToNewSelection, property = "x", start = OBJECTS.lbx.x + OBJECTS.lbx.width, end = OBJECTS.lbx.x, time = 1 }
local move_lbx2 = { when = When.ToNewSelection, property = "x", start = OBJECTS.lbx.x, end = OBJECTS.lbx.x + OBJECTS.lbx.width, time = 595, delay=my_delay }
animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx1));
animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx2));
}

Well, i would like the Shuffle List to do the same, but i do not know how.

keilmillerjr, please tell me if it can be done or not, thank you.

4
Themes / Help with the language.
« on: June 18, 2018, 02:19:36 PM »
Using the Spanish language in Attract-Mode, when the name does not have special characters, it looks good:



They see the title and the flyer perfectly.

But if it bears some special character, typical of the Spanish language, as in the following case, the title is perfectly read (including the special character), but it does not read the flyer, whose name on the hard disk also carries the special character.



Can someone tell me why this happens and how to solve it?

Thanks in advance.

5
Themes / Layout background design
« on: June 17, 2018, 02:08:33 AM »
I am preparing a layout with the following backgrounds:








I know I'm not very good at this ... But here there are very good people in it.

That's why I ask for your help, to see if you can suggest any combination of colors or alternatives to the design of mine.

What can not be modified are the measures or the margins, otherwise I would have to modify all my code and that is not desirable.

Thanks in advance for your help.

6
How to change the keys up and down for left and right in one theme layout and only for that?

I work in a layout with a coverflow (with "conveyor_helper" ;) ), and to go from game to game i use, as in the other layout, up and down.

IWould it be possible to set an option to change the keys in ch.CoverFlow of conveyor_helper?

Yhe best would be to use left and right, but i do not know how to define that in attrac-mode without changing it in the rest of layouts.

Sorry for my very bad english,  :-[

7
Scripting / Need help to display an array when you press a button.
« on: June 11, 2018, 08:15:11 AM »

This code works perfectly:  :D

Code: [Select]
class PlayList
{
show_text=null;

constructor()
{
show_text = fe.add_text("[Title]", flx*0.230, fly*0.001, flw*0.360, flh*0.490);
show_text.visible=false;
show_text.charsize = 20;
fe.add_signal_handler(this, "on_show")
}

function on_show(shw)
{
if (shw == "custom4")
{
show_text.visible=!show_text.visible;
return true;
}
return false;
}
}

local pl = PlayList();


My problem is that i can not get the content of an array[], which contains several data, instead of [Title].  :'(

I tried this (without it working, of course):    :-[

Code: [Select]
class PlayList
{
show_text=null;

constructor()
{
for(local i=0; i<player_list.len(); i++)
{
player_list.push(fe.add_text("", text_x/2, text_y+(i*30), text_wide-text_x, 0));
player_list[i].align = Align.Left;
player_list[i].font = "anaheim";
player_list[i].charsize = font_list_size;
player_list[i].set_rgb(Rp,Gp,Bp);
}

fe.add_signal_handler(this, "on_show")
}

function on_show(shw)
{
if (shw == "custom4")
{
show_text.visible=!show_text.visible;
return true;
}
return false;
}
}

player_list[] is the array in question...

8
General / Help to compile attract-mode in windows 10 64bits
« on: June 03, 2018, 04:09:53 AM »
I have followed these steps of compile.md without error messages:

Install MSYS2 https://msys2.github.io/

In the MSYS2 console:

Code: [Select]

pacman --needed -Sy bash pacman pacman-mirrors msys2-runtime

pacman -S git mingw-w64-x86_64-toolchain msys/make mingw64/mingw-w64-x86_64-sfml mingw64/mingw-w64-x86_64-ffmpeg mingw64/mingw-w64-x86_64-libarchive

git clone https://github.com/mickelson/attract attract

cd attract


And when I run make, it gives me these errors (my system is Spanish):

Code: [Select]
$ make
/bin/sh: pkg-config: no se encontró la orden
/bin/sh: pkg-config: no se encontró la orden
/bin/sh: pkg-config: no se encontró la orden
make: pkg-config: No se encontró el programa
make: pkg-config: No se encontró el programa
flags: -Wl,--subsystem,windows -O2 -DNDEBUG -Iextlibs/miniz -Iextlibs/audio/include -D__STDC_CONSTANT_MACROS  -Iextlibs/expat -Iextlibs/squirrel/include -Iextlibs/sqrat/include -Iextlibs/gameswf
mkdir -p obj
Compiling obj/fe_base.o...
make: g++: No se encontró el programa
make: *** [Makefile:457: obj/fe_base.o] Error 127

TRANS:

no se encontró la orden --> the order was not found

No se encontró el programa --> The program was not found

I need help, please.

9
Scripting / Wrong code
« on: June 02, 2018, 02:37:59 AM »
In my layout this code works perfectly:

Code: [Select]

// Hand Held
local artwork = fe.add_image("hh/[Emulator].png", flx*0.52, fly*0.4,  flw*0.260, flh*0.462);
artwork.preserve_aspect_ratio = true;

// Boxart
local box = FadeArt("boxart", flx*0.52, fly*0.6,  flw*0.130, flh*0.231);
box.preserve_aspect_ratio = true;
box.trigger = Transition.EndNavigation;


But if I add these modifications ("Watch & Game" is an emulator), it does not work:

Code: [Select]

local myboxart = "[Emulator]";

if (myboxart == "Watch & Game")
{
// Boxart
local box = FadeArt("boxart", flx*0.52, fly*0.6,  flw*0.130, flh*0.231);
box.preserve_aspect_ratio = true;
box.trigger = Transition.EndNavigation;
}
else
{
// Hand Held
local artwork = fe.add_image("hh/[Emulator].png", flx*0.52, fly*0.4,  flw*0.260, flh*0.462);
artwork.preserve_aspect_ratio = true;
}


Could someone tell me what I'm doing wrong?

Thanks in advance.

10
Themes / LCD Theme
« on: May 27, 2018, 05:56:41 AM »
LCD Theme (ver. 07/2018)

Hello, here I bring you a basic and simple theme, with seven customization options.

To use it in Spanish, change the layout.nut by the layout_spanish.nut and icons folder for spanish icons folder.

(Para usarlo en español, cambie el layout.nut por el layout_spanish.nut y la carpeta de iconos para la carpeta de iconos en español.)

It's just a list (listbox or shuffle list), it does not use wheels.
It carries 42 icons for the categories or genres of games.
It carries 137 system logos.

You can choose:

-The type of list: Shuffle List or Listbox.
-The alignment of the text: left, right, center.
-If flyers are used or not (if they are not used, a raspi appears instead).
-If the icons of the categories are used or not (in text they always appear).
-If the logos of the systems are used or not (in text they always appear).
-Time to fade listbox.
-Clock.

Well, you better see it:

With all activated:



Nothing:


Shuffle list:


And, if you're interested, you have it here:

https://mega.nz/#!2sVhnK5T!_MCPVyFb8Yx1kjofZHTV27PJu8Gyt1mREQOqVGpEufg

This layout prefers to put more games than graphics and videos in the sd... :D

11
Themes / roboesp theme, in spanish.
« on: May 27, 2018, 05:18:50 AM »
Many spanish fans pass through this forum, so here i leave the theme "roboesp", which is based on the original omegaman robospin.

It has, among others, the following changes:

- All texts and options are in Spanish.
- Changed some wallpaper options.
- Changed the spinwheels system for another that occupies less screen and has more options.
- Changed the system of using wheels or marquees.
- You can choose the number of wheels per type of spinweel (vertical or curve).
- You can choose the number of lines when you choose the list of games instead of the spinwheel.
- You can choose the alignment (justification) of the list of games (left, right, center).
- Eliminated the random color system (sometimes colors came out that did not show anything).
- Removed the icons that were used to indicate the category and the manufacturer of the games.
- Removed the pointers that indicate the wheel (this is not the Hyperspin, although it seems a lot).
- New information system only text, with the name or all data.
- The front of the marquee is painted black before using the marquee, so that transparent marquees can be used.
- The logo of the system used is always visible (there are 129 logos available).

Two screenshots:






 if you like it or want to try it, here it is:
 
 https://mega.nz/#!3h8USbYQ!fEKv0K1LOevAO3wgJErxT8a8t1RctKjgok3ckv32ows
 
 If there was much interest in it, i could do the translation into english, but, in principle, i have no intention.

12
General / Arcade Classics Intro Video
« on: May 20, 2018, 05:57:30 AM »
https://www.youtube.com/watch?v=bdZSZhLZ8qc&feature=youtu.be

It is a video that I love and I upload it to youtube because I do not remember or where I got it, nor looking for youtube I found it again.

I would like to know the origin of the video and especially where the music came from, I do not identify it with anything.

Let's see if someone gives me some information.

Thanks in advance.

13
Themes / Put a random icon on the screen.
« on: May 17, 2018, 05:30:24 AM »
To put on the screen of my layout a certain icon of the path / icons, I use the following code:

Code: [Select]

local icon = fe.add_image("icons/icon01.png", flx*0.215, fly*0.025, flw*0.1, flh*0.08);
icon.preserve_aspect_ratio = true;
icon.trigger = Transition.EndNavigation;


And it works perfectly.
   
But what I want is to put on the screen any of the icons contained in /icons in a random way, that comes out any of those that are inside /icons.

But I do not know how to do it. And I do not find anything either. Somebody could help me?

Sorry for my bad english.

Thanks in advance.

14
General / I can not do this with dosbox Can it?
« on: September 10, 2017, 03:05:30 AM »
Well, the fact is that I want the twobox to play the games on my 1920x1200 screen only in a 640x480 frame, but not in the form window, but in fullscreen.

I want it to look like this:

[IMG] http://i68.tinypic.com/154wubc.jpg [/ img]


I have changed all parameters in dosbox.conf a lot of times, but I do not give the result I want.

The same can not be done.

Let's see if anyone can help me.

And by the way, if you could, put a bezel would be fantastic ... Something like this:

[IMG] http://i68.tinypic.com/29y5w0y.jpg [/ img]

By the way, I do not use rocketlauncher or retroarch. My dosbox goes in Attract Mode, and full screen looks good, but with too many pixels.

Thanks for the help, friends.

Pages: [1]