public void ChangeNumOfColors(int number) { Game.numberOfColors = number; state = OptionsMenuState.Main; numOfColorsPanel.SetActive(false); UpdateButtons(); }
public void Start() { state = OptionsMenuState.Main; controller.EnableCustomGestures(Gesture.GestureType.TYPESCREENTAP, true); controller.EnableCustomGestures(Gesture.GestureType.TYPEKEYTAP, true); UpdateButtons(); }
public void ChangeCulture(string culture) { Game.culture = culture; state = OptionsMenuState.Main; culturePanel.SetActive(false); UpdateButtons(); }
private void OpenNumOfColors() { state = OptionsMenuState.Colors; numOfColorsPanel.SetActive(true); numOfColorsPanel.GetComponent <NumberPanelScript>().UpdateInterface(); classifier = Game.GetClassifier(Game.ChooseNumberState()); Game.StartActionBuffer(); UpdateButtons(); }
public void Show(int screenX, int screenY, Graphics.Viewport viewport) { _viewport = viewport; _active = true; _screenX = screenX - _upperBackground.Width / 2; _screenY = screenY - _upperBackground.Height / 2; _state = OptionsMenuState.Initial; keepInsideViewport(viewport); }
public override void Initialize() { menuBackground = new menuItem(); menuItems = new menuItem[int_NumOfOptions]; for (int i = 0; i < int_NumOfOptions; i++) { menuItems[i] = new menuItem(); } CurrentWorkerState = OptionsMenuState.AUDIO; }
private void onGraphicsOptionsClicked(object sender, EventArgs e) { if (_state == OptionsMenuState.AdvancedOption) { _state = OptionsMenuState.GraphicsOptions; } else { _state = OptionsMenuState.AdvancedOption; } keepInsideViewport(_viewport); }
private void onOptionsClicked(object sender, EventArgs e) { if (_state == OptionsMenuState.Initial) { _state = OptionsMenuState.Options; } else { _state = OptionsMenuState.Initial; } keepInsideViewport(_viewport); }
private void OpenCulture() { state = OptionsMenuState.Culture; culturePanel.SetActive(true); UpdateButtons(); }
/// <summary> /// Goes back to previous option if skipped to Back /// </summary> private void CycleUp() { if (CurrentWorkerState == OptionsMenuState.BACK) { if (PreviousWorkerState == OptionsMenuState.BACK) { CurrentWorkerState = OptionsMenuState.AUDIO; } else { CurrentWorkerState = PreviousWorkerState; } } for (int i = 0; i < int_NumOfOptions; i++) { if (i == (int)CurrentWorkerState) { menuItems[i].t2d_Texture = menuItems[i].t2d_Texture_Highlight; } else { menuItems[i].t2d_Texture = menuItems[i].t2d_Texture_Original; } } }
/// <summary> /// Goes directly to Back options /// </summary> private void CycleDown() { if (CurrentWorkerState != OptionsMenuState.BACK) { PreviousWorkerState = CurrentWorkerState; CurrentWorkerState = OptionsMenuState.BACK; } for (int i = 0; i < int_NumOfOptions; i++) { if (i == (int)CurrentWorkerState) { menuItems[i].t2d_Texture = menuItems[i].t2d_Texture_Highlight; } else { menuItems[i].t2d_Texture = menuItems[i].t2d_Texture_Original; } } }
/// <summary> /// Puts the worker state on void /// </summary> public void MenuVoid() { PreviousWorkerState = CurrentWorkerState; CurrentWorkerState = OptionsMenuState.VOID; }