MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / CreateScreenFromTable

Method CreateScreenFromTable

CryGame/ScriptObjectUI.cpp:1753–1779  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1751
1752//-------------------------------------------------------------------------------------------------
1753int CScriptObjectUI::CreateScreenFromTable(IFunctionHandler *pH)
1754{
1755 CHECK_SCRIPT_FUNCTION_PARAMCOUNT(m_pScriptSystem, "UI", CreateScreenFromTable, 2);
1756 CHECK_SCRIPT_FUNCTION_PARAMTYPE(m_pScriptSystem, "UI", CreateScreenFromTable, 1, svtString);
1757 CHECK_SCRIPT_FUNCTION_PARAMTYPE(m_pScriptSystem, "UI", CreateScreenFromTable, 2, svtObject);
1758
1759 char *szName;
1760 IScriptObject *pObject = m_pScriptSystem->CreateEmptyObject();;
1761
1762 pH->GetParam(1, szName);
1763 pH->GetParam(2, pObject);
1764
1765 CUIScreen *pScreen;
1766
1767 if (!m_pUISystem->CreateScreenFromTable(&pScreen, szName, pObject))
1768 {
1769 pObject->Release();
1770
1771 m_pLog->LogToConsole("\001$4[Error]:$1 Failed to create screen '%s'...", szName);
1772
1773 return pH->EndFunctionNull();
1774 }
1775
1776 pObject->Release();
1777
1778 return pH->EndFunction(pScreen->GetScriptObject());
1779}
1780
1781//-------------------------------------------------------------------------------------------------
1782int CScriptObjectUI::GetScreenCount(IFunctionHandler *pH)

Callers

nothing calls this directly

Calls 7

CreateEmptyObjectMethod · 0.80
EndFunctionNullMethod · 0.80
EndFunctionMethod · 0.80
GetParamMethod · 0.45
ReleaseMethod · 0.45
LogToConsoleMethod · 0.45
GetScriptObjectMethod · 0.45

Tested by

no test coverage detected