Skip to content

Custom GUI

LK520 edited this page Apr 28, 2018 · 12 revisions

Custom GUI

Let's start making our own GUI

First of all, you need to prepare a texture image. The format of an ordinary GUI texture is an arbitrary size .png image file. Like this one:

texture

After painting the texture, you need to upload it to any Bed and record your picture URL. If the network environment is not good, you can use the local picture.

Create a new GUI file

First,open the plugins\VexView\gui folder, create a new yourguiname.yml

A standard GUI file should be like this:

#URL of image

gui: '[local]gui.png'

#GUI X location(Set to -1 to center)

x: -1

#GUI Y location(Set to -1 to center)

y: -1

#The actual width of the picture

width: 240

#The actual height of the picture

high: 158

#Picture display width

xshow: 240

#Picture display height

yshow: 158

#Picture contained in the GUI

image:

- example

#Text contained in the GUI

text: 'text'

#Buttons contained in the GUI

buttons:

- 'test'

Test

Now we set our GUI in announcement.yml

gui: 'youguiname'(Don't add .yml suffix)

Let's join the game!