diff --git a/NeosModLoader/Utility/LocalButtonPressActionExtensions.cs b/NeosModLoader/Utility/LocalButtonPressActionExtensions.cs new file mode 100644 index 0000000..c47423d --- /dev/null +++ b/NeosModLoader/Utility/LocalButtonPressActionExtensions.cs @@ -0,0 +1,166 @@ +using FrooxEngine.UIX; +using FrooxEngine; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using BaseX; + +namespace NeosModLoader.Utility +{ + /// + /// Contains extension methods to setup locally defined actions for s which are triggerable by anyone.
+ /// Due to their nature, they will only work while the that creates them hasn't left the session. + ///
+ public static class LocalButtonPressActionExtensions + { + /// + /// Creates a using the given and .
+ /// The will be triggerable by anyone, as long as the creating hasn't left the session. + ///
+ /// The builder to use for creating the button. + /// The text displayed on the button. + /// The action to run when pressed. + /// The button created by the . + public static Button LocalActionButton(this UIBuilder builder, in LocaleString text, Action