Help! how to stop the button fading in/out when focused
#1
I'm using a grouplist control with the list of buttons. When I focused the buttons, they will pulse fading in/out becoming semi-transparent and i can see the background behind them.

Code:
<control type="group" id="4126">
    <description>My first group list control</description>
    <posx>12</posx>
    <posy>315</posy>
    <width>1224</width>
    <height>259</height>
    <itemgap>10</itemgap>
    <pagecontrol>7</pagecontrol>
    <fade>no</fade>
    <orientation>vertical</orientation>
    <usecontrolcoords>false</usecontrolcoords>
    <visible>true</visible>
    <onup>2</onup>
    <ondown>3</ondown>
    <onleft>2</onleft>
    <onright>4</onright>

    <!--ROW 1-->
    <control type="button" id="4127">
        <description>Channel Button 1</description>
        <posx>0</posx>
        <posy>0</posy>
        <width>350</width>
        <height>34</height>
        <visible>true</visible>
        <texturefocus>channels_bar1.png</texturefocus>
        <texturenofocus>changelang_yellow.png</texturenofocus>
        <label>hello</label>
        <font>Font_Bold25</font>
        <textcolor>0xFF000000</textcolor>
        <disabledcolor>0xFFFFFFFF</disabledcolor>
        <fade>no</fade>
        <align>left</align>
        <aligny>top</aligny>
        <pulseonselect></pulseonselect>
        <onclick></onclick>
        <onfocus>SetFocus(4131)</onfocus>
        <onup>2</onup>
        <ondown>3</ondown>
        <onleft>1</onleft>
        <onright>1</onright>
    </control>
            
    <control type="button" id="4131">
        <description>Channel Button 2</description>
        <posx>0</posx>
        <posy>37</posy>
        <width>350</width>
        <height>34</height>
        <visible>true</visible>
        <texturefocus>changelang_yellow.png</texturefocus>
        <texturenofocus>channels_bar1.png</texturenofocus>
        <label></label>
        <font>Font_Bold25</font>
        <textcolor>0xFF000000</textcolor>
        <disabledcolor>0xFFFFFFFF</disabledcolor>
        <fade>no</fade>
        <align>left</align>
        <aligny>center</aligny>
        <pulseonselect></pulseonselect>
        <onclick></onclick>
        <onfocus></onfocus>
        <onup></onup>
        <ondown></ondown>
        <onleft></onleft>
        <onright></onright>
    </control>
</control>


I have tried to use the <fade>no</fade> to block the fading in/out, but it will not work when I focused the button.

How do you use the grouplist control with the list of buttons to block the fading in/out when focused them?
Reply
#2
Try

<pulseonselect>false</pulseonselect>

That should be setup in the defaults.xml for button controls, then there is no need to include the <pulseonselect> tag in the control.

ps <fade>no</fade> Smile lol, not a valid tag.
Reply
#3
Thank you very much for your help Steve, I can see it have fixed the problem. Smile

There is a bit of a problem. When I pressed on the down arrow button of the keyboard to focused the button, the first button will not change the image from yellow to blue and the second button will change the image from blue to yellow.

Image

Image

How I can focus on the first button to get them to change the image using above code?
Reply
#4
Take a close look at your texturefocus and texturenofocus tags in the above code, they should be the same for both controls. your's are swapped around from one control to the other. So copy the texturefocus and texturenofocus tags from control button 1 into control button 2.
Reply
#5
I have copied the texturefocus and texturenofocus tags in my control button 2 from the control button 1, but it will show like this when I open the skin window:

Image


Here is the update code:

Code:
<control type="grouplist" id="4126">
    <description>My first group list control</description>
    <posx>12</posx>
    <posy>315</posy>
    <width>1224</width>
    <height>259</height>
    <itemgap>10</itemgap>
    <pagecontrol>7</pagecontrol>
    <scrolltime tween="sine" easing="out">200</scrolltime>
    <orientation>vertical</orientation>
    <usecontrolcoords>false</usecontrolcoords>
    <visible>true</visible>
    <onup>2</onup>
    <ondown>4131</ondown>
    <onleft>1</onleft>
    <onright>1</onright>
          
    <control type="button" id="4127">
        <description>Channel Button 1</description>
        <posx>0</posx>
        <posy>0</posy>
        <width>350</width>
        <height>34</height>
        <visible>true</visible>
        <texturefocus>channels_bar1.png</texturefocus>
        <texturenofocus>changelang_yellow.png</texturenofocus>
        <label>hello</label>
        <font>Font_Bold25</font>
        <textcolor>0xFF000000</textcolor>
        <disabledcolor>0xFFFFFFFF</disabledcolor>
        <align>left</align>
        <aligny>top</aligny>
        <pulseonselect>no</pulseonselect>
        <onclick></onclick>
        <onfocus>-</onfocus>
        <onup>2</onup>
        <ondown>4131</ondown>
        <onleft>1</onleft>
        <onright>1</onright>
    </control>
</control>


I want the yellow image to be on the control button 1 and I also want to have the blue image in the control button 2 so it will get swap over when I press on the up and down arrow button.

If I have done it wrong, please post the example code so I will understand it better.
Reply
#6
Ok, Try something like this. Smile

Code:
<control type="grouplist" id="4126">
    <description>My first group list control</description>
    <posx>12</posx>
    <posy>315</posy>
    <width>1224</width>
    <height>259</height>
    <itemgap>10</itemgap>
    <pagecontrol>7</pagecontrol>
    <orientation>vertical</orientation>
    <usecontrolcoords>false</usecontrolcoords>
    <visible>true</visible>
    <onup>4126</onup>
    <ondown>4126</ondown>
    <onleft>2</onleft>
    <onright>4</onright>

    <!--ROW 1-->
    <control type="button" id="4127">
        <description>Channel Button 1</description>
        <posx>0</posx>
        <posy>0</posy>
        <width>350</width>
        <height>34</height>
        <visible>true</visible>
        <texturefocus>changelang_yellow.png</texturefocus>
        <texturenofocus>channels_bar1.png</texturenofocus>
        <label>hello</label>
        <font>Font_Bold25</font>
        <textcolor>0xFFFFFFFF</textcolor>
        <focusedcolor>FF000000</focusedcolor>
        <disabledcolor>0xFFFFFFFF</disabledcolor>
        <align>left</align>
        <aligny>top</aligny>
        <pulseonselect>false</pulseonselect>
        <onclick>noop</onclick>
    </control>
            
    <control type="button" id="4131">
        <description>Channel Button 2</description>
        <posx>0</posx>
        <posy>37</posy>
        <width>350</width>
        <height>34</height>
        <visible>true</visible>
        <texturefocus>changelang_yellow.png</texturefocus>
        <texturenofocus>channels_bar1.png</texturenofocus>
        <label>Hello 2</label>
        <font>Font_Bold25</font>
        <textcolor>0xFFFFFFFF</textcolor>
        <focusedcolor>FF000000</focusedcolor>
        <disabledcolor>0xFFFFFFFF</disabledcolor>
        <align>left</align>
        <aligny>center</aligny>
        <pulseonselect>false</pulseonselect>
        <onclick>noop</onclick>
    </control>
</control>
Reply
#7
Thank you very much for your help.

Problem are now solved! Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Help! how to stop the button fading in/out when focused0