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

Make GUI labels optional #54

Merged
merged 3 commits into from
Oct 30, 2024
Merged

Make GUI labels optional #54

merged 3 commits into from
Oct 30, 2024

Conversation

matyalatte
Copy link
Owner

I made GUI labels optional because they were used only when the "gui" array had multiple definitions. You don't need to define "label" for each command now.

{
    "gui": {
        "command": "echo Hello!",
        "components": []
    }
}

Also, you can now use "window_name" as the default value of "label".

{
    "gui": [
        {
            // The value of "label" also become "Sample GUI 1"
            "window_name": "Sample GUI 1",
            "command": "echo hello",
            "components": []
        },
        {
            "window_name": "Sample GUI 2",
            // Of course, you can define a custom value for "label"
            "label": "Menu Item 2",
            "command": "echo text_box: %-%",
            "components": [
                {
                    "type": "text",
                    "label": "Some text"
                }
            ]
        }
    ]
}

@matyalatte matyalatte changed the base branch from main to dev October 26, 2024 03:26
@matyalatte matyalatte merged commit 4dce86c into dev Oct 30, 2024
9 checks passed
@matyalatte matyalatte deleted the gui_label_optional branch November 1, 2024 16:26
@matyalatte matyalatte mentioned this pull request Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant