Pyrogenesis trunk
Public Member Functions | Public Attributes | List of all members
CGUIManager::SGUIPage Struct Reference

Public Member Functions

 SGUIPage (const CStrW &pageName, const Script::StructuredClone initData)
 Initializes the data that will be used to create the CGUI page one or multiple times (hotloading). More...
 
void LoadPage (ScriptContext &scriptContext)
 Create the CGUI with it's own ScriptInterface. More...
 
JS::Value ReplacePromise (ScriptInterface &scriptInterface)
 A new promise gets set. More...
 
void ResolvePromise (Script::StructuredClone args)
 Execute the stored callback function with the given arguments. More...
 

Public Attributes

std::wstring m_Name
 
std::unordered_set< VfsPathinputs
 
Script::StructuredClone initData
 
std::shared_ptr< CGUIgui
 
std::shared_ptr< JS::PersistentRootedObject > callbackFunction
 Function executed by this parent GUI page when the child GUI page it pushed is popped. More...
 

Constructor & Destructor Documentation

◆ SGUIPage()

CGUIManager::SGUIPage::SGUIPage ( const CStrW &  pageName,
const Script::StructuredClone  initData 
)

Initializes the data that will be used to create the CGUI page one or multiple times (hotloading).

Member Function Documentation

◆ LoadPage()

void CGUIManager::SGUIPage::LoadPage ( ScriptContext scriptContext)

Create the CGUI with it's own ScriptInterface.

Deletes the previous CGUI if it existed.

◆ ReplacePromise()

JS::Value CGUIManager::SGUIPage::ReplacePromise ( ScriptInterface scriptInterface)

A new promise gets set.

A reference to that promise is returned. The promise will settle when the page is closed.

◆ ResolvePromise()

void CGUIManager::SGUIPage::ResolvePromise ( Script::StructuredClone  args)

Execute the stored callback function with the given arguments.

Member Data Documentation

◆ callbackFunction

std::shared_ptr<JS::PersistentRootedObject> CGUIManager::SGUIPage::callbackFunction

Function executed by this parent GUI page when the child GUI page it pushed is popped.

Notice that storing it in the SGUIPage instead of CGUI means that it will survive the hotloading CGUI reset.

◆ gui

std::shared_ptr<CGUI> CGUIManager::SGUIPage::gui

◆ initData

Script::StructuredClone CGUIManager::SGUIPage::initData

◆ inputs

std::unordered_set<VfsPath> CGUIManager::SGUIPage::inputs

◆ m_Name

std::wstring CGUIManager::SGUIPage::m_Name

The documentation for this struct was generated from the following files: