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

feat: set global input state, synchronize methods #1

Closed
wants to merge 22 commits into from
Closed

feat: set global input state, synchronize methods #1

wants to merge 22 commits into from

Commits on Jan 9, 2024

  1. test: add tests for global input state

    Added new test input action, test scene and script with (currently
    failing) tests for changes to simulation of global input state in
    Godot 4.2, in which Input::ParseInputEvent() no longer sets
    Input::IsActionPressed().
    wlsnmrk committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    a511afd View commit details
    Browse the repository at this point in the history
  2. fix: global input state simulation for actions

    Updated action-input simulation extension methods to simulate global
    input state in addition to events. Fixes behavior of StartAction()
    and EndAction() to correctly set Input::IsActionPressed() in Godot
    4.2.
    wlsnmrk committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    a1528b2 View commit details
    Browse the repository at this point in the history
  3. test: add tests for synchronous input state

    Added new (currently failing) tests for
    Input::IsActionJustPressed/Released(), which should be true
    immediately after starting or ending an action, respectively.
    wlsnmrk committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    35eb775 View commit details
    Browse the repository at this point in the history
  4. fix: synchronize action-input simulation

    To enable testing global input state immediately following inputs,
    made action-input extensions synchronous, excepting HoldActionFor().
    Tests for Input::IsActionJustPressed/Released() now pass.
    
    BREAKING CHANGE: where possible, action-input methods are no longer
    async, are void instead of returning Task, and have no frame delay.
    wlsnmrk committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    807be1a View commit details
    Browse the repository at this point in the history
  5. refactor: synchronize keyboard-input simulation

    BREAKING CHANGE: where possible, keyboard-input methods are no longer
    async, are void instead of returning Task, and have no frame delay.
    wlsnmrk committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    de791ff View commit details
    Browse the repository at this point in the history
  6. refactor: synchronize mouse-input simulation

    To make tests relying on mouse input more frame-accurate, made mouse-
    input extensions synchronous. Set Relative property on simulated
    mouse-motion events, since relative motion will no longer accumulate
    in input buffer with immediate event flushing. Propagated
    synchronicity to dependent driver methods and tests.
    
    BREAKING CHANGE: mouse-input methods and many driver methods are no
    longer async, are void instead of returning Task, and have no frame
    delay.
    wlsnmrk committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    625c118 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2024

  1. refactor: synchronize Control driver methods

    To make tests relying on Control behavior more frame-accurate, made
    control driver's GrabFocus() and ReleaseFocus() methods synchronous.
    
    BREAKING CHANGE: Control driver's Grab/ReleaseFocus() methods are no
    longer async, are void instead of returning Task, and have no frame
    delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    9ab3fae View commit details
    Browse the repository at this point in the history
  2. refactor: synchronize BaseButton driver methods

    Make BaseButtonDriver::Press() synchronous and update dependent
    tests.
    
    BREAKING CHANGE: BaseButtonDriver::Press() is no longer async, is
    void instead of returning Task, and has no frame delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    2498407 View commit details
    Browse the repository at this point in the history
  3. test: verify Camera2D stability after move

    Verified the return value of the Camera2DDriver::MoveIntoView()
    method to ensure the camera stabilizes in its new position. Fixed
    comment to reflect truth/falsity of sprite visibility.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    9a4597a View commit details
    Browse the repository at this point in the history
  4. refactor: synchronize ItemList driver methods

    BREAKING CHANGE: ItemList driver methods are no longer async, are
    void instead of returning Task, and have no frame delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    91355df View commit details
    Browse the repository at this point in the history
  5. refactor: synchronize LineEdit driver methods

    BREAKING CHANGE: LineEdit driver methods are no longer async, are
    void instead of returning Task, and have no frame delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    41b1e44 View commit details
    Browse the repository at this point in the history
  6. refactor: synchronize OptionButton driver methods

    BREAKING CHANGE: OptionButtuon driver methods are no longer async,
    are void instead of returning Task, and have no frame delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    493e8b1 View commit details
    Browse the repository at this point in the history
  7. refactor: synchronize PopupMenu driver methods

    BREAKING CHANGE: PopupMenu driver methods are no longer async, are
    void instead of returning Task, and have no frame delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    0b97261 View commit details
    Browse the repository at this point in the history
  8. refactor: synchronize TextEdit driver methods

    BREAKING CHANGE: TextEdit driver methods are no longer async, are
    void instead of returning Task, and have no frame delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    58d5e3f View commit details
    Browse the repository at this point in the history
  9. refactor: synchronize Window driver methods

    BREAKING CHANGE: Window driver methods are no longer async, are void
    instead of returning Task, and have no frame delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    9c05c4a View commit details
    Browse the repository at this point in the history
  10. docs: update description of WindowDriver::Close()

    Updated description of WindowDriver::Close() to reflect that it
    doesn't operate by clicking.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    4d289fe View commit details
    Browse the repository at this point in the history
  11. refactor: synchronize TabContainer driver methods

    Also updated docs to reflect that Godot requires a frame after a tab
    is selected before updating visibility of tab contents.
    
    Also updated TabContainerDriver test to wait a frame after selecting
    a tab, before checking content visibility, since the driver method no
    longer has a frame delay.
    
    BREAKING CHANGE: TabContainer driver methods are no longer async, are
    void instead of returning Task, and have no frame delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    a7624d5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    256ead1 View commit details
    Browse the repository at this point in the history
  13. docs: updated README examples for synchrony

    * Changed code examples in README that no longer require async/await
    * Updated description of input simulation to reflect synchrony
    * Changed FAQ on asynchrony to describe it as a requirement only in
      some cases
    * Pointed users toward the waiting extension examples from multiple
      other parts of README in case they need to pump frames in tests
    * Removed guidance to limit state modification to the engine's
      process notifications
    * Removed guidance to include frame delays in driver code, in favor
      of precise frame pumping in tests as needed
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    25321cb View commit details
    Browse the repository at this point in the history
  14. refactor: make Fixture scene loading synchronous

    BREAKING CHANGE: Fixture::LoadScene() methods are no longer async,
    return T instead of Task<T>, and have no frame delay.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    5434369 View commit details
    Browse the repository at this point in the history
  15. refactor: wait less after adding node in Fixture

    Changed Fixture::AddToRoot() to wait 1 frame intead of 2 for a new
    node's _Ready() to be called.
    wlsnmrk committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    b332a3a View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2024

  1. feat: synchronous Camera2D motion-start method

    To provide a synchronous option to users, added a method to the
    Camera2D driver to start moving a target position into view without
    waiting for the camera's motion to finish.
    wlsnmrk committed Jan 13, 2024
    Configuration menu
    Copy the full SHA
    04513e8 View commit details
    Browse the repository at this point in the history