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

Hotbars #37

Open
Matt-MX opened this issue Jul 2, 2024 · 1 comment
Open

Hotbars #37

Matt-MX opened this issue Jul 2, 2024 · 1 comment

Comments

@Matt-MX
Copy link
Owner

Matt-MX commented Jul 2, 2024

Add a better api support for hotbar and player-inventory based GUIs.

Hotbars allow players to quickly scroll to access buttons.

This addition should introduce button callbacks such as the user scrolling over the button.

e.g:

class TestHotbar : Hotbar() {
    init {
        button(Material.GRAY_BED) {
            named(!"<dull>Something".branding())
            click.any {
                player.sendMessage(!"<green>clicked".branding())
            }
        } slot middle() holdingSendActionBar !"<title>Some text pops up when you hover!".branding()
    }
}

image

@Matt-MX
Copy link
Owner Author

Matt-MX commented Jul 3, 2024

Experimental API example from another plugin I'm working on
scrollbar

Matt-MX added a commit that referenced this issue Jul 4, 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

No branches or pull requests

1 participant