trigger_guide!() { /* proc-macro */ }
Expand description
Takes a list of sequences of combos and turns it into a u8 array that can be stored in memory as a contiguous piece of data. This is necessary to store the trigger guide independently of rust compilation.
use kll_core::{Capability, CapabilityState, TriggerCondition, trigger};
const TRIGGER_GUIDES: &'static [u8] = kll_macros::trigger_guide!(
[[
TriggerCondition::Switch {
state: trigger::Phro::Hold,
index: 6,
loop_condition_index: 0,
},
TriggerCondition::Switch {
state: trigger::Phro::Hold,
index: 7,
loop_condition_index: 0,
},
]],
[[
TriggerCondition::Switch {
state: trigger::Phro::Hold,
index: 6,
loop_condition_index: 0,
},
]],
[[
TriggerCondition::Layer {
state: trigger::LayerState::ShiftActivate,
layer: 3,
loop_condition_index: 0,
},
]],
[[
TriggerCondition::AnalogDistance {
reserved: 0,
index: 8,
val: 1500,
},
]],
);