예제 #1
0
        public override void ShowDetail(PanelBuilder panel)
        {
            PlayerResearchMgmt mgmt = S.ActPlayer().research;

            panel.AddHeaderLabel("Actual");
            if (mgmt.actual == null || mgmt.actual.Count == 0)
            {
                panel.AddImageLabel("No Research at the moment", "no");
            }
            else
            {
                foreach (string e in mgmt.actual)
                {
                    Element el = L.b.elements[e];
                    panel.AddImageLabel(el.Name(), el.Icon);
                }
            }

            elements = new List <string>();

            panel.AddHeaderLabel("New Research area");
            foreach (string en in S.ActPlayer().elements.elements)
            {
                Element e = L.b.elements[en];
                panel.AddImageTextButton($"Add {e.Name()}", e.Sprite(), (() =>
                {
                    elements.Add(e.id);
                    UpdateDesc();
                }));
            }

            panel.AddHeaderLabel("Control");
            desc = panel.AddLabel("???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ???? ");
            panel.AddButton("Clear actual plan", () => { elements.Clear(); UpdateDesc(); });
            start = panel.AddButton("??", () => { mgmt.BeginNewResearch(elements); window.CloseWindow(); });
            UpdateDesc();

            if (S.Debug())
            {
                panel.AddSubLabel($"Act cost", S.ActPlayer().research.cost.ToString());
                panel.AddHeaderLabel("General possible");
                panel.AddLabel(String.Join(",", S.ActPlayer().research.AvailableResearch().Select(r => r.Name())));
                if (mgmt.actual != null)
                {
                    panel.AddHeaderLabel("Actual possible");
                    panel.AddLabel(String.Join(",", S.ActPlayer().research.AvailableResearch(mgmt.actual).Select(r => r.Name())));
                }
            }
        }
예제 #2
0
        public override void ShowDetail(PanelBuilder panel)
        {
            base.ShowDetail(panel);
            panel.AddButton($"Show details for {town.name}", (() => town.ShowDetails()));

            panel.AddHeaderLabel("Buildings");
            //add buildings
            foreach (BuildingInfo info in GameMgmt.Get().building.GetByTown(town.id))
            {
                panel.AddImageTextButton(info.name, info.baseData.Sprite(), () =>
                {
                    S.CameraMove().MoveTo(info.Pos());
                    OnMapUI.Get().UpdatePanel(info.Pos());
                    b.CloseWindow();
                });
            }
        }
        public override void ShowDetail(PanelBuilder panel)
        {
            panel.AddSubLabel("Position", _mapElementInfo.Pos().ToString());
            panel.AddHeaderLabel("HP");
            panel.AddInput("HP", _mapElementInfo.data.hp, (s => { _mapElementInfo.data.hp = s; }));
            panel.AddHeaderLabel("AP");
            panel.AddInput("AP", _mapElementInfo.data.ap, (s => { _mapElementInfo.data.ap = s; }));
            panel.AddButton("Set Finish", _mapElementInfo.FinishConstruct);

            //display all actions
            foreach (var act in _mapElementInfo.data.action.actions)
            {
                act.PerformAction().BuildPanel(new ActionDisplaySettings(panel, _mapElementInfo.Player(), _mapElementInfo, _mapElementInfo.Pos(), act));
            }

            //display modis
        }
예제 #4
0
        public override void ShowDetail(PanelBuilder panel)
        {
            panel.AddButton("Add a new player", () =>
            {
                startConfig[id + "name"]      = id == 0?System.Environment.UserName:"******";
                startConfig[id + "coat"]      = L.b.coats.Auto(id);
                startConfig[id + "nation"]    = "north";
                startConfig[id + "winGold"]   = "true";
                startConfig[id + "loseKing"]  = "true";
                PlayerSelectSplitElement psse = new PlayerSelectSplitElement(startConfig, id++);
                (tab as GeneralSplitTab).Add(psse);

                disabled = null;
                //UpdateButtonText();
            });

            panel.AddHeaderLabel("Options");
            L.b.gameOptions.GetAllByCategory("general", null).ForEach(o => o.AddOption(panel));
        }