Kodi Community Forum
ContextMenu aligny - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: ContextMenu aligny (/showthread.php?tid=134744)



ContextMenu aligny - pecinko - 2012-06-25

Guys I need a push - how can I make context menu to always be vertically aligned?


RE: ContextMenu aligny - Hitcher - 2012-06-25

<orientation>vertical</orientation> ?


ContextMenu aligny - pecinko - 2012-06-25

Haha

What I've meant to ask is how to make it vertically centered. It keeps sliding towards top of the screen when there are fewer items in it.


RE: ContextMenu aligny - BigNoid - 2012-06-26

The context menu always opens in the center (both x and y) of the list it applies to. So you'd have to adjust your list height and posy in this case.


RE: ContextMenu aligny - Hitcher - 2012-06-26

Use a series of slide animations based on the buttons visible?

eg

PHP Code:
<animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1002)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1003)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1004)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1005)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1006)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1007)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1008)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1009)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1010)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1011)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1012)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1013)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1014)">Conditional</animation>
<
animation effect="slide" end="0,-20" time="0" condition="Control.IsVisible(1015)">Conditional</animation



RE: ContextMenu aligny - pecinko - 2012-06-26

(2012-06-26, 09:59)Big_Noid Wrote: The context menu always opens in the center (both x and y) of the list it applies to. So you'd have to adjust your list height and posy in this case.

Managed to override that with

<coordinates>
<system>1</system>
<origin x="729" y="210" />
</coordinates>

so it gets centered horizontally. It does not help with Y axis as height of the menu changes.
(2012-06-26, 10:22)Hitcher Wrote: Use a series of slide animations based on the buttons visible?

That seems as the only way to go although I'm not sure if it will prove as a good idea in the long run Smile