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

Pages: [1] 2 3
1
Scripting / Ligature fonts
« on: March 27, 2020, 06:49:35 AM »
Does AM support ligature fonts? Or is it something that can be added?

Ligature fonts are mostly used with "font icons": you have a ttf font with all the icons inside, and each icon is bound to one or more ligature text, so if you apply the font to the word "folder" you obtain the folder icon instead of the text. This could open endless possibilities not only for icons and glyphs. Imagine a systems logos font with ligatures, just create a text box with the word Game Boy and the game boy logo is used, super neat! Or your text is "2 players" and it get substituted by the 2 players logo... etc

2
Scripting / "invert" shader
« on: March 19, 2020, 04:41:55 AM »
Is there a default shader to get the negative of the area behind a picture? Or is there a way to write a glsl shader that can "negate" what is under it?

3
Scripting / Content of an overlay listbox list
« on: March 17, 2020, 06:51:22 AM »
In a layout you can define a listbox, and use that listbox as overlay control, so that menu entries are shown in that listbox. There's a parameter to get the length of the list shown in the listbox, but is there a way to get the actual _content_ of the list in the listbox? I don't mean the displayed content, which is limited to the listbox rows, but the list content itself.

Example: you have a 3 rows listbox and when you enter the tags menu you get the "Add tag" voice for each of the tags in the games list, let's say you have 6 entries at all to show in this listbox. I'd love to be able to get those entries.

4
Themes / Translators needed for Arcadeflow layout
« on: February 03, 2020, 12:10:29 AM »
Hi all! I've implemented multi-language support into my Arcadeflow layout for Attract Mode, but I only speak Italian and English, so right now the choice is somewhat limited. It would be great to have an help in translating it to other languages like Spanish, French or German or any other language you can speak.

It's not very demanding, I can share a file with the english and italian phrases, if anyone is interested please answer here or send me a PM. To anyone who'd like to contribute, my special thanks! :D

5
Scripting / Multi-language options page...
« on: January 30, 2020, 07:31:11 AM »
I want my options page in my layout to adapt to different languages. Is there an easy way to do it? I've already coded my translating framework which, based on a layout variabl, gets the translation of the strings from an external file. This works fine if I declare the variable at the beginning of the layout, and I can also see changes in the options page this way.

So I thought, I'll save the value of the variable in the fe.nv file and get it before the options table is built. But this doesn't work: at layout launch the variable is loaded and the layout reflects the translation, but if I enter the layout options I see in the log the layout is somewhat reloaded, and the read routin is re-executed, but gives an error.

Any help?

6
General / Attract Mode FPS in 2.5 and 2.6
« on: January 10, 2020, 05:20:42 AM »
When using Attract Mode 2.5 the fps of the layout were capping at 60, I mean that the redraw of the layout was never going over 60 hz. Now with Attract Mode 2.6 with a powerful PC I get refresh rates up to 200 and my themes get crazy fast when timers are related to ticks. Is there something different in AM or is it maybe monitor related?

7
Themes / Systems logos font
« on: October 23, 2019, 01:24:40 PM »
Attract Mode doesn't support SVG.. who cares, one can always build a gallery of monochrome svg system logos, and load them into a custom font, so each letter equals a system logo :D This is a preview and the first version of the font is attached :)

8
Scripting / Transition.ChangedTag when is this triggered?
« on: August 28, 2019, 08:42:09 AM »
I was trying to understand how this transition works: if I go into the tags menu and add or remove a tag I don't get any Transition.ChangedTag, only ShowOverlay, NewSelOverlay, HideOverlay... any idea?

9
Scripting / Regular expressions and word wrapping
« on: August 21, 2019, 05:39:53 AM »
In my experiments regarding word wrap I tried to use a regex. The simplest incarnation would be a regular expression that matches, say, 10 characters at a time. the code I used is:

Code: [Select]
local es = "(.{10})"
local cs = "Contrary to popular belief Lorem Ipsum is not simply random text"
local r = regexp(es)
local rs = r.capture(cs)

if (rs) {
    foreach (index, value in rs) {
        print(format("Match %02d: %s", index + 1, cs.slice(value.begin, value.end))+"\n")
    }
}

but the output is just:

Code: [Select]
Match 01: Contrary t
Match 02: Contrary t

It seams that after the first match it doesn't create other matches... any idea?

10
Scripting / msg_wrapped... does it work?
« on: August 21, 2019, 04:16:29 AM »
I read from fe.text properties:

msg_wrapped - Get the text label's message after word wrapping

but in my experiments it doesn't seem to work, I get the error "the index msg_wrapped does not exist". Anyone had luck with this?

11
Scripting / Debugging a layout that crashes AM with no console output
« on: June 06, 2019, 12:16:04 AM »
I'm having a bit of troubles with my layout: for some reason the latest changes I made are breaking havoc on windows, and the layout often crashes when reloading. But instead of crashing leaving a nice console output (--loglevel debug) it just hangs, and when it's closed by windows there's no useful output on the console. Any idea on how to understand what happens? On MacOs I can see a debug log but I can't get much out of that :/

12
Scripting / Dispay size from mame xml list
« on: June 03, 2019, 08:27:52 AM »
In MAME listxml there's a field for each game like this:

<display tag="screen" type="raster" rotate="0" width="384" height="224" refresh="59.637405" pixclock="8000000" htotal="512" hbend="64" hbstart="448" vtotal="262" vbend="16" vbstart="240" />

I think the Info.Rotation data comes from this, but is there a way in AM to get also the width and height data from this tag? This is the "native" resolution of the machine and could be useful for CRT filters if your screenshots are not pixel perfect...

13
Scripting / Changing the source of an artwork
« on: May 24, 2019, 05:14:13 AM »
Let's say I have something like

testobject = fe.add_artwork("snap",0,0,200,200)

is it possible to change the "source" of the artwork data, for example from snap to flyer, on the fly?

14
Scripting / Displays Menu and layout reload...
« on: May 21, 2019, 06:26:53 AM »
When Displays Menu is not using a custom layout but is set to default, and you select a new display that shares the same layout as the old display, what exactly happens? My experience is that the list is updated like it was a "ToNewList" transition and nothing more. The trouble is that if the new displays uses a different emulator, the metadata is not updated so category etc are not consistent.

Is there a way to force a layout reload each time a display is updated?

15
Scripting / Foreach item oreder
« on: April 12, 2019, 04:57:24 AM »
I have this simple code:

Code: [Select]
local key_names = { "1": "A", "2": "B", "3": "C", "4": "D"}

foreach (key,val in key_names){
   print (key + " " + val +"\n")
}

Maybe I don't get it right but the console output of this code is

Code: [Select]
1 A
3 C
2 B
4 D

I would expect it to return

Code: [Select]
1 A
2 B
3 C
4 D

Also speaking of tables, what is the difference between something like this:

Code: [Select]
local aTable = { "first_key" : "Max Normal",
                 "second_key" : 42,
                 "third_key" : true};

and this:

Code: [Select]
local aTable = { "first_key" = "Max Normal",
                 "second_key" = 42,
                 "third_key" = true};

Pages: [1] 2 3