Class Menu

Overview

Controls the menu used to select options and create the match from the start of the game. Aside from time in matches, this is the GUI that will control the majority of the game.

Variables

[[SPoint]]* loc : pointer to an array of possible location of the cursor on screen
[[SPoint]]* multiLoc[4] : in cases where all players may give input, this will record the location of all such pointers
int multiSel[4] : index each player is pointing to in such a case
int curSel : current selection index
delayInd[4] : delays receiving input if it was recent. Prevents rapid-fire selection.
int curNum: defines the size of the dynamic SPoint array for the given meny
int scnSel : defines which menu to use
bool selFlag : true if a selection is made; no further input is read at this point.
bool multiMenu : true if multiple players can give input to the current menu
c_3dObj menuScreen : a plane to hold the menu
c_GameController mCont[4] : receives input from the controllers
bool plrMadeSel[4] : series of boolean flags to determine if a player made a selection during multisel

Functions

StartMenu(GrEngine *eng)

Loads up the menu fresh, bringing the player to the splash screen.

Cursor Up…Down…

Moves the cursor to the above or below selection. Versions with a parameter are used during multisel to indicate a particular player.

void c_Menu::ResetSelFlag()

undoes the selFlag, allowing another selection to be made.

+= int c_Menu::Select(c_Options* opt)

Executes a selection, can change menus or load a match from this function.

void c_Menu::Render(GrEngine *eng, c_Options* opt)

Render call for menu.

void c_Menu::MakePlrSel(int c)

makes player 'c's selection in multisel

void c_Menu::OpenMenu()

Used to arrange the new menu, this function needs no parameters and will interpret the situation from the class variables.

void c_Menu::SetPrimaryMenu()

Used to define the primary menu on the splash screen.

HRESULT c_Menu::ProcessInput(GrEngine *eng, c_Options* opt);

Processes input from the controller to update the menu

++= void c_Menu::ClearMenu(GrEngine* eng)

Deletes the menu from the Graphics Engine

void c_Menu::RenderSelection(GrEngine *eng, SPoint rAt, SPoint rSize)

Renders the cursor at rAt, based on the specified size 'rSize'