Class LocalActionButtonExtensions
- Namespace
- MonkeyLoader.Resonite.UI
- Assembly
- MonkeyLoader.Resonite.Integration.dll
Contains extension methods to setup locally defined actions for FrooxEngine.IButtons which are triggerable by anyone.
Due to their nature, they will only work while the FrooxEngine.User that creates them hasn't left the session.
As such, they will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static class LocalActionButtonExtensions
- Inheritance
-
LocalActionButtonExtensions
- Inherited Members
Methods
LocalActionButton(UIBuilder, in LocaleString, Action<Button>)
Creates a FrooxEngine.UIX.Button using the given text
and action
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static Button LocalActionButton(this UIBuilder builder, in LocaleString text, Action<Button> action)
Parameters
builder
UIBuilderThe builder to use for creating the button.
text
LocaleStringThe text displayed on the button.
action
Action<Button>The action to run when pressed.
Returns
- Button
The button created by the FrooxEngine.UIX.UIBuilder.
LocalActionButton(UIBuilder, Uri, LocaleString, in colorX, in colorX, Action<Button>)
Creates a FrooxEngine.UIX.Button using the given text
,
icon
, tints and action
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static Button LocalActionButton(this UIBuilder builder, Uri icon, LocaleString text, in colorX tint, in colorX spriteTint, Action<Button> action)
Parameters
builder
UIBuilderThe builder to use for creating the button.
icon
UriThe icon displayed on the button.
text
LocaleStringThe text displayed on the button.
tint
colorXThe background color of the button.
spriteTint
colorXThe tint of the icon.
action
Action<Button>The action to run when pressed.
Returns
- Button
The button created by the FrooxEngine.UIX.UIBuilder.
LocalActionButton(UIBuilder, Uri, LocaleString, Action<Button>)
Creates a FrooxEngine.UIX.Button using the given text
,
icon
and action
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static Button LocalActionButton(this UIBuilder builder, Uri icon, LocaleString text, Action<Button> action)
Parameters
builder
UIBuilderThe builder to use for creating the button.
icon
UriThe icon displayed on the button.
text
LocaleStringThe text displayed on the button.
action
Action<Button>The action to run when pressed.
Returns
- Button
The button created by the FrooxEngine.UIX.UIBuilder.
LocalActionButton(UIBuilder, Uri, Action<Button>)
Creates a FrooxEngine.UIX.Button using the given icon
and action
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static Button LocalActionButton(this UIBuilder builder, Uri icon, Action<Button> action)
Parameters
builder
UIBuilderThe builder to use for creating the button.
icon
UriThe icon displayed on the button.
action
Action<Button>The action to run when pressed.
Returns
- Button
The button created by the FrooxEngine.UIX.UIBuilder.
LocalActionButton<T>(UIBuilder, in LocaleString, Action<Button, T>, T)
Creates a FrooxEngine.UIX.Button using the given text
and action
with an extra argument
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static Button LocalActionButton<T>(this UIBuilder builder, in LocaleString text, Action<Button, T> action, T argument)
Parameters
builder
UIBuilderThe builder to use for creating the button.
text
LocaleStringThe text displayed on the button.
action
Action<Button, T>The action to run when pressed.
argument
TThe extra argument to pass to the action when this button is pressed.
Returns
- Button
The button created by the FrooxEngine.UIX.UIBuilder.
Type Parameters
T
The type of the extra argument to pass to the action.
LocalActionButton<T>(UIBuilder, Uri, LocaleString, in colorX, in colorX, Action<Button, T>, T)
Creates a FrooxEngine.UIX.Button using the given text
,
icon
, tints and action
with an extra argument
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static Button LocalActionButton<T>(this UIBuilder builder, Uri icon, LocaleString text, in colorX tint, in colorX spriteTint, Action<Button, T> action, T argument)
Parameters
builder
UIBuilderThe builder to use for creating the button.
icon
UriThe icon displayed on the button.
text
LocaleStringThe text displayed on the button.
tint
colorXThe background color of the button.
spriteTint
colorXThe tint of the icon.
action
Action<Button, T>The action to run when pressed.
argument
TThe extra argument to pass to the action when this button is pressed.
Returns
- Button
The button created by the FrooxEngine.UIX.UIBuilder.
Type Parameters
T
The type of the extra argument to pass to the action.
LocalActionButton<T>(UIBuilder, Uri, LocaleString, Action<Button, T>, T)
Creates a FrooxEngine.UIX.Button using the given text
,
icon
and action
with an extra argument
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static Button LocalActionButton<T>(this UIBuilder builder, Uri icon, LocaleString text, Action<Button, T> action, T argument)
Parameters
builder
UIBuilderThe builder to use for creating the button.
icon
UriThe icon displayed on the button.
text
LocaleStringThe text displayed on the button.
action
Action<Button, T>The action to run when pressed.
argument
TThe extra argument to pass to the action when this button is pressed.
Returns
- Button
The button created by the FrooxEngine.UIX.UIBuilder.
Type Parameters
T
The type of the extra argument to pass to the action.
LocalActionButton<T>(UIBuilder, Uri, Action<Button, T>, T)
Creates a FrooxEngine.UIX.Button using the given icon
and action
with an extra argument
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static Button LocalActionButton<T>(this UIBuilder builder, Uri icon, Action<Button, T> action, T argument)
Parameters
builder
UIBuilderThe builder to use for creating the button.
icon
UriThe icon displayed on the button.
action
Action<Button, T>The action to run when pressed.
argument
TThe extra argument to pass to the action when this button is pressed.
Returns
- Button
The button created by the FrooxEngine.UIX.UIBuilder.
Type Parameters
T
The type of the extra argument to pass to the action.
SetupLocalAction<TButton>(TButton, Action<TButton>)
Sets up an FrooxEngine.IButton with the given action
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static TButton SetupLocalAction<TButton>(this TButton button, Action<TButton> action) where TButton : IButton
Parameters
button
TButtonThe button to set up with an action.
action
Action<TButton>The action to run when pressed.
Returns
- TButton
The unchanged button.
Type Parameters
TButton
The specific type of the button.
SetupLocalAction<TButton, TArgument>(TButton, TArgument, Action<TButton, TArgument>)
Sets up an FrooxEngine.IButton with the given action
and extra argument
.
The action
will be triggerable by anyone, as long as the creating FrooxEngine.User hasn't left the session.
As such, it will be destroyed when the local user leaves, and won't be saved either (marking it non-persistant).
public static TButton SetupLocalAction<TButton, TArgument>(this TButton button, TArgument argument, Action<TButton, TArgument> action) where TButton : IButton
Parameters
button
TButtonThe button to set up with an action.
argument
TArgumentThe extra argument to pass to the action when this button is pressed.
action
Action<TButton, TArgument>The action to run when pressed.
Returns
- TButton
The unchanged button.
Type Parameters
TButton
The specific type of the button.
TArgument
The type of the extra argument to pass to the action.