coastline 0.0.4
Loading...
Searching...
No Matches
MenuScreen Class Reference

A screen of the front end menus. More...

#include <frontend.h>

Public Member Functions

 MenuScreen ()
 Create a running screen with two lists of saved files.
virtual ~MenuScreen ()
 Free the lists of saved files.
virtual bool RunFrame ()
 Run a frame of the screen, and shut the front end down once the screen stops running.
virtual bool ActivateMenuScreen ()
 Make the screen the one that shows.
virtual void FlipAndWait ()
 Flip the frame to the display and wait for the flip to finish.
virtual void ShutdownFrontEnd (int bPartial)
 Free the cached screens of the front end.
virtual void DestroyPanels ()
 Delete every widget of every panel and the panels, and put the hover back on the first item.
virtual HRESULT ClearBackBuffer ()
 Clear the back buffer of the display.
auto GetBuildCallback () const
void SetBuildCallback (int(*callback)(MenuScreen *))
 Set the callback that builds the screen.
bool IsBuilt () const
void SetBuilt (bool value)
 Set whether the screen has been built.
unsigned short GetPanelCount () const
unsigned short SetPanelCount (unsigned short value)
 Replace the number of panels in the screen.
unsigned short SetCurrentPanelIndex (unsigned short value)
 Set the index of the current panel.
MenuPanel * GetPanel (int index) const
MenuPanel * SetPanel (int index, MenuPanel *panel)
 Replace the panel at index.
MenuPanel * GetCurrentPanel () const
bool IsRunning () const
void SetRunning (bool value)
 Set whether the screen is running.
int GetPanelActive (int index) const
int SetPanelActive (int index, int value)
 Set whether the panel at index is active.
SaveFileList * GetFileList (int index) const
unsigned short GetPanelResetWidgetIndex () const
void ResetPanelActivation (unsigned short widgetIndex)
 Reset panel activation and select widgetIndex.

Static Public Member Functions

static int OnReturnToMainMenu (MenuWidget *pWidget)
 Return to the main menu from another front-end screen.

Detailed Description

A screen of the front end menus.

Constructor & Destructor Documentation

◆ MenuScreen()

MenuScreen::MenuScreen ( )

Create a running screen with two lists of saved files.

Ghidra address:
BRD3D: 0x10048710
Ghidra address:
BRGlide: 0x10041b60

◆ ~MenuScreen()

virtual MenuScreen::~MenuScreen ( )
virtual

Free the lists of saved files.

Ghidra address:
BRD3D: 0x10048870
Ghidra address:
BRGlide: 0x10041cc0

Member Function Documentation

◆ OnReturnToMainMenu()

int MenuScreen::OnReturnToMainMenu ( MenuWidget * pWidget)
static

Return to the main menu from another front-end screen.

Ghidra address:
BRD3D: 0x10043fa0
Ghidra address:
BRGlide: 0x1003d4f0

◆ RunFrame()

virtual bool MenuScreen::RunFrame ( )
virtual

Run a frame of the screen, and shut the front end down once the screen stops running.

Returns
Whether the screen still runs.
Ghidra address:
BRD3D: 0x100489a0
Ghidra address:
BRGlide: 0x10041dd0

◆ ActivateMenuScreen()

virtual bool MenuScreen::ActivateMenuScreen ( )
virtual

Make the screen the one that shows.

The choices of the menus are restored, the screen is built the first time with the menu images loaded, and the screen the game returns to after a race, a time attack, or network play is entered.

Returns
False when the progress of the season is not restored, and true otherwise.
Ghidra address:
BRD3D: 0x1005ae70
Ghidra address:
BRGlide: 0x10053d20

◆ FlipAndWait()

virtual void MenuScreen::FlipAndWait ( )
virtual

Flip the frame to the display and wait for the flip to finish.

The Glide library writes g_pMenuFrameSurface to the frame buffer and shows it with g_pfnPresentFrame instead.

Ghidra address:
BRD3D: 0x10048960
Ghidra address:
BRGlide: 0x10041db0

◆ ShutdownFrontEnd()

virtual void MenuScreen::ShutdownFrontEnd ( int bPartial)
virtual

Free the cached screens of the front end.

Parameters
bPartialWhether to free only the cached screens. When false, the menu images, the root screen, and the scratch buffer are freed as well, and no screen shows afterwards.
Ghidra address:
BRD3D: 0x10048b20
Ghidra address:
BRGlide: 0x10041f50

◆ DestroyPanels()

virtual void MenuScreen::DestroyPanels ( )
virtual

Delete every widget of every panel and the panels, and put the hover back on the first item.

The pointers to the panels and their count are retained.

Ghidra address:
BRD3D: 0x10048aa0
Ghidra address:
BRGlide: 0x10041ed0

◆ ClearBackBuffer()

virtual HRESULT MenuScreen::ClearBackBuffer ( )
virtual

Clear the back buffer of the display.

The Glide library does nothing here.

Returns
0, or E_FAIL when the renderer has no device or viewport.
Ghidra address:
BRD3D: 0x1005afa0
Ghidra address:
BRGlide: 0x10053e60

◆ GetBuildCallback()

auto MenuScreen::GetBuildCallback ( ) const
inline
Returns
The callback that builds the screen.

◆ SetBuildCallback()

void MenuScreen::SetBuildCallback ( int(* callback )(MenuScreen *))
inline

Set the callback that builds the screen.

◆ IsBuilt()

bool MenuScreen::IsBuilt ( ) const
inline
Returns
Whether the screen has been built.

◆ SetBuilt()

void MenuScreen::SetBuilt ( bool value)
inline

Set whether the screen has been built.

◆ GetPanelCount()

unsigned short MenuScreen::GetPanelCount ( ) const
inline
Returns
The number of panels in the screen.

◆ SetPanelCount()

unsigned short MenuScreen::SetPanelCount ( unsigned short value)
inline

Replace the number of panels in the screen.

◆ SetCurrentPanelIndex()

unsigned short MenuScreen::SetCurrentPanelIndex ( unsigned short value)
inline

Set the index of the current panel.

◆ GetPanel()

MenuPanel * MenuScreen::GetPanel ( int index) const
inline
Returns
The panel at index.

◆ SetPanel()

MenuPanel * MenuScreen::SetPanel ( int index,
MenuPanel * panel )
inline

Replace the panel at index.

◆ GetCurrentPanel()

MenuPanel * MenuScreen::GetCurrentPanel ( ) const
inline
Returns
The current panel.

◆ IsRunning()

bool MenuScreen::IsRunning ( ) const
inline
Returns
Whether the screen is running.

◆ SetRunning()

void MenuScreen::SetRunning ( bool value)
inline

Set whether the screen is running.

◆ GetPanelActive()

int MenuScreen::GetPanelActive ( int index) const
inline
Returns
Whether the panel at index is active.

◆ SetPanelActive()

int MenuScreen::SetPanelActive ( int index,
int value )
inline

Set whether the panel at index is active.

◆ GetFileList()

SaveFileList * MenuScreen::GetFileList ( int index) const
inline
Returns
The save-file list at index.

◆ GetPanelResetWidgetIndex()

unsigned short MenuScreen::GetPanelResetWidgetIndex ( ) const
inline
Returns
The widget selected when panel navigation resets.

◆ ResetPanelActivation()

void MenuScreen::ResetPanelActivation ( unsigned short widgetIndex)
inline

Reset panel activation and select widgetIndex.


The documentation for this class was generated from the following file: