/// <summary> /// インベントリ内のアイテムをスクロールビューに表示させます /// </summary> private void inputItems() { selectviewContainer.detach(); deleteCursors(); var inventory = player.getInventory(); var items = inventory.getItems(); var nodes = new List <MenuItemNode>(); foreach (IItem item in items) { var itemNode = Instantiate(menuItemNodePrefab).GetComponent <MenuItemNode>(); if (item.getCanStack()) { itemNode.setItem(inventory.getStack(item)); } else { itemNode.setItem(item); } nodes.Add(itemNode); } itemSelectView = selectviewContainer.creatSelectView <MenuItemNode, IItem>(nodes); try { inputItemView(itemSelectView.getElement()); }catch { Debug.Log("there are no items"); } }
/// <summary> /// スキルをスクロールビューに表示させます /// </summary> private void inputSkills() { selectviewContainer.detach(); deleteCursors(); List <ISkill> skills = new List <ISkill>(); skills.AddRange(player.getActiveSkills()); skills.AddRange(player.getReactionSkills()); List <MenuSkillNode> skillNodes = new List <MenuSkillNode>(); foreach (ISkill skill in skills) { MenuSkillNode skillNode = Instantiate(menuSkillNodePrefab).GetComponent <MenuSkillNode>(); skillNode.setSkill(skill); skillNodes.Add(skillNode); } skillSelectView = selectviewContainer.creatSelectView <MenuSkillNode, ISkill>(skillNodes); try { inputSkillView(skillSelectView.getElement()); }catch { Debug.Log("there are no skills"); } }
/// <summary> /// 选择回调 /// </summary> /// <param name="selectView"></param> /// <param name="position"></param> public void ChangeSelectPosition(SelectView selectView, int position) { CreatureCptCharacter character = GetCharacter(); if (character == null) { LogUtil.LogError("没有找到Character组件"); return; } if (selectView == ui_ViewSelectChange_Hair) { CharacterInfoBean characterInfo = listHairInfoData[position]; character.characterSkin.ChangeHair(characterInfo.id); } else if (selectView == ui_ViewSelectChange_Eye) { CharacterInfoBean characterInfo = listEyeInfoData[position]; character.characterSkin.ChangeEye(characterInfo.id); } else if (selectView == ui_ViewSelectChange_Mouth) { CharacterInfoBean characterInfo = listMouthInfoData[position]; character.characterSkin.ChangeMouth(characterInfo.id); } else if (selectView == ui_ViewSelectChange_Clothes) { ItemsInfoBean itemsInfo = listClotehsInfoData[position]; character.characterEquip.ChangeClothes(itemsInfo.id); } }
public void ChangeSelectPosition(SelectView selectView, int position) { if (selectView == selectHair) { characterBodyCpt.SetHair(listSelectHair[position].key); } else if (selectView == selectEye) { characterBodyCpt.SetEye(listSelectEye[position].key); } else if (selectView == selectMouth) { characterBodyCpt.SetMouth(listSelectMouth[position].key); } else if (selectView == selectHat) { characterDressCpt.SetHat(listSelectHat[position]); } else if (selectView == selectClothes) { characterDressCpt.SetClothes(listSelectClothes[position]); } else if (selectView == selectShoes) { characterDressCpt.SetShoes(listSelectShoes[position]); } }
private void ViewSelectedChange(MenuViewModelBase menuView) { // DO NOT mess up below steps. // step #0: skip unselected menu event when switch menu of different menu group if (menuView == null) { return; } // step #1: configure searcher var searcher = ServiceLocator.Current.GetInstance <IViewModelSearcher>(); searcher.ResetSearchText(); // step #2: configure paginator var paginator = ServiceLocator.Current.GetInstance <IViewModelPaginator>(); paginator.ResetDisplayPage(); // if query database failure, prompt if (SelectView != null && SelectView.QueryDatabaseFailure()) { ServiceLocator.Current.GetInstance <IViewModelErrorWindow>().ErrorWindow( this, TranslationService.Translate("View_Messagebox_Text_QueryDatabaseFailure").ToString()); } }
private void inputMission() { int charamakeLevel = 0; foreach (Identity identity in choseIdentities) { charamakeLevel += identity.getLevel(); } charamakeLevel += choseJob.getLevel(); charamakeLevel += choseHumanity.getLevel(); List <MissionNode> missionNodes = new List <MissionNode>(); for (int i = 0; i < 20; i++) { IMissionBuilder builder = QuestHelper.getRandomMission(charamakeLevel); var missionNode = Instantiate(missionNodePrefab).GetComponent <MissionNode>(); missionNode.setQuest(builder); missionNodes.Add(missionNode); } missionSelectView = selectView.creatSelectView <MissionNode, IMissionBuilder>(missionNodes); var printMission = missionSelectView.getElement(); parameterView.printText(printMission.getName(), printMission.getDescription(), printMission.getFlavorText()); state = CharaMakeState.MISSION; }
private void inputQuests() { selectviewContainer.detach(); deleteCursors(); List <IQuest> quests = new List <IQuest>(); quests.AddRange(player.getUndertakingQuests()); List <MenuQuestNode> nodes = new List <MenuQuestNode>(); foreach (var quest in quests) { Debug.Log("into " + quest); var questNode = Instantiate(menuQuestNodePrefab).GetComponent <MenuQuestNode>(); questNode.setQuest(quest); nodes.Add(questNode); } questSelectView = selectviewContainer.creatSelectView <MenuQuestNode, IQuest>(nodes); try{ inputQuestView(questSelectView.getElement()); }catch { Debug.Log("there are no quests"); } }
private void btnWarehouseSelect_Click(object sender, RoutedEventArgs e) { SelectView v = new SelectView(); v.ClassName = (new warehouse()).ToString(); v.ShowDialog(); LoadComboboxWarehouse(); edtWarehouse.SelectedItem = v.RES; }
private void btnItemSelect_Click(object sender, RoutedEventArgs e) { SelectView v = new SelectView(); v.ClassName = (new car_producer()).ToString(); v.ShowDialog(); loadComboBox_CarProducers(); edtProducer.SelectedItem = v.RES; }
public void OnClickHaisou() { //荷物を送る if (gyoumu[pc] == 2 && o == false) { SelectView.SetActive(true); SmartPhone.SetActive(false); o = true; } }
private void btnAccountSelect_Click(object sender, RoutedEventArgs e) { //2 select window SelectView v = new SelectView(); v.ClassName = (new account()).ToString(); v.ShowDialog(); LoadComboboxAccount(); edtAccount.SelectedItem = v.RES; }
public void OpenMainView(object arg) { GameView viewType = GameView.MainView; ViewManager.Open(GameViewInfo.GetViewName(Moudle, GameView.MainView), (GameObject gameObject) => { m_selectView = new SelectView(Moudle, viewType, gameObject.GetComponent <UIPrefab>()); m_selectView.ShowSelectScene(GetModel <MSelectData>().Scenes); } ); }
private void btnBankSelect_Click(object sender, RoutedEventArgs e) { SelectView v = new SelectView(); v.ClassName = (new bank()).ToString(); v.ShowDialog(); LoadBanks(); if (v.Selected != null) { edtBank.SelectedValue = v.Selected._Id; } }
private void btnAccountSelect_Click(object sender, RoutedEventArgs e) { SelectView v = new SelectView(); v.ClassName = (new account()).ToString(); v.ShowDialog(); LoadAccounts(); if (v.Selected != null) { edtAccount.SelectedValue = v.Selected._Id; } }
public void SelectNo() { Debug.Log("在庫残り:" + zaiko[LC, LP - 1]); if (zaiko[LC, LP - 1] - LQ < 0) { Debug.Log("正しい選択だったようだ"); } TejyunSE = true; SelectView.SetActive(false); SmartPhone.SetActive(true); SigiText.text = "次の手順を取得しよう"; }
public void SelectYes() { zaiko[LC, LP - 1] -= LQ; if (zaiko[LC, LP - 1] < 0) { gamestatus = false; } Debug.Log("在庫残り:" + zaiko[LC, LP - 1]); TejyunSE = true; SelectView.SetActive(false); SmartPhone.SetActive(true); SigiText.text = "次の手順を取得しよう"; }
private void CallSelectWindowGroup() { SelectView v = new SelectView(); v.ClassName = (new spare_group()).ToString(); v.ShowDialog(); loadComboBox_SpareGroups(); //edtGroup.SelectedItem = v.RES; if (v.Selected != null) { edtGroup.SelectedValue = v.Selected._Id; } }
private void CallSelectWindowUnit() { SelectView v = new SelectView(); v.ClassName = (new unit()).ToString(); v.ShowDialog(); loadComboBox_Units(); //edtUnit.SelectedItem = v.RES; if (v.Selected != null) { edtUnit.SelectedValue = v.Selected._Id; } }
private void btnAccountSelect_Click(object sender, RoutedEventArgs e) { SelectView v = new SelectView(); v.ClassName = (new account()).ToString(); v.ShowDialog(); LoadComboboxAccount(); try { edtCustomer.SelectedValue = v.Selected._Id; } catch (Exception) { } }
/// <summary> /// 特徴選択画面を表示させます /// </summary> private void inputIdentity() { List <IdentityNode> identityNodes = new List <IdentityNode>(); foreach (Identity identity in identities) { IdentityNode identityNode = Instantiate(identityNodePrefab).GetComponent <IdentityNode>(); identityNode.setIdentity(identity); identityNodes.Add(identityNode); } identitySelectView = selectView.creatSelectView <IdentityNode, Identity>(identityNodes); var printIdentity = identitySelectView.getElement(); parameterView.printText(printIdentity.getName(), printIdentity.getDescription(), printIdentity.getFlavorText()); state = CharaMakeState.IDENTITY; }
private void btnBankSelect_Click(object sender, RoutedEventArgs e) { SelectView v = new SelectView(); v.ClassName = (new bank_account()).ToString(); if (edtBankAccount.SelectedItem != null) { v.ParentItemID = (int)edtAccount.SelectedValue; } v.ShowDialog(); LoadBankAccounts(); if (v.Selected != null) { edtBankAccount.SelectedValue = v.Selected._Id; } else { edtBankAccount.SelectedIndex = 0; } }
/// <summary> /// 職業選択画面を表示させます /// </summary> private void inputJob() { List <JobNode> jobNodes = new List <JobNode>(); foreach (Job job in jobs) { JobNode jobNode = Instantiate(jobNodePrefab).GetComponent <JobNode>(); jobNode.setJob(job); jobNodes.Add(jobNode); } jobSelectView = selectView.creatSelectView <JobNode, Job>(jobNodes); Vector3 viewPos = new Vector3(712f, Screen.height / 2); this.jobView = Instantiate(jobViewPrefab, viewPos, new Quaternion(0, 0, 0, 0)).GetComponent <CharaMakeJobView>(); jobView.printText(jobSelectView.getElement()); jobView.transform.SetParent(CanvasGetter.getCanvasElement().transform); state = CharaMakeState.JOB; }
public void setState(List <int> ids, TitleManager manager) { this.transform.position = new Vector3(Screen.width / 2, Screen.height / 2); selectviewContainer = Instantiate((GameObject)Resources.Load("Prefabs/SelectView")).GetComponent <SelectViewContainer>(); selectviewContainer.transform.position = this.transform.position; selectviewContainer.transform.SetParent(transform); var worldNodePrefab = (GameObject)Resources.Load("Prefabs/WorldLoadNode"); var worldLoadNodes = new List <WorldLoadNode>(); foreach (int id in ids) { var node = Instantiate(worldNodePrefab).GetComponent <WorldLoadNode>(); node.setId(id); worldLoadNodes.Add(node); } selectView = selectviewContainer.creatSelectView <WorldLoadNode, int>(worldLoadNodes); title = manager; }
/// <summary> /// インデックスをスクロールビューに表示させます /// </summary> private void inputIndex() { currentContent = MenuContents.INDEX; deleteCursors(); selectviewContainer.detach(); var contents = Enum.GetValues(typeof(MenuContents)); List <MenuIndexNode> contentsList = new List <MenuIndexNode>(); foreach (MenuContents menuContent in contents) { if (menuContent != MenuContents.INDEX) { var indexNode = Instantiate(menuIndexNodePrefab).GetComponent <MenuIndexNode>(); indexNode.setContent(menuContent); contentsList.Add(indexNode); } } indexSelectView = selectviewContainer.creatSelectView <MenuIndexNode, MenuContents>(contentsList); }
/// <summary> /// パーティのキャラクターをスクロールビューに表示させます /// </summary> private void inputCharacters() { selectviewContainer.detach(); deleteCursors(); List <MenuCharacterNode> characterNodes = new List <MenuCharacterNode>(); foreach (IPlayable character in party.getParty()) { GameObject characterNodeObject = Instantiate(menuCharacterNodePrefab); MenuCharacterNode characterNode = characterNodeObject.GetComponent <MenuCharacterNode>(); characterNode.setCharacter(character); characterNodes.Add(characterNode); } try { characterSelectView = selectviewContainer.creatSelectView <MenuCharacterNode, IPlayable>(characterNodes); inputCharacterStateView(characterSelectView.getElement()); }catch { Debug.Log("there are no characters"); } }
private static void Click(object sender, EventArgs e) { try { var doc = AcadHelper.Doc; var sel = doc.Editor.SelectImplied(); if (sel.Status != PromptStatus.OK) { return; } List <IGroupProvider> groups; _dictBlName = new DictBlockName(); using (var t = doc.TransactionManager.StartTransaction()) { var ents = sel.Value.GetObjectIds().GetObjects <Entity>() .GroupBy(GetType).ToDictionary(k => k.Key, v => v.ToList()); groups = ents.Select(s => GetTypeProvider(s.Key)) .Where(w => w != null).OrderBy(o => o.Name).ToList(); groups.Insert(0, new CommonProvider(ents)); t.Commit(); } var selVm = new SelectVm(groups, _dictBlName); selView?.Close(); selView = new SelectView(selVm); Autodesk.AutoCAD.ApplicationServices.Core.Application.ShowModelessWindow(selView); } catch (Exception ex) { ex.Message.WriteLine(); } finally { _dictBlName = null; } }
/// <summary> /// 人間性選択画面を表示させます /// </summary> private void inputHumanity() { List <HumanityNode> humanityNodes = new List <HumanityNode>(); foreach (Humanity humanity in humanities) { HumanityNode humanityNode = Instantiate(humanityNodePrefab).GetComponent <HumanityNode>(); humanityNode.setHumanity(humanity); humanityNodes.Add(humanityNode); } humanitySelectView = selectView.creatSelectView <HumanityNode, Humanity>(humanityNodes); Vector3 viewPos = new Vector3(712f, Screen.height / 2); this.parameterView = Instantiate(parameterViewPrefab, viewPos, new Quaternion(0, 0, 0, 0)).GetComponent <CharaMakeParameterView>(); parameterView.transform.SetParent(CanvasGetter.getCanvasElement().transform); var printHumanity = humanitySelectView.getElement(); parameterView.printText(printHumanity.getName(), printHumanity.getDescription(), printHumanity.getFlavorText()); state = CharaMakeState.HUMANITY; }
void Start() { selectView = GetComponent <SelectView>(); }
public void CloseMainView(object arg) { m_selectView = null; }