Announcement

Collapse
No announcement yet.

Determining button highlight order

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

    An amateur built the Ark. The Titanic was built by professionals.

  • #2
    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.

    Comment


    • #3
      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.

      An amateur built the Ark. The Titanic was built by professionals.

      Comment

      Working...
      X