-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.java
More file actions
33 lines (26 loc) · 1.03 KB
/
Example.java
File metadata and controls
33 lines (26 loc) · 1.03 KB
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 de.maxiindiestyle.api.ui.xml;
import com.badlogic.gdx.utils.XmlReader;
import de.maxiindiestyle.api.xml.preprocessor.XmlVarargsPreprocessor;
import java.util.ArrayList;
public class Example {
// Loads everything, when no other more specific method is available
@UiXmlLoader.XmlOnLoadMethod(name = "*")
public static void onLoad(UiXmlLoader loader, XmlReader.Element element) {
// Do something
}
// Only loads the element with name 'chart'
@UiXmlLoader.XmlOnLoadMethod(name = "chart")
public static void onLoadChart(UiXmlLoader loader, XmlReader.Element element) {
// Do something
}
// Loads all elements that begin with 'Test'
@UiXmlLoader.XmlOnLoadMethod(name = "*Test")
public static void onLoadBeginsWithTest(UiXmlLoader loader, XmlReader.Element element) {
// Do something
}
@XmlVarargsPreprocessor.Varargs
public static ArrayList<String> values() {
// Put your values in
return new ArrayList<>();
}
}