Skip to content

Commit

Permalink
Reorder conditions in all_conditions example
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Nov 3, 2024
1 parent a59a208 commit 7a24b38
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions examples/all_conditions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ impl InputContext for DummyContext {
ctx.bind::<PressAction>()
.with(PressAction::KEY)
.with_condition(Press::default());
ctx.bind::<JustPressAction>()
.with(JustPressAction::KEY)
.with_condition(JustPress::new(1.0));
ctx.bind::<HoldAction>()
.with(HoldAction::KEY)
.with_condition(Hold::new(1.0));
ctx.bind::<HoldAndReleaseAction>()
.with(HoldAndReleaseAction::KEY)
.with_condition(HoldAndRelease::new(1.0));
ctx.bind::<JustPressAction>()
.with(JustPressAction::KEY)
.with_condition(JustPress::new(1.0));
ctx.bind::<PulseAction>()
.with(PulseAction::KEY)
.with_condition(Pulse::new(1.0));
Expand Down Expand Up @@ -89,25 +89,25 @@ impl PressAction {

#[derive(Debug, InputAction)]
#[input_action(dim = Bool)]
struct HoldAction;
struct JustPressAction;

impl HoldAction {
impl JustPressAction {
const KEY: KeyCode = KeyCode::Digit2;
}

#[derive(Debug, InputAction)]
#[input_action(dim = Bool)]
struct HoldAndReleaseAction;
struct HoldAction;

impl HoldAndReleaseAction {
impl HoldAction {
const KEY: KeyCode = KeyCode::Digit3;
}

#[derive(Debug, InputAction)]
#[input_action(dim = Bool)]
struct JustPressAction;
struct HoldAndReleaseAction;

impl JustPressAction {
impl HoldAndReleaseAction {
const KEY: KeyCode = KeyCode::Digit4;
}

Expand Down

0 comments on commit 7a24b38

Please sign in to comment.