A game framework written with osu! in mind.
at master 28 lines 804 B view raw
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. 2// See the LICENCE file in the repository root for full licence text. 3 4namespace osu.Framework.Bindables 5{ 6 /// <summary> 7 /// An event fired when a value changes, providing the old and new value for reference. 8 /// </summary> 9 /// <typeparam name="T">The type of bindable.</typeparam> 10 public class ValueChangedEvent<T> 11 { 12 /// <summary> 13 /// The old value. 14 /// </summary> 15 public readonly T OldValue; 16 17 /// <summary> 18 /// The new (and current) value. 19 /// </summary> 20 public readonly T NewValue; 21 22 public ValueChangedEvent(T oldValue, T newValue) 23 { 24 OldValue = oldValue; 25 NewValue = newValue; 26 } 27 } 28}