Adding a new menu type. (#8449)
* Added a new type of menu. * Renamed the methods and fixed buttons not selecting. * Fixed followUpMenu and menu having different dialogs. * Applying review changes. - Refactored the menu dialog instantiation. - Fixed the single-line else statement.
This commit is contained in:
@@ -36,6 +36,19 @@ public class Menus{
|
||||
ui.showMenu(title, message, options, (option) -> Call.menuChoose(player, menuId, option));
|
||||
}
|
||||
|
||||
@Remote(variants = Variant.both)
|
||||
public static void followUpMenu(int menuId, String title, String message, String[][] options){
|
||||
if(title == null) title = "";
|
||||
if(options == null) options = new String[0][0];
|
||||
|
||||
ui.showFollowUpMenu(menuId, title, message, options, (option) -> Call.menuChoose(player, menuId, option));
|
||||
}
|
||||
|
||||
@Remote(variants = Variant.both)
|
||||
public static void hideFollowUpMenu(int menuId) {
|
||||
ui.hideFollowUpMenu(menuId);
|
||||
}
|
||||
|
||||
@Remote(targets = Loc.both, called = Loc.both)
|
||||
public static void menuChoose(@Nullable Player player, int menuId, int option){
|
||||
if(player != null){
|
||||
|
||||
Reference in New Issue
Block a user