Exemplo n.º 1
0
    public static MenuItemBundle CreateListBundle(string bundleName, List <GEItem> geItems, MenuItemBundle parent)
    {
        MenuItemBundle newBundle = new MenuItemBundle(bundleName, parent);

        if (!ActivatableGameElement.IsActiveGEInList(geItems))
        {
            Description.GetInstance().AddDescriptionText(LabelUtility.Instance.GetLabel(LabelNames.EMPTYITEMLIST));
        }
        foreach (GEItem item in geItems)
        {
            newBundle.AddMenuItem(new MIOpenBundle <GEItem>(item.ItemName.GetText(), item, newBundle));
            item.OnActivationChange += newBundle.RefreshOnEvent;
        }

        newBundle.AddMenuItem(new MIBack(parent));

        return(newBundle);
    }
Exemplo n.º 2
0
    public static MenuItemBundle CreateListBundle(string bundleName, List <GENeighbour> geNeighbours, MenuItemBundle parent)
    {
        MenuItemBundle newBundle = new MenuItemBundle(bundleName, parent);

        if (!ActivatableGameElement.IsActiveGEInList(geNeighbours))
        {
            Description.GetInstance().AddDescriptionText(LabelUtility.Instance.GetLabel(LabelNames.EMPTYNEIGHBOURLIST));
        }
        foreach (GENeighbour neighbour in geNeighbours)
        {
            newBundle.AddMenuItem(new MIRoomChange(neighbour.MenuText.GetText(), newBundle, neighbour));
            neighbour.OnActivationChange += newBundle.RefreshOnEvent;
        }

        newBundle.AddMenuItem(new MIBack(parent));

        return(newBundle);
    }
Exemplo n.º 3
0
    public static MenuItemBundle CreateListBundle(string bundleName, List <GENpc> geNpcs, MenuItemBundle parent)
    {
        MenuItemBundle newBundle = new MenuItemBundle(bundleName, parent);

        if (!ActivatableGameElement.IsActiveGEInList(geNpcs))
        {
            Description.GetInstance().AddDescriptionText(LabelUtility.Instance.GetLabel(LabelNames.EMPTYNPCLIST));
        }
        foreach (GENpc npc in geNpcs)
        {
            newBundle.AddMenuItem(new MIOpenBundle <GENpc>(npc.NameText.GetText(), npc, newBundle));
            npc.OnActivationChange += newBundle.RefreshOnEvent;
        }

        newBundle.AddMenuItem(new MIBack(parent));

        return(newBundle);
    }