Align Item on right
#1
hi,

My Goal is to make a right-top-corner home menu.

I would like user can activate (via setting) what item is diplay (ie weather / favs / setting ...)

I've found nothing on wiki/forum about align item (of a panel/list) on the right for horizontal list (i guess it's the same pb for align bottom with vertical list).

I've tried to make this with <right>0<right>, but when I specified <width>auto</width>, ths list wasn't diplayed (i could navigated on it, but nothing on the screen).
Reply
#2
"Welcome to the Club".
Kodi has a lot of problems when it comes to right alignments, and RTL texts.
http://forum.kodi.tv/showthread.php?tid=...pid2055209
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#3
Thx Tomer Smile

I guess I just have to wait this in a new feature
Reply
#4
If you're not using auto-filled (ie library) content then a grouplist will work.
Reply
#5
Grouplist cannot be really aligned to the right.
the alignment only "align" it to the right side in the position perspective, but not effects the order, like it should too.
for example if you want to make a grouplist goes like:
5--4--3--2--1 (1 is the first item, 5 is the last one) you can't.
List Control neither. (for example, If you want to make an Horizontal Main-Menu, which first item is on the right, you can't.)
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#6
* ronie thinks you guys are talking about two different things.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
What I want is :

[--------- 1-2-3-4-5]
or
[----------5-4-3-2-1]

now, i can only get :

[1-2-3-4-5 ---------]
Reply
#8
But what are the items 1-5? Auto-filled or hard-coded items?
Reply
#9
(2015-11-16, 20:05)gates Wrote: What I want is :

[--------- 1-2-3-4-5]
or
[----------5-4-3-2-1]

now, i can only get :

[1-2-3-4-5 ---------]
Ronie, Same subject, different things... but still, those are need to be mentioned.

gates, As Hitcher Said, If you are using static grouplist, you can align it to the right as you want.
see my example:
http://pastebin.com/uJrjp1BZ
http://i.imgur.com/UdhyZhG.png
last item - is always the rightest one.
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#10
You'll need to fake it. Make a grouplist of labels and set visible condition to hilight the focused item. Then create a fake panel (Home Menu).
That's how i've done it for my submenu.

See this short example to get an idea:


PHP Code:
<control type="grouplist">
<
description>Movies</description>
<
usecontrolcoords>true</usecontrolcoords
<
posx>116</posx>
<
posy>12</posy>
<
width>1600</width>
<
height>50</height>
<
itemgap>74</itemgap>
<
orientation>horizontal</orientation>
<
align>right</align>
                    
<!-- 
Item 1 -->
                    
<
control type="label">
<
description>Movies</description>
<
width>auto</width>
<
posx>0</posx>
<
posy>0</posy>
<
height>50</height>
<
label>Movies</label>
<
font>Title</font>
<
textcolor>white</textcolor>
</
control>
                    
<
control type="label">
<
width>auto</width>
<
posx>0</posx>
<
posy>0</posy>
<
height>50</height>
<
label>Movies</label>
<
font>Title</font>
<
textcolor>red-</textcolor>
<
visible>Container(300).HasFocus(1)</visible>
</
control>

<!-- 
Item 2 -->
......
                                         
<!-- 
Item 3 -->
......

etc.

</
control>


<!-- 
Fake Panel Movies -->
                    
<
control type="panel" id="300">
<
posx>116</posx>
<
posy>-27</posy>
<
width>1480</width>
<
height>150</height>
<
ondown>...</ondown>
<
onup>...</onup>
<
onleft>...</onleft>
<
onright>...</onright>
<
orientation>horizontal</orientation>
<
focusposition>0</focusposition>
<
scrolltime tween="sine" easing="out">300</scrolltime>
<
itemlayout width="320" height="150">
</
itemlayout>
<
focusedlayout width="320" height="150">
</
focusedlayout>
<
content>
                    
<!-- 
ITEM 1 -->
                    
<
item id="1">
<
description>Movies</description>
<
onclick>ActivateWindow(VideoLibrary,Movies,return)</onclick>
</
item>

<!-- 
ITEM 2 -->
  ..........

<!-- 
ITEM 3 -->
..........

etc.

</
content>
</
control
Reply
#11
(2015-11-16, 20:11)Hitcher Wrote: But what are the items 1-5? Auto-filled or hard-coded items?

Hi Hitcher,
Item are hard-coded.

I would like to use a list or panel (with itemlayout and focusedlayout balise).

So, if I dont get wrong, i cant do this.
I have to use group-list, and "item" are no more "<item>" in a in "<content>", but are <control type="image"> (for example).
Btw, thx Tomer and Butch for your example.

@butch, fun to see you reply here, cause i try to use a menu from equilibrium (gohtam), in Cirrus extended Smile
Reply
#12
Thx All of you

I've done what i want to do with grouplist.

@butchabay : in your example, you duplicate the item to handle the color on focus.
isn't it possible to have a condition on <texture> ?

PHP Code:
<control type="label">
<
description>Movies</description>
<
label>Movies</label>
<
font>Title</font>
<
textcolor condition="!Container(300).HasFocus(1)">white</textcolor>
<
textcolor condition="Container(300).HasFocus(1)">red</textcolor>
</
control
Reply
#13
Nope, But You can use:
<textcolor>$VAR[my_color]</textcolor>

<variable name="my_color">
<value condition="!Container(300).HasFocus(1)>white</value>
<value>red</value>
</variable>
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#14
yep,
i already use this for other stuff,
but i guess a lot of variable can slow down the skin ? (or maybe not)
Reply

Logout Mark Read Team Forum Stats Members Help
Align Item on right0