void Breadcrumbs() { using (new EditorGUILayout.VerticalScope("box", GUILayout.Width(150))) { crumbStyle.alignment = TextAnchor.MiddleCenter; Color oldColor = GUI.backgroundColor; EditorGUILayout.Space(); for (int i = 0; i < pageNames.Count; i++) { if (i > 0 && i < pageNames.Count - 1) { GUI.backgroundColor = (pageComplete[i] ? Color.green : Color.yellow); } crumbStyle.normal.textColor = (i == (int)currentPage ? crumbHighlight : crumbDefault); using (var b = new EditorGUILayout.HorizontalScope("button", GUILayout.Height(22))) { if (GUI.Button(b.rect, pageNames[i], crumbStyle)) { currentPage = (PAGES)i; } EditorGUILayout.Space(); } GUI.backgroundColor = oldColor; } GUILayout.FlexibleSpace(); } }
public void Back() { if (history.Count > 0) { _currentPage = history.Pop(); } }
void Breadcrumbs() { using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(true))) { GUILayout.FlexibleSpace(); crumbStyle.alignment = TextAnchor.MiddleCenter; Color oldColor = GUI.backgroundColor; for (int i = 0; i < pageNames.Count; i++) { if (i > 0 && i < pageNames.Count - 1) { GUI.backgroundColor = (pageComplete[i] ? Color.green : Color.yellow); } using (new EditorGUILayout.HorizontalScope("box", GUILayout.Height(22))) { crumbStyle.normal.textColor = (i == (int)currentPage ? crumbHighlight : crumbDefault); if (GUILayout.Button(pageNames[i], crumbStyle)) { currentPage = (PAGES)i; } if (i > 0 && i < pageNames.Count - 1) { EditorGUILayout.Space(); GUILayout.Label(pageComplete[i] ? tickTexture : crossTexture, iconStyle); } } GUILayout.Space(5); GUI.backgroundColor = oldColor; } GUILayout.FlexibleSpace(); } }
public Page getPage(PAGES page) { return(_pages[page]); }
/// <summary> /// 결제 모드에 따른 다음 페이지 이름 얻기 /// </summary> private string NextPage(PAY_TYPE aPayType, PAGES aCurrentPages) { string nextPageName = string.Empty; switch (mCurrentPayType) { case PAY_TYPE.MonthlyDeduction: { //string currentPageName = Enum.GetName(typeof(PAGES), aCurrentPages); int pageIdx = this.ListMonthlyDeductionSequence.IndexOf(aCurrentPages); if (pageIdx++ <= this.ListMonthlyDeductionSequence.Count - 1) { nextPageName = this.ListMonthlyDeductionSequence[pageIdx++].ToString(); } else { nextPageName = string.Empty; } } break; case PAY_TYPE.CustomerPayment: { int pageIdx = this.ListCustomerPayment.IndexOf(aCurrentPages); if (pageIdx++ <= this.ListCustomerPayment.Count - 1) { nextPageName = this.ListCustomerPayment[pageIdx++].ToString(); } else { nextPageName = string.Empty; } } break; case PAY_TYPE.OderCancellation: { int pageIdx = this.ListOderCancellation.IndexOf(aCurrentPages); if (pageIdx++ <= this.ListOderCancellation.Count - 1) { nextPageName = this.ListOderCancellation[pageIdx++].ToString(); } else { nextPageName = string.Empty; } } break; case PAY_TYPE.UserUsageHistoryInquiry: { int pageIdx = this.ListUserUsageHistoryInquiry.IndexOf(aCurrentPages); if (pageIdx++ <= this.ListUserUsageHistoryInquiry.Count - 1) { nextPageName = this.ListUserUsageHistoryInquiry[pageIdx++].ToString(); } else { nextPageName = string.Empty; } } break; } return(nextPageName); }
// Use this for initialization void Start() { m_nPresentPage = PAGES.PAGE_ELIOT; }
public void OpenPage(PAGES openTo) { menuFront.SetActive(false); menuBack.SetActive(false); volumeMenuFront.SetActive(false); volumeMenuBack.SetActive(false); quitMenuFront.SetActive(false); quitMenuBack.SetActive(false); stampsFront.SetActive(false); stampsBack.SetActive(false); saveloadFront.SetActive(false); saveloadBack.SetActive(false); colourpresetsFront.SetActive(false); colourpresetsBack.SetActive(false); //reactivate only the required page switch (openTo) { case PAGES.MENU: menuFront.SetActive(true); menuBack.SetActive(true); inGameEvents.tabMenuInteract = true; bookAnim.SetInteger("state", (int)BookStates.Tab1); break; case PAGES.STAMPS: stampsFront.SetActive(true); stampsBack.SetActive(true); inGameEvents.tabStampsInteract = true; bookAnim.SetInteger("state", (int)BookStates.Tab2); break; case PAGES.SAVELOAD: saveloadFront.SetActive(true); saveloadBack.SetActive(true); inGameEvents.tabSaveInteract = true; bookAnim.SetInteger("state", (int)BookStates.Tab3); break; case PAGES.CLOURPRESETS: colourpresetsFront.SetActive(true); colourpresetsBack.SetActive(true); inGameEvents.tabPalletInteract = true; bookAnim.SetInteger("state", (int)BookStates.Tab4); break; case PAGES.VOLUME: volumeMenuFront.SetActive(true); volumeMenuBack.SetActive(true); break; case PAGES.QUIT: quitMenuFront.SetActive(true); quitMenuBack.SetActive(true); break; default: menuFront.SetActive(true); menuBack.SetActive(true); bookAnim.SetInteger("state", (int)BookStates.Tab1); break; } //bookAnim.SetInteger("state", (int)BookStates.Tab5); }