Change textureFocus at runtime

Discussion in 'MediaPortal 1 Plugins' started by GannTrader, February 7, 2007.

  1. GannTrader

    GannTrader Portal Member

    Joined:
    January 31, 2007
    Messages:
    29
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Sweden Sweden
    Hi

    Im building a plugin and want to change the textureFocus property at runtime.
    How is this done?



    /GannTrader
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. overture

    overture Portal Pro

    Joined:
    January 3, 2006
    Messages:
    79
    Likes Received:
    0
    Occupation:
    Software Developer
    Location:
    Bangor
    Ratings:
    +0 / 0
    Home Country:
    Is 'textureFocus' a XML skin element? or a property of an object in c#?...and if so which object?
     
  4. GannTrader

    GannTrader Portal Member

    Joined:
    January 31, 2007
    Messages:
    29
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Sweden Sweden
    Hi

    Its the XML skin element skincontrol.
    I have a button that i want to change the textureFocus element for.

    /GannTrader
     
  5. GannTrader

    GannTrader Portal Member

    Joined:
    January 31, 2007
    Messages:
    29
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Sweden Sweden
    Hi

    With the following code i can get the textureFocus property
    string filename = ((GUIButtonControl)GetControl(ID)).TexutureFocusName;

    The problem is that this property is READ ONLY.
    How do i set the textureFocus for a buttoncontrol?

    /GannTrader
     
  6. moiristo

    moiristo Portal Pro

    Joined:
    November 17, 2006
    Messages:
    342
    Likes Received:
    27
    Occupation:
    Senior software developer
    Location:
    Enschede
    Ratings:
    +27 / 0
    Home Country:
    Netherlands Netherlands
    I guess it's not possible to do that, looking at the GUIButtonControl class; maybe that property can't be changed after instantiation. Maybe it's possible to extend the class to try if it works?
     
  7. overture

    overture Portal Pro

    Joined:
    January 3, 2006
    Messages:
    79
    Likes Received:
    0
    Occupation:
    Software Developer
    Location:
    Bangor
    Ratings:
    +0 / 0
    Home Country:
    I think you can only set it through the XML file then the button is rendered on the start-up of mediaportal. So I think this would be pretty difficult to do.
     
  8. GannTrader

    GannTrader Portal Member

    Joined:
    January 31, 2007
    Messages:
    29
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Sweden Sweden
    Hi

    If changing textureFocus is not an option heres what i need to do.

    I have an picture and when clicked on i want it to change to another picture and when clicked on one more time i want to change to a 3:rd picture and so on.
    To be able to use keybord the picture must be able to have focus as well.

    Can this be done?
    If not can it be done by using DirectX and if yes how?
    Will it be possible to change textureFocus in the future?
    Will this maybe be possible i a near future?

    /GannTrader
     
  9. moiristo

    moiristo Portal Pro

    Joined:
    November 17, 2006
    Messages:
    342
    Likes Received:
    27
    Occupation:
    Senior software developer
    Location:
    Enschede
    Ratings:
    +27 / 0
    Home Country:
    Netherlands Netherlands
    Maybe you can use the GUIButton3PartControl class; it seems to have setters for the textures.
     
  10. GannTrader

    GannTrader Portal Member

    Joined:
    January 31, 2007
    Messages:
    29
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Sweden Sweden
    Hi

    I have solved the problem myself.

    To be able to switch textureFocusimage picture you can delete the button and then create it dynamicly with the image you want to use.

    /GannTrader
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!