generated from ELDependenci/Template-For-ELDependenci-Addon
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathELDGLoadingView.java
33 lines (29 loc) · 1.19 KB
/
ELDGLoadingView.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.ericlam.mc.eldgui.demo;
import com.ericlam.mc.eldgui.component.factory.AnimatedButtonFactory;
import com.ericlam.mc.eldgui.view.LoadingView;
import com.ericlam.mc.eldgui.view.UIContext;
import com.ericlam.mc.eldgui.view.ViewDescriptor;
import org.bukkit.Material;
@ViewDescriptor(
name = "Loading...",
rows = 1,
patterns = {"ZZZZZZZZZ"},
cancelMove = {'Z'}
)
public final class ELDGLoadingView implements LoadingView {
@Override
public void renderView(Void model, UIContext context) {
AnimatedButtonFactory animatedButton = context.factory(AnimatedButtonFactory.class);
context.pattern('Z')
.fill(
animatedButton.interval(1)
.icons(
Material.GREEN_STAINED_GLASS_PANE,
Material.RED_STAINED_GLASS_PANE,
Material.BLUE_STAINED_GLASS_PANE,
Material.BLACK_STAINED_GLASS_PANE,
Material.WHITE_STAINED_GLASS_PANE
).create()
);
}
}