Skip to content

Add VirtualAxis - #277

Merged
alice-i-cecile merged 3 commits into
Leafwing-Studios:mainfrom
johanhelsing:virtualaxis
Oct 28, 2022
Merged

alice-i-cecile merged 3 commits into
Leafwing-Studios:mainfrom
johanhelsing:virtualaxis

Conversation

@johanhelsing

Copy link
Copy Markdown
Contributor

Similar to VirtualDPad, but for one axis only.

Closes: #216

Similar to VirtualDPad, but for one axis only.
Comment thread src/axislike.rs Outdated
pub struct VirtualAxis {
/// The input that represents the up direction in this virtual DPad
pub negative: InputKind,
/// The input that represents the down direction in this virtual DPad

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, made some copy paste errors here.

Comment thread src/axislike.rs Outdated
/// Instead, use it directly as [`InputKind::Axis`]!
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct VirtualAxis {
/// The input that represents the up direction in this virtual DPad

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The input that represents the up direction in this virtual DPad
/// The input that represents the down direction in this virtual axis

Comment thread src/axislike.rs Outdated
pub struct VirtualAxis {
/// The input that represents the up direction in this virtual DPad
pub negative: InputKind,
/// The input that represents the down direction in this virtual DPad

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The input that represents the down direction in this virtual DPad
/// The input that represents the up direction in this virtual axis

@alice-i-cecile alice-i-cecile left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work! A minor doc suggestion, and this needs to be added to the change log.

@alice-i-cecile alice-i-cecile added the usability Reduce user friction label Oct 28, 2022
@alice-i-cecile
alice-i-cecile enabled auto-merge (squash) October 28, 2022 13:21
@alice-i-cecile
alice-i-cecile merged commit 71fb5b6 into Leafwing-Studios:main Oct 28, 2022
@johanhelsing
johanhelsing deleted the virtualaxis branch November 27, 2022 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

usability Reduce user friction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A one-dimensional version of VirtualDPad

2 participants