Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak joysticks and add CSS variables #63

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Commits on Jan 8, 2022

  1. Yoke can now read numeric variables from CSS

    This commit adds CSS variables and a codebase that for now, is unused.
    In a future commit, most variables will be read from the CSS instead of
    hardcoded in the JavaScript.
    This allows users to both fine-tune Yoke more easily, and also to fix
    settings per layout and per control (for example, the first button from
    a given layout might need extra force to be pushed).
    
    CSS blocks have also been moved around for the user's convenience.
    Critical parameters that users should not touch are now at the bottom of
    the file.
    Parameters at the top will be overridden by parameters at the bottom,
    following normal CSS priority rules.
    No examples are given for this, but parameters bound to any specific
    control by ID (e.g. "#j1") would be given a higher priority.
    medape committed Jan 8, 2022
    Configuration menu
    Copy the full SHA
    0e5a4b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9123b31 View commit details
    Browse the repository at this point in the history
  3. Add support for joystick shapes and deadzones

    Joysticks can now be elliptical, square, round or rectangular.
    A central deadzone is also supported, which depends on the joystick shape:
    rectangular joysticks have axial deadzones (evaluated separately for each
    component), while round joysticks have a single radial deadzone.
    
    Both deadzones are scaled, meaning that output grows gradually from the
    edge of the deadzone to the edge of the joystick.
    medape committed Jan 8, 2022
    Configuration menu
    Copy the full SHA
    891ca49 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dad3ce7 View commit details
    Browse the repository at this point in the history
  5. Regularize shapes across controls

    - D-pad and knobs are compatible now with all four shapes
    - D-pads, knobs, and joysticks use similar CSS and JS
    - Knobs have now an image (made with Inkscape and manually trimmed down),
    - D-pads use now CSS filters instead of hardcoded shadows
    medape committed Jan 8, 2022
    Configuration menu
    Copy the full SHA
    06466ac View commit details
    Browse the repository at this point in the history
  6. Add more options for button labels

    Also, remove bg.svg, bm.svg, bs.svg, which have been superseded by
    button.svg#bg, #bm and #bs.
    medape committed Jan 8, 2022
    Configuration menu
    Copy the full SHA
    0c691ff View commit details
    Browse the repository at this point in the history
  7. CChange sorting method for controls

    Several programs on Linux (and all programs in Windows, due to a design
    decision on Yoke) ignore the semantics of every button and only look at
    the order in which they are reported.
    
    Because of this, the JavaScript side now reorders controls to simplify
    most configurations (face buttons should go first, then in-game menu
    buttons, then thumbstick buttons, and then special buttons like the
    branded key to open the system menu, which is even less used in this
    scenario).
    medape committed Jan 8, 2022
    Configuration menu
    Copy the full SHA
    2492aa2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1363da5 View commit details
    Browse the repository at this point in the history