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 = ControlsMenuState.OPTIONONE; }
/// <summary> /// Goes to the "next" option /// </summary> private void CycleForward() { if (CurrentWorkerState == ControlsMenuState.OPTIONTWO) { CurrentWorkerState = ControlsMenuState.OPTIONONE; } else { CurrentWorkerState++; } 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 = ControlsMenuState.VOID; }