Results 1 to 3 of 3

Thread: Determining button highlight order

  1. #1
    FLAC is for flaccid parksgm's Avatar
    Join Date
    Dec 2005
    Location
    Dallas, Texas
    Posts
    1,119

    Determining button highlight order

    How do I determine which order buttons are selected in when using the arrow keys to move between buttons in SD? I want to be able to use the up and down arrow keys (not left and right) to move sequentially through the buttons on screen.

    I modified the default skin by removing some of the buttons I don't use from CStartModule, and then putting the four buttons I do use in a vertical column down the left half of the screen, with a fifth button on the right side of the screen. I then edited the Z order so that the first button at the top of the screen is first, then second button on the screen is second, and so on, with the fifth button last in the Z order.

    However, when I use the up and down arrow keys to move the highlight between buttons, the selection behavior changes depending on if I am using the down key, or the up key. For instance, if I start at the top of the column and press the down key, the highlight moves down the four buttons of the vertical column and then to the fifth button. But, I am am on the fourth button in the vertical column and press "up" to move to the button directly above the fourth button on screen, the highlight will move to the fifth button on the right of the screen. If I press the up key again, the highlight will move from the fifth button back to the third button.

    Editing the Z-order doesn't seem to affect this behavior...so what do I do?

  2. #2
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    Quote Originally Posted by parksgm View Post
    How do I determine which order buttons are selected in when using the arrow keys to move between buttons in SD? I want to be able to use the up and down arrow keys (not left and right) to move sequentially through the buttons on screen.

    I modified the default skin by removing some of the buttons I don't use from CStartModule, and then putting the four buttons I do use in a vertical column down the left half of the screen, with a fifth button on the right side of the screen. I then edited the Z order so that the first button at the top of the screen is first, then second button on the screen is second, and so on, with the fifth button last in the Z order.

    However, when I use the up and down arrow keys to move the highlight between buttons, the selection behavior changes depending on if I am using the down key, or the up key. For instance, if I start at the top of the column and press the down key, the highlight moves down the four buttons of the vertical column and then to the fifth button. But, I am am on the fourth button in the vertical column and press "up" to move to the button directly above the fourth button on screen, the highlight will move to the fifth button on the right of the screen. If I press the up key again, the highlight will move from the fifth button back to the third button.

    Editing the Z-order doesn't seem to affect this behavior...so what do I do?
    The direction in which the highlight moves is determined by the closest button in one direction to the current button. If two buttons are at the same y position, it will move to the one with the closest X position to the current one. If the button is moving to the left or the right when there is a button directly above it. It means that the buttons to the left or the right are slightly lower then the button above it. This may be so even if the buttons are only 1 or two pixels lower and to the human eye look exactly even. To fix this make all the buttons in a row at the same exact y position and make sure all the buttons are the same height.
    StreetDeck.com Developer (I am Chuck)
    Get StreetDeck at http://www.streetdeck.com
    The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

  3. #3
    FLAC is for flaccid parksgm's Avatar
    Join Date
    Dec 2005
    Location
    Dallas, Texas
    Posts
    1,119
    Quote Originally Posted by god_of_cpu View Post
    The direction in which the highlight moves is determined by the closest button in one direction to the current button. If two buttons are at the same y position, it will move to the one with the closest X position to the current one. If the button is moving to the left or the right when there is a button directly above it. It means that the buttons to the left or the right are slightly lower then the button above it. This may be so even if the buttons are only 1 or two pixels lower and to the human eye look exactly even. To fix this make all the buttons in a row at the same exact y position and make sure all the buttons are the same height.
    Thanks for the quick reply! I changed the button location, and they now highlight as expected.

Similar Threads

  1. Relocating computer power button
    By King_Xerxes in forum General Hardware Discussion
    Replies: 8
    Last Post: 02-21-2007, 09:15 PM
  2. iGmod Beta 2 release
    By PURDooM in forum Other Cool Stuff
    Replies: 625
    Last Post: 05-12-2006, 02:52 PM
  3. Power Button not working?
    By NoTicketsPlease in forum Newbie
    Replies: 5
    Last Post: 02-28-2006, 10:43 PM
  4. PC power button problem
    By BMp3W in forum Power Supplies
    Replies: 4
    Last Post: 10-12-2002, 02:36 AM
  5. internet button on my pc
    By babas151 in forum General Hardware Discussion
    Replies: 10
    Last Post: 05-31-2002, 02:41 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
  •