Custom options
Learn how to create custom options with OneConfig.
Creating an option
public class MyOption extends BasicOption {
public MyOption(Field field, Object parent, String name, String category, String subcategory, int size) {
super(field, parent, name, category, subcategory, size);
}
@Override
public void draw(long vg, int x, int y) {
// draw everything here
}
@Override
public int getHeight() {
return 32; // return the height of the option so other options can be placed accordingly
}
}Basic usage
Advanced usage
Last updated
Was this helpful?