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 4
1
General / macOS Catalina key repeat issues [FIXED]
« on: July 02, 2020, 12:39:46 AM »
I know, it was a bad idea to update from Mojave to Catalina, but I needed to, and I was really surprised to see that Attract Mode seemed to work perfectly from the start! But... after further checking here it comes the hideous issue: key repeat is basically non-existent, and when I look at the attract log I see

"We got a keyboard without any keys (1)"

on the console output. Anyone with catalina can give me an hand? Also, when I add Attract Mode app to the accessibility preferences so it can access full disk etc, it's shown as AttradeMode. Weird :O

2
Scripting / Squirrel language: how to create a directory?
« on: May 28, 2020, 07:44:30 AM »
Is it even possible? I need to create a subdirectory to manage tags my way, I can open a file for writing using the file.nut module or directly using squirrel libraries, and the file will be created from scratch if it's not there already, but if the folder is not there, then an error is thrown.
Is there some way from a layout to create a folder?

3
Scripting / Help with fe.get_input_state and number keys
« on: May 21, 2020, 01:08:40 AM »
It seems that fe.get_input_state works fine with letter keys, like "A", "B" ecc, but has some issues with numbers like "1", "2" etc. When the string to check is a number the input states turns to true at the layout load even when no key is pressed.

I've put together a simple layout to test this: there's a string where you can add the letters/numbers you want to check, and the result state is shown on the display.

Code: [Select]
local displaybutton = fe.add_text("TEST",0,0,fe.layout.width,fe.layout.height*0.1)

fe.add_ticks_callback( this, "tick" )

local stringkeys = "12AB"

local keys = {}
foreach(letter in stringkeys){
   keys[letter.tochar()] <- false
}

function tick( tick_time ) {
   displaybutton.msg = ""
   foreach (key, value in keys) {
      keys[key] = fe.get_input_state(key)
      displaybutton.msg = displaybutton.msg + key + ":" + value + " "
   }
}

Has anyone had the same issue? Is there a different way to pass a check on number keys?

4
Scripting / Change the favourite state using a function
« on: April 12, 2020, 12:57:35 AM »
Is there a way to change the favourite state of the current game (or any game) using a function, or the only way is through the "add_favourite" signal (and consequent menu)?

5
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

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

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

8
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

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

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

11
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 :)

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

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

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

15
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 :/

Pages: [1] 2 3 4