PDA

View Full Version : Question about Grouplist


timdog82001
2007-05-06, 01:32
I checked the wiki, but the page on grouplist is still empty. Is there anyway with a grouplist to have each of the buttons have a constant image that doesn't change, and then also an overlay that shows up when that particular button has focus?

jmarshall
2007-05-06, 03:39
A grouplist is just a list of controls. You can make the buttons look however you like, just like you can for any other button.

All the grouplist does is save you worrying about coordinates + navigation within the group + ofcourse adds scrolling etc. as needed.

So just dump a bunch of buttons in the list that have the same <texturenofocus> and different <texturefocus>.

Cheers,
Jonathan

timdog82001
2007-05-06, 03:49
ok..except the original texturenofocus disappears when it has focus, right? I want to be able to show both simultaneously when it has focus, and only show the texture no focus when it doesn't have focus. I would just modify the original texture and put that in for the texturefocus, but I'm making something customizable where the end user can choose the image of their choice and I'd like it to be automatic if possible

jmarshall
2007-05-06, 05:12
One way to do that would be with conditional images. You'd have to make a group consisting of your button and the conditional image for the focus texture that's only displayed when the button has focus.

Then just add the groups to the grouplist and away you go.

Quite a bit more code unfortunately.

timdog82001
2007-05-06, 11:12
like this?

<control type="grouplist" id="105">
<description>Games Favorites Submenu</description>
<posx>375</posx>
<posy>189</posy>
<width>220</width>
<height>213</height>
<itemgap>-8</itemgap>
<onleft>5</onleft>
<onright>2</onright>
<onup>105</onup>
<ondown>105</ondown>
<animation effect="fade" start="0" delay="225" time="200">WindowOpen</animation>
<visible>!Control.HasFocus(1) + !Control.HasFocus(2) + [Control.HasFocus(5) | ControlGroup(105).HasFocus()]</visible>
<control type="group" id="30">
<control type="image"
<description>Button 1 Icon</description>
<width>235</width>
<height>59</height>
<texture>wide-thumb-focus.png</texture>
<visible>Control.HasFocus(3000)</visible>
</control>
<control type="button" id="3000">
<description>Button 1</description>
<width>235</width>
<height>59</height>
<onclick>XBMC.ActivateWindow(19)</onclick>
<texturenofocus>F:\icon4343.png</texturenofocus>
<texturefocus>F:\icon4343.png</texturefocus>
</control>
</control>
</control>

I can't figure out what else you might mean, but this doesn't work...

timdog82001
2007-05-06, 11:13
of course, like that only with additional buttons, but I imagine you guessed that.

jmarshall
2007-05-06, 11:53
Exactly like that, but with the addition of <width> and <height> for the groups - the grouplist needs to know the size of each object.

Cheers,
Jonathan

timdog82001
2007-05-07, 02:34
Thanks for the help :) I figured out for some reason it wouldn't show the texturefocus and texturenofocus, i had to make a second image control. However, I realized I actually need an underlay instead of an overlay. Is there any way of centering an image in relation to the group width and height? Otherwise, it just shows the bottom and right side of the underlay and the top image isn't centered over the bottom one.

timdog82001
2007-05-08, 00:02
nevermind, i figured it out. Thanks for the help!

timdog82001
2007-05-08, 01:15
I have one last thing to add to it, but it doesn't seem to want to work....

It doesn't want to show a label either as part of the button or as a separate label control.

Here's the code for the particular group i'm trying to get it to show up in...<control type="group" id="30">
<width>235</width>
<height>53</height>
<control type="image">
<width>200</width>
<height>53</height>
<description>Button 1 Icon</description>
<texture>wide-thumb-focus.png</texture>
<visible>Control.HasFocus(3000)</visible>
</control>
<control type="image">
<width>200</width>
<height>53</height>
<description>Button 1 Icon</description>
<texture>wide-thumb-nofocus.png</texture>
<visible>!Control.HasFocus(3000)</visible>
</control>
<control type="image">
<posx>5</posx>
<posy>5</posy>
<width>190</width>
<height>42</height>
<description>Button 1 Icon</description>
<texture>folder.jpg</texture>
<visible>no</visible>
</control>
<control type="label">
<description>Button 1 Label</description>
<width>200</width>
<height>53</height>
<font>font14</font>
<include>TextcolorBlack</include>
<include>shadow-grey</include>
<align>center</align>
<label>Drama</label>
<visible>yes</visible>
</control>
<control type="button" id="3000">
<width>200</width>
<height>53</height>
<onleft>5</onleft>
<onright>2</onright>
<ondown>31</ondown>
<onup>39</onup>
<description>Button 1</description>
<onclick>XBMC.ActivateWindow(19)</onclick>
</control>
</control>

Jezz_X
2007-05-08, 01:25
labels will only show if on a button or in a group and maybe try adding some x,y coords to it because its probably using 0,0

timdog82001
2007-05-08, 01:27
Yeah, i actually just figured out that it was showing up under the image of the button below it for some reason. I had to make the coords x = 0 and y = 14

timdog82001
2007-05-16, 00:54
I'm having a problem where the edges of the screen flash to black for a second whenever I go from one of the adjacent blades to the Games blade (where I have the grouplist) if the grouplist is visible upon moving to that blade. If it's not visible, it's not a problem. It doesn't flash, and I can navigate to where it is visible once I'm already in the games blade without any weird flashing. I hope this all makes sense. Can anybody tell me how to fix this? I experimented....I took out all the conditional visibility tags and it still did it. Then, I took out all but 3 of the control groups inside the grouplist, and it no longer flashed. When I tried this again, while leaving in the conditional visibility tags, the flashing bug remained until only 4 or so control groups were left, at which point the sides no longer flashed, but all the controls in the center of the screen like the gamercard and where it says "Games" "xbox arcade" and so on would flash. Here's a snippet of the code....Does anybody see anything wrong? If someone would like to take a better look at it, I can provide the whole code.


<control type="grouplist" id="105">
<description>Games Favorites Wideicon Submenu</description>
<posx>392</posx>
<posy>194</posy>
<width>200</width>
<height>213</height>
<itemgap>0</itemgap>
<onleft>5</onleft>
<onright>2</onright>
<onup>105</onup>
<ondown>105</ondown>
<animation effect="fade" start="0" delay="225" time="200">WindowOpen</animation>
<visible>!Control.HasFocus(1) + !Control.HasFocus(2) + Skin.HasSetting(favgames) + [Control.HasFocus(5) | ControlGroup(105).HasFocus()]</visible>
<control type="group" id="30">
<width>235</width>
<height>53</height>
<visible>Skin.HasSetting(GamesFavorites-1Enable1)</visible>
<control type="image">
<width>200</width>
<height>53</height>
<description>Button 1 Icon</description>
<texture>wide-thumb-focus.png</texture>
<visible>Control.HasFocus(3000)</visible>
</control>
<control type="image">
<width>200</width>
<height>53</height>
<description>Button 1 Icon</description>
<texture>wide-thumb-nofocus.png</texture>
<visible>!Control.HasFocus(3000)</visible>
</control>
<control type="image">
<posx>5</posx>
<posy>5</posy>
<width>190</width>
<height>42</height>
<description>Button 1 Icon</description>
<info>Skin.String(GamesFavorites-1Image1)</info>
<visible>Skin.String(GamesFavorites-1Image1)</visible>
</control>
<control type="label">
<description>Button 1 Label</description>
<posx>0</posx>
<posy>14</posy>
<width>200</width>
<height>53</height>
<font>font14</font>
<include>TextcolorBlack</include>
<include>shadow-grey</include>
<align>center</align>
<info>Skin.String(GamesFavorites-1Name1)</info>
<visible>Skin.String(GamesFavorites-1Name1)</visible>
</control>
<control type="button" id="3000">
<width>200</width>
<height>53</height>
<onleft>5</onleft>
<onright>2</onright>
<ondown>31</ondown>
<onup>39</onup>
<description>Button 1</description>
<onclick>$INFO[Skin.String(GamesFavorites-1File1)]</onclick>
</control>
</control>
<control type="group" id="31">
<width>235</width>
<height>53</height>
<visible>Skin.HasSetting(GamesFavorites-1Enable2)</visible>
<control type="image">
<width>200</width>
<height>53</height>
<description>Button 2 Icon</description>
<texture>wide-thumb-focus.png</texture>
<visible>Control.HasFocus(3100)</visible>
</control>
<control type="image">
<width>200</width>
<height>53</height>
<description>Button 2 Icon</description>
<texture>wide-thumb-nofocus.png</texture>
<visible>!Control.HasFocus(3100)</visible>
</control>
<control type="image">
<posx>5</posx>
<posy>5</posy>
<width>190</width>
<height>42</height>
<description>Button 2 Icon</description>
<info>Skin.String(GamesFavorites-1Image2)</info>
<visible>Skin.String(GamesFavorites-1Image2)</visible>
</control>
<control type="label">
<description>Button 2 Label</description>
<posx>0</posx>
<posy>14</posy>
<width>200</width>
<height>53</height>
<font>font14</font>
<include>TextcolorBlack</include>
<include>shadow-grey</include>
<align>center</align>
<info>Skin.String(GamesFavorites-1Name2)</info>
<visible>Skin.String(GamesFavorites-1Name2)</visible>
</control>
<control type="button" id="3100">
<width>200</width>
<height>53</height>
<onleft>5</onleft>
<onright>2</onright>
<ondown>32</ondown>
<onup>30</onup>
<description>Button 2</description>
<onclick>$INFO[Skin.String(GamesFavorites-1File2)]</onclick>
</control>
</control>
<control type="group" id="32">
<width>235</width>
<height>53</height>
<visible>Skin.HasSetting(GamesFavorites-1Enable3)</visible>
<control type="image">
<width>200</width>
<height>53</height>
<description>Button 3 Icon</description>
<texture>wide-thumb-focus.png</texture>
<visible>Control.HasFocus(3200)</visible>
</control>
<control type="image">
<width>200</width>
<height>53</height>
<description>Button 3 Icon</description>
<texture>wide-thumb-nofocus.png</texture>
<visible>!Control.HasFocus(3200)</visible>
</control>
<control type="image">
<posx>5</posx>
<posy>5</posy>
<width>190</width>
<height>42</height>
<description>Button 3 Icon</description>
<info>Skin.String(GamesFavorites-1Image3)</info>
<visible>Skin.String(GamesFavorites-1Image3)</visible>
</control>
<control type="label">
<description>Button 3 Label</description>
<posx>0</posx>
<posy>14</posy>
<width>200</width>
<height>53</height>
<font>font14</font>
<include>TextcolorBlack</include>
<include>shadow-grey</include>
<align>center</align>
<info>Skin.String(GamesFavorites-1Name3)</info>
<visible>Skin.String(GamesFavorites-1Name3)</visible>
</control>
<control type="button" id="3200">
<width>200</width>
<height>53</height>
<onleft>5</onleft>
<onright>2</onright>
<ondown>33</ondown>
<onup>31</onup>
<description>Button 3</description>
<onclick>$INFO[Skin.String(GamesFavorites-1File3)]</onclick>
</control>
</control>
</control>