public ReactMenuBuilder WithOption(string Description, IEmote ButtonEmote, ReactMenu.ButtonCallback OnPressed = null, ReactMenu.ButtonCallback OnReleased = null) { ReactMenu.OptionInfo Option = new ReactMenu.OptionInfo { Description = Description, Button = ButtonEmote }; if (OnPressed != null) { Option.PressedCallback += OnPressed; } else if (DefaultPressedCallback != null) { Option.PressedCallback += DefaultPressedCallback; } if (OnReleased != null) { Option.ReleasedCallback += OnReleased; } else if (DefaultReleasedCallback != null) { Option.ReleasedCallback += DefaultReleasedCallback; } Menu.Options.Add(Option); return(this); }
public ReactMenuBuilder WithDefaultReleasedCallback(ReactMenu.ButtonCallback OnReleased) { DefaultReleasedCallback = OnReleased; return(this); }