Icon Menu

Discussion in 'Resources' started by nisovin, Oct 30, 2012.

Thread Status:
Not open for further replies.
  1. Haven't used this yet so this is just a guess, but you probably aren't cancelling the inventoryopenevent. So the regular inventory still opens.
     
  2. Offline

    H2NCH2COOH

    You can't just open an inventory when an inventory has just closed, you'll have to wait.

    Try use ItemMenu, it solves such problems, grants a proper result for every menus and its API is easy to use~

    *Shameless self-promotion*
     
  3. Offline

    dressedcow

    I'am trying to get the command test to work. I think I need to register it in onEnable.
    In the CommandTest.class "this" does not work it worked in the main class not sure why it does not work in CommandTest.class if some one could please explain that would be nice I am new to coding so I am sure I have made many mistakes...



    MAIN

    Code:
    package menu;
     
    import org.bukkit.Material;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.plugin.java.JavaPlugin;
     
     
    public class Main extends JavaPlugin{
     
     
     
     
        @Override
        public void onEnable() {
           
              getCommand("test").setExecutor(new CommandTest());
        }
     
        public boolean onCommand(CommandSender cs, Command c, String l, String [] args) {
            if (l.equalsIgnoreCase("menu")) {
                Player player = (Player) cs;
                IconMenu menu = new IconMenu("Pick item!", 9, new IconMenu.OptionClickEventHandler() {
                    @Override
                    public void onOptionClick(IconMenu.OptionClickEvent event) {
                        event.getPlayer().sendMessage("You have chosen " + event.getName());
                        event.getPlayer().getWorld();
                        event.setWillClose(true);
                    }
                }, this)
                .setOption(0, new ItemStack(Material.DIAMOND_SWORD, 1), null);
     
                menu.open(player);
            }
            return false;
        }
    }
    

    CommandTest
    Code:
    package menu;
     
    import org.bukkit.Material;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import org.bukkit.inventory.ItemStack;
     
     
    public class CommandTest implements Listener, CommandExecutor {
     
       
        public boolean onCommand(CommandSender cs, Command c, String l, String [] args) {
            if (l.equalsIgnoreCase("test")) {
                Player player = (Player) cs;
                IconMenu menu = new IconMenu("Test", 9, new IconMenu.OptionClickEventHandler() {
                    @Override
                    public void onOptionClick(IconMenu.OptionClickEvent event) {
                        event.getPlayer().sendMessage("You have chosen " + event.getName());
                        event.getPlayer().getWorld();
                        event.setWillClose(true);
                    }
                }, this)
                .setOption(0, new ItemStack(Material.DIAMOND_SWORD, 1), null);
     
                menu.open(player);
            }
            return false;
        }
    }
    
    IconMenu
    Code:
    package menu;
    import java.util.Arrays;
    import org.bukkit.Bukkit;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.EventPriority;
    import org.bukkit.event.HandlerList;
    import org.bukkit.event.Listener;
    import org.bukkit.event.inventory.InventoryClickEvent;
    import org.bukkit.inventory.Inventory;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.meta.ItemMeta;
    import org.bukkit.plugin.Plugin;
     
    public class IconMenu implements Listener {
     
        private String name;
        private int size;
        private OptionClickEventHandler handler;
        private Plugin plugin;
       
        private String[] optionNames;
        private ItemStack[] optionIcons;
       
        public IconMenu(String name, int size, OptionClickEventHandler handler, Plugin plugin) {
            this.name = name;
            this.size = size;
            this.handler = handler;
            this.plugin = plugin;
            this.optionNames = new String[size];
            this.optionIcons = new ItemStack[size];
            plugin.getServer().getPluginManager().registerEvents(this, plugin);
        }
       
        public IconMenu setOption(int position, ItemStack icon, String name, String... info) {
            optionNames[position] = name;
            optionIcons[position] = setItemNameAndLore(icon, name, info);
            return this;
        }
       
        public void open(Player player) {
            Inventory inventory = Bukkit.createInventory(player, size, name);
            for (int i = 0; i < optionIcons.length; i++) {
                if (optionIcons[i] != null) {
                    inventory.setItem(i, optionIcons[i]);
                }
            }
            player.openInventory(inventory);
        }
       
        public void destroy() {
            HandlerList.unregisterAll(this);
            handler = null;
            plugin = null;
            optionNames = null;
            optionIcons = null;
        }
       
        @EventHandler(priority=EventPriority.MONITOR)
        void onInventoryClick(InventoryClickEvent event) {
            if (event.getInventory().getTitle().equals(name)) {
                event.setCancelled(true);
                int slot = event.getRawSlot();
                if (slot >= 0 && slot < size && optionNames[slot] != null) {
                    Plugin plugin = this.plugin;
                    OptionClickEvent e = new OptionClickEvent((Player)event.getWhoClicked(), slot, optionNames[slot]);
                    handler.onOptionClick(e);
                    if (e.willClose()) {
                        final Player p = (Player)event.getWhoClicked();
                        Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                            public void run() {
                                p.closeInventory();
                            }
                        }, 1);
                    }
                    if (e.willDestroy()) {
                        destroy();
                    }
                }
            }
        }
        
        public interface OptionClickEventHandler {
            public void onOptionClick(OptionClickEvent event);       
        }
        
        public class OptionClickEvent {
            private Player player;
            private int position;
            private String name;
            private boolean close;
            private boolean destroy;
           
            public OptionClickEvent(Player player, int position, String name) {
                this.player = player;
                this.position = position;
                this.name = name;
                this.close = true;
                this.destroy = false;
            }
           
            public Player getPlayer() {
                return player;
            }
           
            public int getPosition() {
                return position;
            }
           
            public String getName() {
                return name;
            }
           
            public boolean willClose() {
                return close;
            }
           
            public boolean willDestroy() {
                return destroy;
            }
           
            public void setWillClose(boolean close) {
                this.close = close;
            }
           
            public void setWillDestroy(boolean destroy) {
                this.destroy = destroy;
            }
        }
       
        private ItemStack setItemNameAndLore(ItemStack item, String name, String[] lore) {
            ItemMeta im = item.getItemMeta();
                im.setDisplayName(name);
                im.setLore(Arrays.asList(lore));
            item.setItemMeta(im);
            return item;
        }
       
    }
    
    ERROR
    Code:
    [INFO] dressedcow issued server command: /test
    2013-02-27 14:29:26 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'test' in plugin Menu v1.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186)
    at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchCommand(CraftServer.java:514)
    at net.minecraft.server.v1_4_R1.PlayerConnection.handleCommand(PlayerConnection.java:980)
    at net.minecraft.server.v1_4_R1.PlayerConnection.chat(PlayerConnection.java:898)
    at net.minecraft.server.v1_4_R1.PlayerConnection.a(PlayerConnection.java:853)
    at net.minecraft.server.v1_4_R1.Packet3Chat.handle(Packet3Chat.java:44)
    at net.minecraft.server.v1_4_R1.NetworkManager.b(NetworkManager.java:290)
    at net.minecraft.server.v1_4_R1.PlayerConnection.d(PlayerConnection.java:113)
    at net.minecraft.server.v1_4_R1.ServerConnection.b(SourceFile:39)
    at net.minecraft.server.v1_4_R1.DedicatedServerConnection.b(SourceFile:30)
    at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:598)
    at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224)
    at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494)
    at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427)
    at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
    Caused by: java.lang.Error: Unresolved compilation problem: 
    The constructor IconMenu(String, int, new IconMenu.OptionClickEventHandler(){}, CommandTest) is undefined
    at menu.CommandTest.onCommand(CommandTest.java:18)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    ... 15 more
    
     
  4. Offline

    chasechocolate

    dressedcow That doesn't look like your main class... At the end of your menu variable, it has to be the main class instead of "this", or the class that it is currently in.
     
  5. Offline

    iZanax

    Is there a way to make Menu's with the same Name working properly without that,
    if player A closes his Inventory then the Inventory of Player B closes as well?

    Thanks in advance!
     
  6. This is damned awesome, but is there a way to open up a version of this in the form of the creative search inventory section? It would offer even more immense possibilities if it could.
     
  7. Offline

    raGan.

    You could use InventoryHolder to uniquely identify icon menu and further improve compatibility with other plugins that use inventories.
    Something like 'if (event.getInventory().getHolder() instanceof OptionHolder && *name comparison*) {'.
     
  8. Offline

    pixelzee

    This is the IconMenu class:

    PHP:
    import java.util.Arrays;
     
    import org.bukkit.Bukkit;
    import org.bukkit.Material;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.EventPriority;
    import org.bukkit.event.HandlerList;
    import org.bukkit.event.Listener;
    import org.bukkit.event.inventory.InventoryClickEvent;
    import org.bukkit.inventory.Inventory;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.meta.ItemMeta;
    import org.bukkit.plugin.Plugin;
     
    public class 
    IconMenu implements Listener {
     
        private 
    String name;
        private 
    int size;
        private 
    OptionClickEventHandler handler;
        private 
    Plugin plugin;
     
        private 
    String[] optionNames;
        private 
    ItemStack[] optionIcons;
     
        public 
    IconMenu(String nameint sizeOptionClickEventHandler handlerPlugin plugin) {
            
    this.name name;
            
    this.size size;
            
    this.handler handler;
            
    this.plugin plugin;
            
    this.optionNames = new String[size];
            
    this.optionIcons = new ItemStack[size];
            
    plugin.getServer().getPluginManager().registerEvents(thisplugin);
        }
     
        public 
    IconMenu setOption(int positionItemStack iconString nameString... info) {
            
    optionNames[position] = name;
            
    optionIcons[position] = setItemNameAndLore(iconnameinfo);
            return 
    this;
        }
     
        public 
    void open(Player player) {
            
    Inventory inventory Bukkit.createInventory(playersizename);
            for (
    int i 0optionIcons.lengthi++) {
                if (
    optionIcons[i] != null) {
                    
    inventory.setItem(ioptionIcons[i]);
                }
            }
            
    player.openInventory(inventory);
        }
     
        public 
    void destroy() {
            
    HandlerList.unregisterAll(this);
            
    handler null;
            
    plugin null;
            
    optionNames null;
            
    optionIcons null;
        }
     
        @
    EventHandler(priority=EventPriority.MONITOR)
        
    void onInventoryClick(InventoryClickEvent event) {
            if (
    event.getInventory().getTitle().equals(name)) {
                
    event.setCancelled(true);
                
    int slot event.getRawSlot();
                if (
    slot >= && slot size && optionNames[slot] != null) {
                    
    Plugin plugin this.plugin;
                    
    OptionClickEvent e = new OptionClickEvent((Player)event.getWhoClicked(), slotoptionNames[slot]);
                    
    handler.onOptionClick(e);
                    if (
    e.willClose()) {
                        final 
    Player p = (Player)event.getWhoClicked();
                        
    Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                            public 
    void run() {
                                
    p.closeInventory();
                            }
                        }, 
    1);
                    }
                    if (
    e.willDestroy()) {
                        
    destroy();
                    }
                }
            }
        }
     
        public interface 
    OptionClickEventHandler {
            public 
    void onOptionClick(OptionClickEvent event);
        }
     
        public class 
    OptionClickEvent {
            private 
    Player player;
            private 
    int position;
            private 
    String name;
            private 
    boolean close;
            private 
    boolean destroy;
     
            public 
    OptionClickEvent(Player playerint positionString name) {
                
    this.player player;
                
    this.position position;
                
    this.name name;
                
    this.close true;
                
    this.destroy false;
            }
     
            public 
    Player getPlayer() {
                return 
    player;
            }
     
            public 
    int getPosition() {
                return 
    position;
            }
     
            public 
    String getName() {
                return 
    name;
            }
     
            public 
    boolean willClose() {
                return 
    close;
            }
     
            public 
    boolean willDestroy() {
                return 
    destroy;
            }
     
            public 
    void setWillClose(boolean close) {
                
    this.close close;
            }
     
            public 
    void setWillDestroy(boolean destroy) {
                
    this.destroy destroy;
            }
        }
     
        private 
    ItemStack setItemNameAndLore(ItemStack itemString nameString[] lore) {
            
    ItemMeta im item.getItemMeta();
                
    im.setDisplayName(name);
                
    im.setLore(Arrays.asList(lore));
            
    item.setItemMeta(im);
            return 
    item;
        }
    }


    This is my main class:


    PHP:
     
    public class Main extends JavaPlugin {
    public static 
    IconMenu im;
     
    public 
    void onEnable() {
     
    PluginManager pm Bukkit.getPluginManager();
    pm.registerEvents(imthis);
          }
     
     
    public 
    boolean onCommand(CommandSender sCommand cmdString clString[] args) {
            
    Player p = (Players;
     
            if (
    cl.equalsIgnoreCase("shop")) {
     
                
    IconMenu menu = new IconMenu("My Fancy Menu"9, new IconMenu.OptionClickEventHandler() {
                    @
    Override
                    
    public void onOptionClick(IconMenu.OptionClickEvent event) {
                        
    event.getPlayer().sendMessage("You have chosen " event.getName());
                        
    event.setWillClose(true);
                    }
                }, 
    this).setOption(3, new ItemStack(Material.APPLE1), "Food""The food is delicious").setOption(4, new ItemStack(Material.IRON_SWORD1), "Weapon""Weapons are for awesome people").setOption(5, new ItemStack(Material.EMERALD1), "Money""Money brings happiness");
     
                
    menu.open(p);
            }
            return 
    false;
        }
    When I type the command, the gui opens and enables me to click on an item. However the message doubles every time I re-open the shop.

    edit:

    Used bobacadodl's updated version:

    PHP:
    import java.util.Arrays;
     
    import org.bukkit.Bukkit;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.EventPriority;
    import org.bukkit.event.HandlerList;
    import org.bukkit.event.Listener;
    import org.bukkit.event.inventory.InventoryClickEvent;
    import org.bukkit.event.inventory.InventoryCloseEvent;
    import org.bukkit.inventory.Inventory;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.meta.ItemMeta;
    import org.bukkit.plugin.Plugin;
     
    public class 
    IconMenu implements Listener {
     
        private 
    String name;
        private 
    int size;
        private 
    OptionClickEventHandler handler;
        private 
    Plugin plugin;
     
        private 
    String[] optionNames;
        private 
    ItemStack[] optionIcons;
     
        public 
    IconMenu(String nameint sizeOptionClickEventHandler handlerPlugin plugin) {
            
    this.name name;
            
    this.size size;
            
    this.handler handler;
            
    this.plugin plugin;
            
    this.optionNames = new String[size];
            
    this.optionIcons = new ItemStack[size];
            
    plugin.getServer().getPluginManager().registerEvents(thisplugin);
        }
     
        public 
    IconMenu setOption(int positionItemStack iconString nameString... info) {
            
    optionNames[position] = name;
            
    optionIcons[position] = setItemNameAndLore(iconnameinfo);
            return 
    this;
        }
     
        public 
    void open(Player player) {
            
    Inventory inventory Bukkit.createInventory(playersizename);
            for (
    int i 0optionIcons.lengthi++) {
                if (
    optionIcons != null) {
                    
    inventory.setItem(ioptionIcons[i]);
                }
            }
            
    player.openInventory(inventory);
        }
     
        public 
    void destroy() {
            
    HandlerList.unregisterAll(this);
            
    handler null;
            
    plugin null;
            
    optionNames null;
            
    optionIcons null;
        }
     
        @
    EventHandler(priority EventPriority.MONITOR)
        
    void onInventoryClose(InventoryCloseEvent event) {
            if (
    event.getInventory().getTitle().equals(name)) {
                
    destroy();
            }
        }
     
        @
    EventHandler(priority EventPriority.MONITOR)
        
    void onInventoryClick(InventoryClickEvent event) {
            if (
    event.getInventory().getTitle().equals(name)) {
                
    event.setCancelled(true);
                
    int slot event.getRawSlot();
                if (
    slot >= && slot size && optionNames[slot] != null) {
                    
    Plugin plugin this.plugin;
                    
    OptionClickEvent e = new OptionClickEvent((Playerevent.getWhoClicked(), slotoptionNames[slot]);
                    
    handler.onOptionClick(e);
                    if (
    e.willClose()) {
                        final 
    Player p = (Playerevent.getWhoClicked();
                        
    Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                            public 
    void run() {
                                
    p.closeInventory();
                            }
                        }, 
    1);
                    }
                    if (
    e.willDestroy()) {
                        
    destroy();
                    }
                }
            }
        }
     
        public interface 
    OptionClickEventHandler {
            public 
    void onOptionClick(OptionClickEvent event);
        }
     
        public class 
    OptionClickEvent {
            private 
    Player player;
            private 
    int position;
            private 
    String name;
            private 
    boolean close;
            private 
    boolean destroy;
     
            public 
    OptionClickEvent(Player playerint positionString name) {
                
    this.player player;
                
    this.position position;
                
    this.name name;
                
    this.close true;
                
    this.destroy false;
            }
     
            public 
    Player getPlayer() {
                return 
    player;
            }
     
            public 
    int getPosition() {
                return 
    position;
            }
     
            public 
    String getName() {
                return 
    name;
            }
     
            public 
    boolean willClose() {
                return 
    close;
            }
     
            public 
    boolean willDestroy() {
                return 
    destroy;
            }
     
            public 
    void setWillClose(boolean close) {
                
    this.close close;
            }
     
            public 
    void setWillDestroy(boolean destroy) {
                
    this.destroy destroy;
            }
        }
     
        private 
    ItemStack setItemNameAndLore(ItemStack itemString nameString[] lore) {
            
    ItemMeta im item.getItemMeta();
            
    im.setDisplayName(name);
            
    im.setLore(Arrays.asList(lore));
            
    item.setItemMeta(im);
            return 
    item;
        }
     
    }
     
    bloodless2010 likes this.
  9. Offline

    mineart.at

    Same problem, onOptionClick is called twice per click. How can I fix it?
     
  10. Offline

    KeybordPiano459

    I'm getting a similar problem as mineart.at, there's no error in the console, but the first time I click on something in the GUI, whatever is in the OptionClickEvent is called once. The second time, anything called in that event is called twice. Then three times, and so on. Anyone?

    EDIT: This stops happening if you call close and destroy in the OptionClickEvent
     
  11. Offline

    chaseoes

    This would be because you're supposed to re-use the icon menu (create it in onEnable, for example) instead of re-creating it.

     
  12. Offline

    mineart.at

  13. Offline

    Deleted user

    I like this :)

    [​IMG]
     
    hawkfalcon likes this.
  14. I tried to make this into a trade system, but the inventories won't update for me?
     
  15. Offline

    Hoolean

    nisovin

    For this idea, I want your children.
     
  16. Offline

    Quaro

  17. Offline

    Qwahchees

    How would you make these buttons do something? For example, if I clicked on "Food", where would "Food" direct to? Do the buttons have ID's for an if statement?

    Nevermind, I believe within the OptionClickEvent, I can use event.getName() to find the display name of the item, then use an if statement to compare the getName to a string.

    Would this work?
    if (event.getName().equals("Apple")) {
    }
     
  18. Offline

    Qwahchees

    I'd just like to contribute to this.
    If you click fast enough, you may be able to glitch the item out of the menu, so this is a solution:

    Replace the onInvetoryClick method with this:

    PHP:
    @EventHandler(priority EventPriority.MONITOR)
        
    void onInventoryClick(InventoryClickEvent event) {
            final 
    Player p = (Playerevent.getWhoClicked();
            if (
    event.getSlotType() == InventoryType.SlotType.OUTSIDE) {
                
    event.setCancelled(true);
                
    p.updateInventory();
                
    event.getWhoClicked().closeInventory();
                
    destroy();
            }
            if (
    event.getInventory().getTitle().equals(name)) {
                
    event.setCancelled(true);
                
    int slot event.getRawSlot();
                if (
    slot >= && slot size && optionNames[slot] != null) {
                    
    Plugin plugin this.plugin;
                    
    OptionClickEvent e = new OptionClickEvent((Playerevent.getWhoClicked(), slotoptionNames[slot]);
                    
    handler.onOptionClick(e);
                    if (
    e.willClose()) {
                        
    p.closeInventory();
                        
    /*Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                        public void run() {
                        p.closeInventory();
                        }
                        }, 1);
                        }*/
                        
    if (e.willDestroy()) {
                            
    destroy();
                        }
                    }
                }
            }
        }
    This makes sure that if there's ever an event that you click outside the inventory, it immediately cancels the action and closes the panel, thus preventing item duping.
     
  19. Offline

    shmkane

    I'm not quite understanding this, can someone give me an example code. How do you check to see which Option they click?
     
  20. Offline

    iWareWolf

    I'm getting multiple effects when I click something... It seems to have an additional effect every time I click on something.
    So the effect is like Effect = (Times Click) + 1...
    Code:
                            IconMenu menu = new IconMenu("Choose Your Collar Color", 9, new IconMenu.OptionClickEventHandler() {
                                @Override
                                public void onOptionClick(IconMenu.OptionClickEvent event) {
                                    if (event.getPosition() == 0) {
                                        getServer().dispatchCommand(event.getPlayer(), "wolf color GREEN");
                                    } else if (event.getPosition() == 1) {
                                        getServer().dispatchCommand(event.getPlayer(), "wolf color BLACK");
                                    } else if (event.getPosition() == 2) {
                                        getServer().dispatchCommand(event.getPlayer(), "wolf color PURPLE");
                                    } else if (event.getPosition() == 3) {
                                        getServer().dispatchCommand(event.getPlayer(), "wolf color WHITE");
                                    } else if (event.getPosition() == 4) {
                                        getServer().dispatchCommand(event.getPlayer(), "wolf color YELLOW");
                                    }
                                    event.setWillClose(true);
                                }
                            }, this)
                                    .setOption(0, new ItemStack(Material.WOOL, 1, (short) 5), "GREEN", "")
                                    .setOption(1, new ItemStack(Material.WOOL, 1, (short) 15), "BLACK", "")
                                    .setOption(2, new ItemStack(Material.WOOL, 1, (short) 10), "PURPLE", "")
                                    .setOption(3, new ItemStack(Material.WOOL, 1, (short) 4), "WHITE", "")
                                    .setOption(4, new ItemStack(Material.WOOL, 1), "YELLOW", "");
                            menu.open(p);
     
  21. Offline

    desht

    Creating a new menu object every time? Each time you do that a new inventory click event handler is registered, so you'll end up with the handler getting called more and more times. Either keep a reference to the same object (only creating one) and show it when needed, or do setWillDestroy(true) to get the event handler unregistered.
     
  22. Offline

    mineart.at

  23. Offline

    desht

    Why have you commented out those three lines? That's what's causing your multiple event problem.
     
  24. Offline

    mineart.at

  25. Offline

    shohouku

    Is it possible to put an icon menu in a icon menu??
     
  26. Offline

    mythcaptor

    Yes, but you'll have to tinker with the code a bit, the functionality isn't built in. Shouldn't be too hard though.
     
  27. Offline

    shohouku

    Could you please show me?

    Really difficult for a beginner lol.
     
  28. Offline

    mythcaptor

    Afraid I have my own projects, so I don't have the time to write full example code for you, but essentially what you'll want to do is create a separate IconMenu for each sub menu reachable from your main IconMenu, and make the icons in the main menu close the main menu and open their corresponding submenu.
     
  29. Offline

    ritipinheiro

    when 2 players choose the kit at the same time one chooses works but then the other chooses and dont works and he can get the item in icon menu and then reopen iconmenu a choose and it works but when its 2 one choose and if the other choose after he can get the item
     
  30. Offline

    ritipinheiro

Thread Status:
Not open for further replies.

Share This Page