Button components - PluginsCDTribe/VexView GitHub Wiki
Button
Plugins now support button components. You can add one or more button components to a GUI interface. First of all, the buttons also need textures. However, there is a small requirement for the button textures. You need to prepare two button textures(the same size)
The style of a button can be this:
texture A: texture B:
Button configuration
Regarding the other settings of the button, most of the parameters are the same as the previous custom picture. A sample button file is:
#ID of the button, the ID of each button must be different, otherwise it will appear
#Unpredictable consequences
id: 0
#Text displayed on the button
name: 'confirm'
#URL
url: '[local]button.png'
#URL2
url: '[local]button_.png'
#Button to display the x-axis coordinates
#Use the upper right corner of the GUI interface as the origin
x: 76
#Button to display the y-axis coordinates
#Use the upper right corner of the GUI interface as the origin
y: 140
#Button image width and button width
width: 68
#Button image height and button height
high: 16
#The command executed after pressing the button can be multiple, you can use %player% variable instead of player name
commands:
- 'help'
#Whether to close the GUI after pressing the button
close: true
#You can use it to open another GUI interface
#Set to "-" to disable this function
To: '-'
Test
The x and y coordinates of the button are the same as the contents of the custom picture. The origin is the upper left corner of the GUI interface.
The texture width and height of the button will automatically scale your button texture.