Esempio n. 1
0
        protected override void Run(Player player)
        {
            WindowTabBuilder t = WindowTabBuilder.CreateT("lexicon");

            t.Add(new HelpSplitTab());
            t.Add(new LexiconSplitTab <DataUnit>(L.b.units));
            t.Add(new LexiconSplitTab <DataBuilding>(L.b.buildings));
            t.Add(new LexiconSplitTab <Nation>(L.b.nations));
            t.Add(new LexiconSplitTab <Resource>(L.b.res));
            t.Add(new LexiconSplitTab <DataTerrain>(L.b.terrains));
            t.Add(new LexiconSplitTab <Improvement>(L.b.improvements));
            t.Add(new LexiconSplitTab <DataMap>(LSys.tem.maps));
            t.Add(new LexiconSplitTab <Round>(L.b.rounds));
            t.Add(new LexiconSplitTab <Element>(L.b.elements));
            t.Add(new LexiconSplitTab <Usage>(L.b.usages));
            t.Add(new LexiconSplitTab <FightModi>(L.b.fightModis));

            if (S.Debug())
            {
                t.Add(new LexiconSplitTab <Campaign>(LSys.tem.campaigns));
                t.Add(new LexiconSplitTab <Scenario>(LSys.tem.scenarios));
                t.Add(new LexiconSplitTab <FDataAction>(L.b.actions));
            }

            t.Finish();
        }
Esempio n. 2
0
        protected override void Run(Player player)
        {
            L.b.gameOptions.startConfig = new Dictionary <string, string>();

            WindowTabBuilder t = WindowTabBuilder.CreateT("endless");

            t.Add(new MapSplitTab(L.b.gameOptions.startConfig));
            t.Add(new GeneralSplitTab(L.b.gameOptions.startConfig));

            t.Finish();
        }
Esempio n. 3
0
        protected override void Perform(ActionEvent evt, Player player, MapElementInfo info, NVector pos,
                                        ActionHolder holder)
        {
            if (CheckAllowed(player, info, pos, holder))
            {
                return;
            }

            WindowTabBuilder wtb = WindowTabBuilder.Create(holder.DataAction().Desc());

            AddLast(player, info, pos, holder, wtb);

            foreach (string e in player.elements.elements)
            {
                Element         ele = L.b.elements[e];
                SplitElementTab set = new SplitElementTab(ele.Name(), ele.Icon, holder.DataAction().Name());

                var b = Objects().GetAllByCategory(ele.id).OrderBy(o => o.Name()).ToList();
                foreach (TU build in b)
                {
                    AddObject(player, info, pos, build.id, set);
                }

                if (set.Count() > 0)
                {
                    wtb.Add(set);
                }
            }

            //has some?
            if (wtb.Count() >= 1)
            {
                wtb.Finish();
                return;
            }

            wtb.CloseWindow();
            info.UI().ShowPanelMessageError(S.T("tabNo", holder.DataAction().Desc()));
        }