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

more button click type support #2531

Open
2 tasks done
Noogear opened this issue Oct 7, 2024 · 14 comments
Open
2 tasks done

more button click type support #2531

Noogear opened this issue Oct 7, 2024 · 14 comments
Assignees
Labels
Status: Under investigation Investigating the interest and the feasability of the issue. Type: Enhancement Improvement or modification which is usually a new feature.

Comments

@Noogear
Copy link
Contributor

Noogear commented Oct 7, 2024

Is your feature request related to a problem?

I am using Oraxen to design a more beautiful GUI interface, but I realized that the type of the button is fixed. There is no way to execute commands or close the GUI. I really need a button that can execute commands so that I can jump to the main menu.

Describe the solution you'd like.

A button that can execute commands

Describe alternatives you've considered.

none

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
  • I have ensured the feature I'm requesting isn't already in the latest supported BentoBox build or Addons.

Other

No response

@tastybento
Copy link
Member

I'm sorry, you'll have to give me more background and context because I don't understand. How does this related to BentoBox? Isn't this an Oraxen question? Also, what "button" do you mean? Where is the button and what does it do now?

@tastybento tastybento added the Status: Need answer Waiting for more information to be provided by the issue's author. label Oct 7, 2024
@Noogear
Copy link
Contributor Author

Noogear commented Oct 7, 2024

I'm sorry, you'll have to give me more background and context because I don't understand. How does this related to BentoBox? Isn't this an Oraxen question? Also, what "button" do you mean? Where is the button and what does it do now?

I'm very sorry. What I mean is that I need to add a button on the GUI interface of the addons to execute instructions and close the GUI in order to achieve a more highly customizable menu.

@Noogear
Copy link
Contributor Author

Noogear commented Oct 7, 2024

Screenshot_2024-10-08-07-09-15-414_mark via

Regarding this, I found that there are only these types of button. I hope to add a button for executing instructions or closing the GUI.

@tastybento
Copy link
Member

tastybento commented Oct 8, 2024

This is pretty advanced API and used when programming a new addon in Java. I'm not sure this is correct.

Just stepping back, can you explain more what you are doing with Oraxen to make a GUI?

What commands would you be running? In the latest BentoBox 2.6.0, there is the ability to add commands to text shown to users (see the release notes). Maybe this can be used?

@Noogear
Copy link
Contributor Author

Noogear commented Oct 8, 2024

This is pretty advanced API and used when programming a new addon in Java. I'm not sure this is correct.

Just stepping back, can you explain more what you are doing with Oraxen to make a GUI?

What commands would you be running? In the latest BentoBox 2.6.0, there is the ability to add commands to text shown to users (see the release notes). Maybe this can be used?

It has little to do with Oraxen. In fact, it's just a pattern. For example, I used a menu plugin to create a main interface. There is a button in it. Clicking on it can execute the command "/is challenge" to open the challenge interface. But at this time, I can only choose to close it by pressing Esc. There is no button that can be clicked to execute the command to return to the main interface.

@tastybento
Copy link
Member

Aha. Okay. Hmm. Let me think about this. Not sure if it could be done. What command would you run if you did have this? You can now add commands to text but it's chat text not GUI text. Hmmm.

@Noogear
Copy link
Contributor Author

Noogear commented Oct 8, 2024

Aha. Okay. Hmm. Let me think about this. Not sure if it could be done. What command would you run if you did have this? You can now add commands to text but it's chat text not GUI text. Hmmm.

The meaning of "text" is not significant. I bound the command to open the menu to the clock. Players can right-click the clock to open the menu, and then perform various operations, including managing their islands. I searched on Google for "bentobox's custom gui by ia or oraxen", and I found that no one has done it, while many people have drawn graphical interfaces for similar plugins. I tried to make it and found that it just lacks an extra button that can execute commands for achieving interactivity with other menu plugins. For example, use a command to switch to another GUI interface.
Isn't this a disadvantage of Bentobox? I think it is very necessary.

@Noogear
Copy link
Contributor Author

Noogear commented Oct 8, 2024

Aha. Okay. Hmm. Let me think about this. Not sure if it could be done. What command would you run if you did have this? You can now add commands to text but it's chat text not GUI text. Hmmm.

https://builtbybit.com/resources/deluxe-skyblock-premium-server-setup.40342/?ref=discover
The expression I made might not be clear. You can have a look at these.
Nowadays, many servers use menus to cover almost all the commands. This is a trend. And the interactivity of the menus is the most valued aspect by current servers, including switching menus, returning to the previous level, and closing the menus.

@Noogear
Copy link
Contributor Author

Noogear commented Oct 8, 2024

Then I also realized that the menu does not implement the caching function for the head skins, resulting in the need to load the heads every time the menu is opened. I'm not sure if this is difficult to implement, but referring to other plugins, caching should be done when the menu is opened for the first time, and then when the player opens the menu subsequently, it should detect whether the cache needs to be updated instead of reloading the heads all over again. Could this be my obsessive-compulsive disorder? But currently, in an era of scarce gameplay, the involution of UI is very common.

@tastybento
Copy link
Member

I just woke up and read everything you wrote. I'm still trying to work out what it is that you are trying to do. Where does this GUI exist? In-game? Who is it for? Admins? What features and functions are you trying to make it do? You mention sophisticated elements like head caching (which we do) but I don't actually know what it is you are trying to make.

BentoBox has a number of GUIs for various functions. One way to approach this is to understand what you are trying to do and then I can suggest a way to solve it or implement it. Right now, I feel like we are discussing the solution without knowing what the problem is.

Thanks.

@Noogear
Copy link
Contributor Author

Noogear commented Oct 8, 2024

I just woke up and read everything you wrote. I'm still trying to work out what it is that you are trying to do. Where does this GUI exist? In-game? Who is it for? Admins? What features and functions are you trying to make it do? You mention sophisticated elements like head caching (which we do) but I don't actually know what it is you are trying to make.

BentoBox has a number of GUIs for various functions. One way to approach this is to understand what you are trying to do and then I can suggest a way to solve it or implement it. Right now, I feel like we are discussing the solution without knowing what the problem is.

Thanks.

QQ_1728398222987
This is the island settings.
It's very simple. For example, a button can be added at the place indicated by the arrow in the screenshot to execute instructions. That's all. This instruction can be executed by the player or the console. I need a button to switch the menu.

@Noogear
Copy link
Contributor Author

Noogear commented Oct 8, 2024

Regarding the head cache, it has nothing to do with this issue. I might consider opening a new question. There are often inexplicable problems with the head cache. Let's wait until I encounter them.

@Noogear
Copy link
Contributor Author

Noogear commented Oct 11, 2024

1:
  icon: tipped_arrow
  title: "Back"
  description: "Left click to back."
  data:
    type: COMMAND
  action:
    left:
      type: COMMAND
      command: 
        # Close the menu.
        - close
        # Delay for 1 tick before performing the next action.
        - delay: 1
        # Execute the command as a player. Here are the instructions of other menu plugins executed.
        - player: menu open main
        # Execute the command as the console.
        - "console: tell %player% \'you back to the main menu.\'"

@tastybento tastybento added Type: Enhancement Improvement or modification which is usually a new feature. and removed Status: Need answer Waiting for more information to be provided by the issue's author. labels Oct 14, 2024
@tastybento tastybento self-assigned this Oct 14, 2024
@tastybento tastybento added the Status: Under investigation Investigating the interest and the feasability of the issue. label Oct 14, 2024
tastybento added a commit that referenced this issue Oct 20, 2024
Also enhances the customizable panel API by making templates load
dynamically when requested.
@tastybento
Copy link
Member

Right now, Settings doesn't use the custom panel UI so that will have to be converted. This is a pretty big job, but planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Under investigation Investigating the interest and the feasability of the issue. Type: Enhancement Improvement or modification which is usually a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants