ResponsiveButtonGroupAttribute

Groups buttons into a responsive button group.

namespace Sirenix.OdinInspector
{
[IncludeMyAttributesAttribute]
[ShowInInspectorAttribute]
[AttributeUsageAttribute((AttributeTargets)64, AllowMultiple = True, Inherited = True)]
public class ResponsiveButtonGroupAttribute : PropertyGroupAttribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 2.0.0.0

Fields

Return Type Definition Description
ButtonSizes DefaultButtonSize The default size of the button.
bool UniformLayout If true then the widths of a line of buttons will be the same.

Constructors

Definition Description
ResponsiveButtonGroupAttribute(string) Draws a button that will be placed in a group that will respond to the horizontal space available to the group.

Methods

Return Type Definition Description
void CombineValuesWith(PropertyGroupAttribute) Merges the values of this group with another ResponsiveButtonGroupAttribute.

Example

[ResponsiveButtonGroup]
public void Foo() { }

[ResponsiveButtonGroup]
public void Bar() { }

[ResponsiveButtonGroup]
public void Baz() { }

Example

[ResponsiveButtonGroup(UniformLayout = true)]
public void Foo() { }

[ResponsiveButtonGroup]
public void Bar() { }

[ResponsiveButtonGroup]
public void Baz() { }

Example

[ResponsiveButtonGroupAttribute(UniformLayout = true, DefaultButtonSize = ButtonSizes.Large)]
public void Foo() { }

[GUIColor(0, 1, 0))]
[Button(ButtonSizes.Large)]
[ResponsiveButtonGroup]
public void Bar() { }

[ResponsiveButtonGroup]
public void Baz() { }

Example

[TabGroup("SomeTabGroup", "SomeTab")]
[ResponsiveButtonGroup("SomeTabGroup/SomeTab/SomeBtnGroup")]
public void Foo() { }

[ResponsiveButtonGroup("SomeTabGroup/SomeTab/SomeBtnGroup")]
public void Bar() { }

[ResponsiveButtonGroup("SomeTabGroup/SomeTab/SomeBtnGroup")]
public void Baz() { }