Exemplo n.º 1
0
        public void CraftBlueprint(string blueprintName)
        {
            if (IsCrafting)
            {
                return;
            }

            WIBlueprint blueprint = null;

            if (Blueprints.Get.Blueprint(blueprintName, out blueprint))
            {
                CraftingInterface.OnSelectBlueprint(blueprint);
                InventoryTabs.Show();
                InventoryTabs.SetSelection("Crafting");
                //let the interface take care of whether we have a crafting item
            }
        }
        public void OnClickPlaceOrderButton()
        {
            string error;
            LibraryCatalogueEntry order = mSelectedObject;

            if (!Books.Get.TryToPlaceBookOrder(LibraryName, mSelectedObject, out error))
            {
                BookStatusLabel.text = error;
            }
            else
            {
                //there's a chance we've actually delivered an order by doing this
                PlacedOrder = true;
                Tabs.SetSelection("CurrentOrder");
            }
            mSelectedObject = order;
            //refresh
            PushEditObjectToNGUIObject();
        }
Exemplo n.º 3
0
        public override void Start()
        {
            Tabs.Initialize(this);
            Tabs.OnSetSelection += OnSetSelection;
            ProfileBrowser.OnSelectProfileName += OnSelectProfileName;
            base.Start();

            List <string> profiles = Profile.Get.ProfileNames(false);

            if (profiles.Count == 0)
            {
                Tabs.SetSelection("Create");
            }
        }
Exemplo n.º 4
0
        public void OnSetSelection()
        {
            if (!Manager.IsAwake <GUIManager>())
            {
                return;
            }

            if (Skills.MostRecentlyLearnedSkill != null && SubSelectionTabs.SelectedTab != Skills.MostRecentlyLearnedSkill.Info.SkillGroup)
            {
                SubSelectionTabs.SetSelection(Skills.MostRecentlyLearnedSkill.Info.SkillGroup);
                Skills.MostRecentlyLearnedSkill = null;
            }
            SkillGroup = SubSelectionTabs.SelectedTab;
            IEnumerable <Skill> skills = Skills.Get.SkillsByGroup(SkillGroup).AsEnumerable();

            ReceiveFromParentEditor(skills);
        }
Exemplo n.º 5
0
        public void OnSelectBlueprint(WIBlueprint blueprint)
        {
            if (ResultSquare.NumItemsCrafted > 0)
            {
                GUIManager.PostWarning("You have to remove your crafted items first");
                return;
            }

            Blueprint = blueprint;

            mRequiredSkill.LoadBlueprintsRows(Rows, Blueprint, ResultSquare);

            SetCraftOneButton(false);
            SetCraftAllButton(false);

            if (Tabs.SelectedTab != "Craft")
            {
                Tabs.SetSelection("Craft");
            }
            RefreshRequest();
        }