Jump to content


Photo

elistbox horizontal


  • Please log in to reply
14 replies to this topic

#1 Huevos

  • PLi® Contributor
  • 4,645 posts

+161
Excellent

Posted 18 March 2023 - 20:17

As Littlesat said in this thread:

 

When you do it really right you need to make a listbox horizontal type with size scrollbar number of items etc [...] it is really a feature that universally could be used.

 

So here is a PR for elistbox horizontal.

 

It can be used for horizontal menus, lists, tabs, etc.

 

Possible skin for horizontal menu:

	<screen name="MenuHorizontal" position="fill" backgroundColor="transparent" flags="wfNoBorder">
		<ePixmap alphatest="blend" pixmap="infobar/hd.png" position="0,e-180" size="e,180" zPosition="-1" scale="1"/>
		<widget source="Title" conditional="Title" render="Label" position="0,e-170" size="e,80" font="Regular;64" halign="center" valign="center" transparent="1" backgroundColor="transpBlack"/>
		<widget source="menu" render="Listbox" enableWrapAround="off" position="60,e-85" size="1800,80" foregroundColorSelected="selectedFG" foregroundColor="foreground" backgroundColorSelected="transpBlack" backgroundColor="transpBlack" scrollbarMode="showNever" selectionFrame="none" >
			<convert type="TemplatedMultiContent">
				{"template": [ MultiContentEntryText(pos = (10,0), size = (340,80), flags = RT_HALIGN_CENTER|RT_VALIGN_CENTER,text = 0) ],
					"fonts": [gFont("Regular",34)],
					"itemHeight": 80,
					"itemWidth": 360,
					"orientation" : "orHorizontal",
				}
			</convert>
		</widget>
		<widget addon="Pager" connection="menu" itemHeight="75" showIcons="onlyFirst" picPage="icons/chevronleft.png" picPageCurrent="icons/chevronlefttrans.png" position="0,e-85" size="50,75" transparent="0" backgroundColor="transpBlack"/>
		<widget addon="Pager" connection="menu" itemHeight="75" showIcons="onlyLast" picPage="icons/chevronright.png" picPageCurrent="icons/chevronrighttrans.png" position="e-50,e-85" size="50,75" transparent="0" backgroundColor="transpBlack"/>
	</screen>

 

 

Attached Files

  • Attached File  1.jpg   100.6KB   1 downloads


Re: elistbox horizontal #2 Huevos

  • PLi® Contributor
  • 4,645 posts

+161
Excellent

Posted 19 March 2023 - 01:52

The PR is here: https://github.com/O...igma2/pull/3661



Re: elistbox horizontal #3 littlesat

  • PLi® Core member
  • 57,122 posts

+698
Excellent

Posted 19 March 2023 - 05:47

What added value does it really has? That way the menu options string length should be short. Personally I think it is not really practical. It is something that adds code just to add code because it can be done for fun.
This at least for the menu’s… but there might be other places where it can be helpfull…

Edited by littlesat, 19 March 2023 - 05:49.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: elistbox horizontal #4 Dimitrij

  • PLi® Core member
  • 10,300 posts

+347
Excellent

Posted 19 March 2023 - 07:50

Can this function be made automatic (on / off)?


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: elistbox horizontal #5 DimitarCC

  • PLi® Contributor
  • 1,566 posts

+68
Good

Posted 19 March 2023 - 08:02

Define automatic? For what purpose?

Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)


Re: elistbox horizontal #6 Dimitrij

  • PLi® Core member
  • 10,300 posts

+347
Excellent

Posted 19 March 2023 - 08:08

any skin --> on/off horizontal mode


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: elistbox horizontal #7 DimitarCC

  • PLi® Contributor
  • 1,566 posts

+68
Good

Posted 19 March 2023 - 08:38

The mode is defined in the skin for every instance of the listbox. If you define orientation attribute to orHorizontal it will became horizontal. By default is vertical.
If you mean some general setting for all listboxes.. There is not such.

Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)


Re: elistbox horizontal #8 Huevos

  • PLi® Contributor
  • 4,645 posts

+161
Excellent

Posted 19 March 2023 - 10:54

any skin --> on/off horizontal mode

Maybe I don't understand exactly what you are asking, but, look at these.

 

https://github.com/O...ns/Menu.py#L218

https://github.com/O...nu.py#L227-L233



Re: elistbox horizontal #9 Huevos

  • PLi® Contributor
  • 4,645 posts

+161
Excellent

Posted 19 March 2023 - 10:56

What added value does it really has? That way the menu options string length should be short. Personally I think it is not really practical. It is something that adds code just to add code because it can be done for fun.
This at least for the menu’s… but there might be other places where it can be helpfull…

Please don't concentrate on strings, or menus. e.g this could be used to display a list of icons horizontally.



Re: elistbox horizontal #10 littlesat

  • PLi® Core member
  • 57,122 posts

+698
Excellent

Posted 19 March 2023 - 11:31

Maybe only show the option in config when the selected skin does support it

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: elistbox horizontal #11 DimitarCC

  • PLi® Contributor
  • 1,566 posts

+68
Good

Posted 19 March 2023 - 11:41

Ummm the setting that make the listbox horizontal is in the skin. If you dont add it in the skin (including the horizontal template) then horizontal listbox will not be shown and everything will work like it was before. Maybe skin makers can add a mark that in skin there is horizontal listbox support, but i am not sure what will be the benefit.
Mainly because only one listbox somewhere can be horizontal and all the rest vertical.
The horizontal listbox support is for general use where the skinner want it.

Edited by DimitarCC, 19 March 2023 - 11:44.

Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)


Re: elistbox horizontal #12 MCelliotG

  • Senior Member
  • 443 posts

+35
Good

Posted 19 March 2023 - 14:06

 

As Littlesat said in this thread:

 

When you do it really right you need to make a listbox horizontal type with size scrollbar number of items etc [...] it is really a feature that universally could be used.

 

So here is a PR for elistbox horizontal.

 

It can be used for horizontal menus, lists, tabs, etc.

 

Possible skin for horizontal menu:

	<screen name="MenuHorizontal" position="fill" backgroundColor="transparent" flags="wfNoBorder">
		<ePixmap alphatest="blend" pixmap="infobar/hd.png" position="0,e-180" size="e,180" zPosition="-1" scale="1"/>
		<widget source="Title" conditional="Title" render="Label" position="0,e-170" size="e,80" font="Regular;64" halign="center" valign="center" transparent="1" backgroundColor="transpBlack"/>
		<widget source="menu" render="Listbox" enableWrapAround="off" position="60,e-85" size="1800,80" foregroundColorSelected="selectedFG" foregroundColor="foreground" backgroundColorSelected="transpBlack" backgroundColor="transpBlack" scrollbarMode="showNever" selectionFrame="none" >
			<convert type="TemplatedMultiContent">
				{"template": [ MultiContentEntryText(pos = (10,0), size = (340,80), flags = RT_HALIGN_CENTER|RT_VALIGN_CENTER,text = 0) ],
					"fonts": [gFont("Regular",34)],
					"itemHeight": 80,
					"itemWidth": 360,
					"orientation" : "orHorizontal",
				}
			</convert>
		</widget>
		<widget addon="Pager" connection="menu" itemHeight="75" showIcons="onlyFirst" picPage="icons/chevronleft.png" picPageCurrent="icons/chevronlefttrans.png" position="0,e-85" size="50,75" transparent="0" backgroundColor="transpBlack"/>
		<widget addon="Pager" connection="menu" itemHeight="75" showIcons="onlyLast" picPage="icons/chevronright.png" picPageCurrent="icons/chevronrighttrans.png" position="e-50,e-85" size="50,75" transparent="0" backgroundColor="transpBlack"/>
	</screen>

This is very very interesting, as a skinner I'm so intrigued by that.

BTW, I want to make sure what the "e" parameter does exactly, does it dynamically place objects? Where is this located position="e-50,e-85" compared to this position="0,e-85".



Re: elistbox horizontal #13 DimitarCC

  • PLi® Contributor
  • 1,566 posts

+68
Good

Posted 19 March 2023 - 14:38

This is example from OpenViX. I am not sure that e parameter is available on PLi. Have to be checked out.

Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)


Re: elistbox horizontal #14 Huevos

  • PLi® Contributor
  • 4,645 posts

+161
Excellent

Posted 19 March 2023 - 14:47

 

 

As Littlesat said in this thread:

 

When you do it really right you need to make a listbox horizontal type with size scrollbar number of items etc [...] it is really a feature that universally could be used.

 

So here is a PR for elistbox horizontal.

 

It can be used for horizontal menus, lists, tabs, etc.

 

Possible skin for horizontal menu:

	<screen name="MenuHorizontal" position="fill" backgroundColor="transparent" flags="wfNoBorder">
		<ePixmap alphatest="blend" pixmap="infobar/hd.png" position="0,e-180" size="e,180" zPosition="-1" scale="1"/>
		<widget source="Title" conditional="Title" render="Label" position="0,e-170" size="e,80" font="Regular;64" halign="center" valign="center" transparent="1" backgroundColor="transpBlack"/>
		<widget source="menu" render="Listbox" enableWrapAround="off" position="60,e-85" size="1800,80" foregroundColorSelected="selectedFG" foregroundColor="foreground" backgroundColorSelected="transpBlack" backgroundColor="transpBlack" scrollbarMode="showNever" selectionFrame="none" >
			<convert type="TemplatedMultiContent">
				{"template": [ MultiContentEntryText(pos = (10,0), size = (340,80), flags = RT_HALIGN_CENTER|RT_VALIGN_CENTER,text = 0) ],
					"fonts": [gFont("Regular",34)],
					"itemHeight": 80,
					"itemWidth": 360,
					"orientation" : "orHorizontal",
				}
			</convert>
		</widget>
		<widget addon="Pager" connection="menu" itemHeight="75" showIcons="onlyFirst" picPage="icons/chevronleft.png" picPageCurrent="icons/chevronlefttrans.png" position="0,e-85" size="50,75" transparent="0" backgroundColor="transpBlack"/>
		<widget addon="Pager" connection="menu" itemHeight="75" showIcons="onlyLast" picPage="icons/chevronright.png" picPageCurrent="icons/chevronrighttrans.png" position="e-50,e-85" size="50,75" transparent="0" backgroundColor="transpBlack"/>
	</screen>

This is very very interesting, as a skinner I'm so intrigued by that.

BTW, I want to make sure what the "e" parameter does exactly, does it dynamically place objects? Where is this located position="e-50,e-85" compared to this position="0,e-85".

 

"e" is the width/height of the parent element.



Re: elistbox horizontal #15 Huevos

  • PLi® Contributor
  • 4,645 posts

+161
Excellent

Posted 19 March 2023 - 15:10

Maybe only show the option in config when the selected skin does support it

Yes, that is how we do it.

<item level="0" text="Menu style" conditional="findSkinScreen('MenuHorizontal')" description="Select 'Standard' to display the standard vertical menu layout, or 'Horizontal' to display the menu items in a row.">config.usage.menu_style</item>

Look in PLi:

https://github.com/O....py#L1356-L1369

 

But you need this import:

https://github.com/O...ens/Setup.py#L5
 




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users