1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 06:13:03 +08:00

Add detailed explaination for the reason of using old binding method

This commit is contained in:
Salman Ahmed 2021-07-07 09:26:17 +03:00
parent bb58a9412b
commit 28adb43a4a

View File

@ -23,6 +23,12 @@ namespace osu.Game.Overlays
// this is done to ensure a click on this button doesn't trigger focus on a parent element which contains the button.
public override bool AcceptsFocus => true;
// this is intentionally not using BindableWithCurrent as this needs a BindableNumber instance for an accurate IsDefault value.
//
// this also cannot use IBindableWithCurrent.Create() due to BindableNumberWithCurrent
// directly casting given bindables to BindableNumber, which is not necessarily the case.
//
// therefore rely on the old method of taking each current bindable instance for now, until things are settled framework-side.
private Bindable<T> current;
public Bindable<T> Current