mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-28 04:44:06 +00:00
Consts formatting
This commit is contained in:
parent
7a7e7bdc52
commit
f999b4669c
1 changed files with 18 additions and 20 deletions
|
@ -1447,22 +1447,22 @@ impl ToggleTrait for RecordingFrames {
|
||||||
Debug, Clone, Copy, PartialEq, FromPrimitive, EnumIter, Serialize_repr, Deserialize_repr,
|
Debug, Clone, Copy, PartialEq, FromPrimitive, EnumIter, Serialize_repr, Deserialize_repr,
|
||||||
)]
|
)]
|
||||||
pub enum ButtonConfig {
|
pub enum ButtonConfig {
|
||||||
A = 0b0000_0000_0000_0000_0001,
|
A = 0b0000_0000_0000_0000_0001,
|
||||||
B = 0b0000_0000_0000_0000_0010,
|
B = 0b0000_0000_0000_0000_0010,
|
||||||
X = 0b0000_0000_0000_0000_0100,
|
X = 0b0000_0000_0000_0000_0100,
|
||||||
Y = 0b0000_0000_0000_0000_1000,
|
Y = 0b0000_0000_0000_0000_1000,
|
||||||
L = 0b0000_0000_0000_0001_0000,
|
L = 0b0000_0000_0000_0001_0000,
|
||||||
R = 0b0000_0000_0000_0010_0000,
|
R = 0b0000_0000_0000_0010_0000,
|
||||||
ZL = 0b0000_0000_0000_0100_0000,
|
ZL = 0b0000_0000_0000_0100_0000,
|
||||||
ZR = 0b0000_0000_0000_1000_0000,
|
ZR = 0b0000_0000_0000_1000_0000,
|
||||||
DpadUp = 0b0000_0000_0001_0000_0000,
|
DpadUp = 0b0000_0000_0001_0000_0000,
|
||||||
DpadDown = 0b0000_0000_0010_0000_0000,
|
DpadDown = 0b0000_0000_0010_0000_0000,
|
||||||
DpadLeft = 0b0000_0000_0100_0000_0000,
|
DpadLeft = 0b0000_0000_0100_0000_0000,
|
||||||
DpadRight = 0b0000_0000_1000_0000_0000,
|
DpadRight = 0b0000_0000_1000_0000_0000,
|
||||||
Plus = 0b0000_0001_0000_0000_0000,
|
Plus = 0b0000_0001_0000_0000_0000,
|
||||||
Minus = 0b0000_0010_0000_0000_0000,
|
Minus = 0b0000_0010_0000_0000_0000,
|
||||||
LStick = 0b0000_0100_0000_0000_0000,
|
LStick = 0b0000_0100_0000_0000_0000,
|
||||||
RStick = 0b0000_1000_0000_0000_0000,
|
RStick = 0b0000_1000_0000_0000_0000,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ButtonConfig {
|
impl ButtonConfig {
|
||||||
|
@ -1491,12 +1491,10 @@ impl ButtonConfig {
|
||||||
|
|
||||||
impl ToggleTrait for ButtonConfig {
|
impl ToggleTrait for ButtonConfig {
|
||||||
fn to_toggle_strs() -> Vec<&'static str> {
|
fn to_toggle_strs() -> Vec<&'static str> {
|
||||||
ButtonConfig::iter()
|
ButtonConfig::iter().map(|i| i.as_str()).collect()
|
||||||
.map(|i| i.as_str())
|
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn to_toggle_vals() -> Vec<u32> {
|
fn to_toggle_vals() -> Vec<u32> {
|
||||||
ButtonConfig::iter().map(|i| i as u32).collect()
|
ButtonConfig::iter().map(|i| i as u32).collect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue