Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: purplesanz on March 23, 2020, 02:12:44 AM
-
Is it possible to have a [ListEntry] that looks like this:
001
002
003
etc.
...instead of the default 1, 2, 3?
Thank you in advance.
-
Use a magic function and return a string formatted how you wish. :)
-
Thank you for your reply.
So far, I have this:
local listbox = fe.add_listbox( x, y, w, h );
listbox.charsize = 25;
listbox.align = Align.Left;
listbox.format_string = "[ListEntry]";
But I don't understand how to do what you said. Could you please give me an example? perhaps for 01 or 00001?
-
maby like
listbox.format_string = "0[ListEntry]";
would be ..
01-09
010-099
0100-0999 hmm
-
That's exactly what I tried last night!
But what I'm trying to achieve, is:
001
009
010
099
100
101
etc.
-
No. A magic function. Read the docs. There is a good example. Working OT at an atf facility so not home to provide examples myself, but can help if you get a start.
https://github.com/mickelson/attract/blob/master/Layouts.md#magic
http://www.squirrel-lang.org/doc/squirrel3.html
-
mabey somthing like this not shure if it works
fe.add_text( "[ListEntry] [[ListSize]]",
0, 0, 400, 20 );
no...it dont :-\