mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-25 16:18:57 +08:00
adding zero_out to input bindings
This commit is contained in:
parent
30d7f2ee66
commit
c204842d2c
|
@ -554,6 +554,9 @@ namespace Blah
|
||||||
// assigns all the bindings to the specific controller
|
// assigns all the bindings to the specific controller
|
||||||
ButtonBinding& set_controller(int index);
|
ButtonBinding& set_controller(int index);
|
||||||
|
|
||||||
|
// clears values (except for last input timestamps)
|
||||||
|
void zero_out();
|
||||||
|
|
||||||
// removes all bindings
|
// removes all bindings
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
@ -642,6 +645,9 @@ namespace Blah
|
||||||
// assigns all the bindings to the specific controller
|
// assigns all the bindings to the specific controller
|
||||||
AxisBinding& set_controller(int index);
|
AxisBinding& set_controller(int index);
|
||||||
|
|
||||||
|
// clears values (except for last input timestamps)
|
||||||
|
void zero_out() { negative.zero_out(); positive.zero_out(); }
|
||||||
|
|
||||||
// Clears all Bindings
|
// Clears all Bindings
|
||||||
void clear();
|
void clear();
|
||||||
};
|
};
|
||||||
|
@ -712,6 +718,9 @@ namespace Blah
|
||||||
// assigns all the bindings to the specific controller
|
// assigns all the bindings to the specific controller
|
||||||
StickBinding& set_controller(int index);
|
StickBinding& set_controller(int index);
|
||||||
|
|
||||||
|
// clears values (except for last input timestamps)
|
||||||
|
void zero_out() { x.zero_out(); y.zero_out(); }
|
||||||
|
|
||||||
// Clears all the bindings
|
// Clears all the bindings
|
||||||
void clear();
|
void clear();
|
||||||
};
|
};
|
||||||
|
|
|
@ -583,6 +583,14 @@ ButtonBinding& ButtonBinding::set_controller(int index)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ButtonBinding::zero_out()
|
||||||
|
{
|
||||||
|
m_down = false;
|
||||||
|
m_pressed = false;
|
||||||
|
m_released = false;
|
||||||
|
m_value = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
void ButtonBinding::clear()
|
void ButtonBinding::clear()
|
||||||
{
|
{
|
||||||
keys.clear();
|
keys.clear();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user