use of com.kotcrab.vis.ui.widget.Menu in project Eidolons by IDemiurge.
the class MenuPanel method initControlMenus.
public void initControlMenus(LE_ControlPanel[] panels) {
Menu.MenuStyle style = (StyleHolder.getMenuStyle());
TextButton.TextButtonStyle btnStyle = (StyleHolder.getMenuBtnStyle());
for (LE_ControlPanel panel : panels) {
Menu menu = new Menu(TabbedControlPanel.getTitleFromClass(panel.getClazz()), style);
addMenu(menu);
for (Method method : panel.getClazz().getMethods()) {
MenuItem item = new MenuItem(StringMaster.format(method.getName()));
item.addListener(createItemListener(item, method, panel.getHandler()));
menu.addItem(item);
item.setStyle(btnStyle);
}
}
}
Aggregations