Author Topic: [ListEntry] Format  (Read 359 times)

momir76

  • Newbie
  • *
  • Posts: 2
    • View Profile
[ListEntry] Format
« on: January 16, 2025, 01:58:11 AM »
I want to format ListEntry with 4 digits like this 0001, 0002, 0003

I have code:

Code: [Select]
local list1 = ShuffleNumber(12, "text", "[ListEntry]");


list1.slots[0].set_pos(flx*0.055, fly*0.225, flw*0.250, flh*0.044);
list1.slots[0].set_rgb (R,G,B);
list1.slots[0].font ="zekton";
list1.slots[0].charsize = font_size;
list1.slots[0].alpha = alpf;
list1.slots[0].align = Align.Left;
list1.slots[0].zorder = -1;

list1.slots[1].set_pos(flx*0.055, fly*0.262, flw*0.250, flh*0.080);
list1.slots[1].set_rgb (R,G,B);
list1.slots[1].font ="zekton";
list1.slots[1].charsize = font_size;
list1.slots[1].alpha = alpf;
list1.slots[1].align = Align.Left;
...
for all 12 slots

if i add this, not showing game numbers

Code: [Select]
if (("[ListEntry]").len() > 0 && ("[ListEntry]").len() < 2)
{
  local list1 = ShuffleNumber(12, "text", "000[ListEntry]");
}