Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How to make two state buttons?

  1. #1
    Constant Bitrate
    Join Date
    Jan 2007
    Location
    Greece
    Posts
    134

    How to make two state buttons?

    OK, here is another quick question.

    I want to make a button to have two states. A normal and a pressed one.
    When I press it, i want to stay in the pressed state, and when pressed again to return to normal state.

    I want to make sth like a switch. ON and OFF.

    I read the readme but i found nothing.

  2. #2
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    Try using a custom indicator for the button.

  3. #3
    Constant Bitrate
    Join Date
    Jan 2007
    Location
    Greece
    Posts
    134
    Any help on that?

    How i assing I01 to B01?

    The readme doesn't give any help...

  4. #4
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    Use a similar format:

    Ixx,xxx,....,"!MYINDICATOR"

    for the button you want to change the state of (OFF/ON).

    When you push the button, on top of doing your command, you'll need to add a BYVAR argument (0/1). This, in turn, will set the state of the button using the following:

    "SETIND;!MYINDICATOR;OFF/ON"

  5. #5
    Constant Bitrate will_santana's Avatar
    Join Date
    Mar 2007
    Location
    Rio de Janeiro/Brasil
    Posts
    186
    got some problems trying this

    when I place a indicator over a button, when I mouse over it or navigate with the keys (the same effect as mouse over), the indicator desapears

    made some tests and indicators still there. if I place half the indicator's image over the button, just the overlayed portion of indicator is erased. the other half keeps showing nice.

    indicators are clickable itself, but it's not possible to navigate them just like buttons (guino please include this in next release... if its interactive, it should be n possible to access by keys )

    I just wanna a button that keeps highlighted till I press it again (toogle or state button like repeat or mute). but neither normal or custom indicators work when placed over a button

    help please, RR gurus

    []s

  6. #6
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    Quote Originally Posted by will_santana View Post
    got some problems trying this

    when I place a indicator over a button, when I mouse over it or navigate with the keys (the same effect as mouse over), the indicator desapears

    made some tests and indicators still there. if I place half the indicator's image over the button, just the overlayed portion of indicator is erased. the other half keeps showing nice.

    indicators are clickable itself, but it's not possible to navigate them just like buttons (guino please include this in next release... if its interactive, it should be n possible to access by keys )

    I just wanna a button that keeps highlighted till I press it again (toogle or state button like repeat or mute). but neither normal or custom indicators work when placed over a button

    help please, RR gurus

    []s
    I've had the same problem with this. Static "ON" states disappears when you mouse over a button that has an indicator on it.

    You could work around it with the indicator blinking.

  7. #7
    Constant Bitrate will_santana's Avatar
    Join Date
    Mar 2007
    Location
    Rio de Janeiro/Brasil
    Posts
    186
    thanks for the reply. i've already tried with blinking indicators, but some got REALLY annoying... imagine the repeat indicator blinking all the time the carputer is on...

    hope someone have some solution to this...

    []s

  8. #8
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,723
    Blog Entries
    1

    Switchbutton command

    You can use the Switchbutton command to do this as well

    Code:
    "YourOnCommand||SWITCHBUTTON;1>>YourOffCommand"
    This will toggle the first command when you press it, and the second command when pressed, and when pressed again goes back to the first command.

    NOTE: This is dependant on where the button is in the .skin file. Meaning, in the above example, the button needs to be the "1" (first) button listed from top to bottom in the skin file.

    You can use the Double Pipe's (||) to add more than one command, such as:

    Code:
     "YourOnCommand||SETIND;!MYINDICATOR;ON ||SWITCHBUTTON;1>>YourOffCommand|||SETIND;!MYINDICATOR;OFF"
    I have not tested the above line, so syntax may not be perfect, but it should work.
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  9. #9
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    Code:
     "YourOnCommand||SETIND;!MYINDICATOR;ON ||SWITCHBUTTON;1>>YourOffCommand||SETIND;!MYINDICATOR;OFF||SWITCHBUTTON;1"
    Needs additional code to complete switching back and forth.
    Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

  10. #10
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,723
    Blog Entries
    1
    Quote Originally Posted by Sal R. View Post
    Code:
     "YourOnCommand||SETIND;!MYINDICATOR;ON ||SWITCHBUTTON;1>>YourOffCommand||SETIND;!MYINDICATOR;OFF||SWITCHBUTTON;1"
    Needs additional code to complete switching back and forth.
    Hehehe thanks, it's hard to remember some of the stuff when doing it from memory, If I would have taken the time to test it, could have noticed that right away
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 16
    Last Post: 09-05-2007, 05:19 PM
  2. add buttons to home page
    By badassfirebird in forum Road Runner
    Replies: 16
    Last Post: 01-25-2007, 11:50 AM
  3. Brushed Skin Needs Some Editing (Bigger Buttons)
    By Chita79 in forum Road Runner
    Replies: 15
    Last Post: 02-20-2005, 08:37 PM
  4. Best way to make a 'flip up' monitor?
    By GReeToZ in forum Fabrication
    Replies: 34
    Last Post: 01-21-2005, 06:48 PM
  5. What's the difference between Hibernate and Standby?
    By BriCubz in forum General MP3Car Discussion
    Replies: 8
    Last Post: 08-17-2004, 10:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •