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

bs.interaction, bs.component: Modules to create GUI in Minecraft #193

Open
5 of 8 tasks
theogiraudet opened this issue May 11, 2024 · 1 comment · May be fixed by #234
Open
5 of 8 tasks

bs.interaction, bs.component: Modules to create GUI in Minecraft #193

theogiraudet opened this issue May 11, 2024 · 1 comment · May be fixed by #234
Assignees
Labels
✨ Module New modules
Milestone

Comments

@theogiraudet
Copy link
Contributor

theogiraudet commented May 11, 2024

Two modules:

  • One to create menus based on interaction entity
  • One to create menus based on the hotbar of a player

The part based on interactions proposes two APIs:

  • Listener API - to associate events to interactions
    • On hover event
    • On enter event
    • On leave event
    • Left click event
    • Right click event
  • Component API - abstraction of the Listener API to manipulate GUI components (button…) instead of interaction entity
    • Button
    • Toggle button
    • Group of toggle buttons (only one can be selected)
@theogiraudet theogiraudet self-assigned this May 11, 2024
@theogiraudet theogiraudet added the ✨ Module New modules label May 11, 2024
@theogiraudet theogiraudet added this to the 2.1.0 milestone May 11, 2024
@theogiraudet theogiraudet linked a pull request Jul 15, 2024 that will close this issue
6 tasks
@theogiraudet theogiraudet linked a pull request Jul 15, 2024 that will close this issue
6 tasks
@aksiome
Copy link
Member

aksiome commented Sep 7, 2024

Summary of the discussion with @theogiraudet:

Each event registration function now accepts an executor, which can be any valid selector, removing the need for the concept of icon and linking behaviors.

By default, the selector will not be lazy:

  • selector: "@e" is equivalent to selector: {name: "@e", lazy: false}.

A lazy selector means it won't be converted to a UUID when executing the function, allowing for more dynamic behavior during execution.

@theogiraudet theogiraudet changed the title bs.gui: A module to create GUI in Minecraft bs.interaction: A module to create GUI in Minecraft Sep 14, 2024
@theogiraudet theogiraudet changed the title bs.interaction: A module to create GUI in Minecraft bs.interaction, bs.component: Modules to create GUI in Minecraft Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Module New modules
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

2 participants