diff --git a/CHANGELOG.md b/CHANGELOG.md
index 46ef280..e997ef3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,9 @@ Improvements
- Increased TextFormatter macro recursion limit to 64
- Allow changing the default values used by default TextFormatter codes
+Removals
+- Marked GetDownTime, GetUpTime and GetTimeSincePress in Keybind and Combination as obsolete
+
### MLEM.Ui
Fixes
- Fixed images not updating their hidden state properly when the displayed texture changes
diff --git a/MLEM/Input/Keybind.cs b/MLEM/Input/Keybind.cs
index 4021544..2d58fd1 100644
--- a/MLEM/Input/Keybind.cs
+++ b/MLEM/Input/Keybind.cs
@@ -240,6 +240,7 @@ namespace MLEM.Input {
/// The input handler to query the keys with
/// The index of the gamepad to query, or -1 to query all gamepads
/// The resulting down time, or if the input is not being held.
+ [Obsolete("This method is deprecated, as it does not query Modifiers or InverseModifiers. Use InputHandler.GetDownTime or custom handling instead.")]
public TimeSpan GetDownTime(InputHandler handler, int gamepadIndex = -1) {
return this.combinations.Max(c => c.GetDownTime(handler, gamepadIndex));
}
@@ -251,6 +252,7 @@ namespace MLEM.Input {
/// The input handler to query the keys with
/// The index of the gamepad to query, or -1 to query all gamepads
/// The resulting up time, or if the input is being held.
+ [Obsolete("This method is deprecated, as it does not query Modifiers or InverseModifiers. Use InputHandler.GetUpTime or custom handling instead.")]
public TimeSpan GetUpTime(InputHandler handler, int gamepadIndex = -1) {
return this.combinations.Min(c => c.GetUpTime(handler, gamepadIndex));
}
@@ -262,6 +264,7 @@ namespace MLEM.Input {
/// The input handler to query the keys with
/// The index of the gamepad to query, or -1 to query all gamepads
/// The resulting up time, or if the input has never been pressed, or is currently pressed.
+ [Obsolete("This method is deprecated, as it does not query Modifiers or InverseModifiers. Use InputHandler.GetTimeSincePress or custom handling instead.")]
public TimeSpan GetTimeSincePress(InputHandler handler, int gamepadIndex = -1) {
return this.combinations.Min(c => c.GetTimeSincePress(handler, gamepadIndex));
}
@@ -494,6 +497,7 @@ namespace MLEM.Input {
/// The input handler to query the keys with
/// The index of the gamepad to query, or -1 to query all gamepads
/// The resulting down time, or if the input is not being held.
+ [Obsolete("This method is deprecated, as it does not query Modifiers or InverseModifiers. Use InputHandler.GetDownTime or custom handling instead.")]
public TimeSpan GetDownTime(InputHandler handler, int gamepadIndex = -1) {
return handler.GetDownTime(this.Key, gamepadIndex);
}
@@ -505,6 +509,7 @@ namespace MLEM.Input {
/// The input handler to query the keys with
/// The index of the gamepad to query, or -1 to query all gamepads
/// The resulting up time, or if the input is being held.
+ [Obsolete("This method is deprecated, as it does not query Modifiers or InverseModifiers. Use InputHandler.GetUpTime or custom handling instead.")]
public TimeSpan GetUpTime(InputHandler handler, int gamepadIndex = -1) {
return handler.GetUpTime(this.Key, gamepadIndex);
}
@@ -516,6 +521,7 @@ namespace MLEM.Input {
/// The input handler to query the keys with
/// The index of the gamepad to query, or -1 to query all gamepads
/// The resulting up time, or if the input has never been pressed, or is currently pressed.
+ [Obsolete("This method is deprecated, as it does not query Modifiers or InverseModifiers. Use InputHandler.GetTimeSincePress or custom handling instead.")]
public TimeSpan GetTimeSincePress(InputHandler handler, int gamepadIndex = -1) {
return handler.GetTimeSincePress(this.Key, gamepadIndex);
}