Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[InfoBox] for Collections #71

Closed
Podden opened this issue Aug 8, 2024 · 3 comments
Closed

[InfoBox] for Collections #71

Podden opened this issue Aug 8, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Podden
Copy link

Podden commented Aug 8, 2024

Is there a way to display ONE Infobox per Array, not ONE Infobox per Array element?

    [InfoBox("This is a box")]
    public RuntimePlatform[] platforms;

grafik

@TylerTemp
Copy link
Owner

Directly using on list/array will apply to every direct element of the list, this is a limit from Unity.

At this version, not yet. We need to add a new InfoBox of Playa version, like PlayaRichLabel vs RichLabel for array/list

@TylerTemp TylerTemp self-assigned this Aug 9, 2024
@TylerTemp TylerTemp added the enhancement New feature or request label Aug 9, 2024
@TylerTemp TylerTemp changed the title [InfoBox] on Collections are on Collection items, not Collection itself [InfoBox] for Collections Aug 19, 2024
TylerTemp added a commit that referenced this issue Aug 23, 2024
TylerTemp added a commit that referenced this issue Aug 31, 2024
TylerTemp added a commit that referenced this issue Aug 31, 2024
TylerTemp added a commit that referenced this issue Aug 31, 2024
@TylerTemp
Copy link
Owner

TylerTemp commented Aug 31, 2024

Hi, this feature has been implemented in 3.3.0. As it's a breaking changes, please read the changelog before upgrading.

using SaintsField.Playa;

[PlayaInfoBox("Please Note: special label like <icon=star.png/> only works for <color=lime>UI Toolkit</color> <color=red>(not IMGUI)</color> in InfoBox.")]
[PlayaBelowInfoBox("$" + nameof(DynamicFromArray))]  // callback
public string[] strings = {};

private string DynamicFromArray(string[] value) => value.Length > 0? string.Join("\n", value): "null";

public string dynamic;

[PlayaInfoBox("MethodWithButton")]
[Button("Click Me!")]
[PlayaBelowInfoBox("GroupExample", groupBy: "group")]
[PlayaBelowInfoBox("$" + nameof(dynamic), groupBy: "group")]
public void MethodWithButton()
{
}

[PlayaInfoBox("Method")]
[PlayaBelowInfoBox("$" + nameof(dynamic))]
public void Method()
{
}

image

@TylerTemp
Copy link
Owner

This issue is now closed as it's been implemented.

Please comment below if you still have this issue so I can open it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants