forked from MoonsideGames/MoonWorks
				
			add IsIdle and IsUp to VirtualButton
							parent
							
								
									de9d13757a
								
							
						
					
					
						commit
						d5ddd44bd3
					
				|  | @ -5,9 +5,9 @@ namespace MoonWorks.Input | ||||||
| 		public ButtonState State { get; protected set; } | 		public ButtonState State { get; protected set; } | ||||||
| 
 | 
 | ||||||
| 		/// <summary> | 		/// <summary> | ||||||
| 		/// True if the button is pressed or held. | 		/// True if the button was pressed this exact frame. | ||||||
| 		/// </summary> | 		/// </summary> | ||||||
| 		public bool IsDown => State.IsDown; | 		public bool IsPressed => State.IsPressed; | ||||||
| 
 | 
 | ||||||
| 		/// <summary> | 		/// <summary> | ||||||
| 		/// True if the button has been continuously held for more than one frame. | 		/// True if the button has been continuously held for more than one frame. | ||||||
|  | @ -15,15 +15,25 @@ namespace MoonWorks.Input | ||||||
| 		public bool IsHeld => State.IsHeld; | 		public bool IsHeld => State.IsHeld; | ||||||
| 
 | 
 | ||||||
| 		/// <summary> | 		/// <summary> | ||||||
| 		/// True if the button was pressed this exact frame. | 		/// True if the button is pressed or held. | ||||||
| 		/// </summary> | 		/// </summary> | ||||||
| 		public bool IsPressed => State.IsPressed; | 		public bool IsDown => State.IsDown; | ||||||
| 
 | 
 | ||||||
| 		/// <summary> | 		/// <summary> | ||||||
| 		/// True if the button is not pressed. | 		/// True if the button was released this frame. | ||||||
| 		/// </summary> | 		/// </summary> | ||||||
| 		public bool IsReleased => State.IsReleased; | 		public bool IsReleased => State.IsReleased; | ||||||
| 
 | 
 | ||||||
|  | 		/// <summary> | ||||||
|  | 		/// True if the button was not pressed the previous or current frame. | ||||||
|  | 		/// </summary> | ||||||
|  | 		public bool IsIdle => State.IsIdle; | ||||||
|  | 
 | ||||||
|  | 		/// <summary> | ||||||
|  | 		/// True if the button is idle or released. | ||||||
|  | 		/// </summary> | ||||||
|  | 		public bool IsUp => State.IsUp; | ||||||
|  | 
 | ||||||
| 		internal virtual void Update() | 		internal virtual void Update() | ||||||
| 		{ | 		{ | ||||||
| 			State = State.Update(CheckPressed()); | 			State = State.Update(CheckPressed()); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue