Author Topic: Need some help with the listbox (games list)  (Read 6853 times)

bundangdon

  • Sr. Member
  • ****
  • Posts: 212
    • View Profile
Need some help with the listbox (games list)
« on: January 24, 2017, 10:29:44 PM »
Hi everyone! I've mentioned this before a while back but didn't get any response and I'm (again) wondering if I could get some help with the listbox, for the games list. When using wheels, the list of games is seamless, without any separation or breaks at the beginning or end. However, when making a games list (without wheels), this doesn't seem to be the case. Here's an example (screenshots below)

What I would like to do is make the games list continuous/seamless without any separation, often implemented in other frontends. Any ideas on how I can fix this? Here's the code from the layout .nut file

// Listbox Name
local l = fe.add_listbox( 1455, 159, 439, 825 );
l.rows = 12;
l.charsize = 27;
l.selbg_alpha = 0;
l.set_selbg_rgb( 100, 100, 100 );
l.set_rgb( 175, 175, 175 );
l.set_sel_rgb( 255, 255, 255 );
l.align = Align.Left;
l.sel_style = Style.Bold;

Any help would be very much appreciated :)

ptiwee

  • Full Member
  • ***
  • Posts: 28
    • View Profile
Re: Need some help with the listbox (games list)
« Reply #1 on: January 25, 2017, 02:21:53 AM »
Hi bundangdon,
I don't think there is any built-in solution for this (not according to the documentation and the code ...), why don't you use a conveyor of Text objects ?

bundangdon

  • Sr. Member
  • ****
  • Posts: 212
    • View Profile
Re: Need some help with the listbox (games list)
« Reply #2 on: January 25, 2017, 05:46:19 AM »
Hi bundangdon,
I don't think there is any built-in solution for this (not according to the documentation and the code ...), why don't you use a conveyor of Text objects ?

Thanks for the response! Yep, I've checked the documentation and even looked at other layouts 'nut files and haven't had any luck. I'm not all that great at coding and have made all my layouts with a lot of 'cut and paste' techniques :) How would I go about using such a conveyor?

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: Need some help with the listbox (games list)
« Reply #3 on: January 25, 2017, 05:37:38 PM »
probably should be in "scripting " section but any way

Here is what i have done with some of my own themes because i felt the same thing

i just add it as a "fe.do_nut("scripts/gamelist.nut");"
but you can just add it in the layout.nut if you want.  modify as needed
ie: spacing, font size.......

youtube preview = https://youtu.be/bMyjz-OBLU8

Code: [Select]
//******************************************************************
//***********start**************************************************
local list = fe.add_text("[Title]", 036, 030, 800, 100 );
list.index_offset = 3;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";

local list = fe.add_text("[Title]", 036, 160, 800, 100 );
list.index_offset = 2;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";

local list = fe.add_text("[Title]", 036, 300, 800, 100 );
list.index_offset = 1;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";

//------------------------------------------------------------------

list = fe.add_text("[Title]", 036, 444, 800, 100 ), 
list.charsize = 40;
list.set_rgb( 0, 0, 255 );
list.alpha = 255;
//list.font="Blogger";

//------------------------------------------------------------------

local list = fe.add_text("[Title]", 036, 600, 800, 100 );
list.index_offset = -1;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";

local list = fe.add_text("[Title]", 036, 750, 800, 100 );
list.index_offset = -2;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";


local list = fe.add_text("[Title]", 036, 900, 800, 100 );
list.index_offset = -3;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";;
//*********end********************************************************
//********************************************************************

hope this helps you!   peace..

« Last Edit: January 25, 2017, 05:44:33 PM by jedione »
help a friend....

bundangdon

  • Sr. Member
  • ****
  • Posts: 212
    • View Profile
Re: Need some help with the listbox (games list)
« Reply #4 on: January 25, 2017, 10:33:59 PM »
probably should be in "scripting " section but any way

Here is what i have done with some of my own themes because i felt the same thing

i just add it as a "fe.do_nut("scripts/gamelist.nut");"
but you can just add it in the layout.nut if you want.  modify as needed
ie: spacing, font size.......

youtube preview = https://youtu.be/bMyjz-OBLU8

Code: [Select]
//******************************************************************
//***********start**************************************************
local list = fe.add_text("[Title]", 036, 030, 800, 100 );
list.index_offset = 3;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";

local list = fe.add_text("[Title]", 036, 160, 800, 100 );
list.index_offset = 2;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";

local list = fe.add_text("[Title]", 036, 300, 800, 100 );
list.index_offset = 1;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";

//------------------------------------------------------------------

list = fe.add_text("[Title]", 036, 444, 800, 100 ), 
list.charsize = 40;
list.set_rgb( 0, 0, 255 );
list.alpha = 255;
//list.font="Blogger";

//------------------------------------------------------------------

local list = fe.add_text("[Title]", 036, 600, 800, 100 );
list.index_offset = -1;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";

local list = fe.add_text("[Title]", 036, 750, 800, 100 );
list.index_offset = -2;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";


local list = fe.add_text("[Title]", 036, 900, 800, 100 );
list.index_offset = -3;
list.charsize = 40;
list.set_rgb( 255, 0, 0 );
list.alpha = 255;
//list.font="Blogger";;
//*********end********************************************************
//********************************************************************

hope this helps you!   peace..

Fantastic! It took a little bit of work with the code provided but it was well worth the effort :) Now, the games list in the layout is seamless and looking the way I prefer, as shown below. Thank you very much!


jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: Need some help with the listbox (games list)
« Reply #5 on: January 26, 2017, 07:08:14 AM »
any time that's what we are all here for....looks good..
help a friend....

l0ck0

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Need some help with the listbox (games list)
« Reply #6 on: January 26, 2017, 12:02:55 PM »
una vuelta de tuerca al codigo de jedione...

variables para configurar casi todo (numero de juegos, colores, fuentes, trasparencias....)


------------------------------


A twist to the jedione code ...

Variables to configure almost everything (number of games, colors, fonts, transparencies ....)

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: Need some help with the listbox (games list)
« Reply #7 on: January 26, 2017, 02:25:40 PM »
HEY THAT'S GREAT...ILL BE USING THAT CODE THANKS FOR THE SHARE.....
help a friend....