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

Method SetTopMostWidget

CryGame/ScriptObjectUI.cpp:1494–1524  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1492
1493//-------------------------------------------------------------------------------------------------
1494int CScriptObjectUI::SetTopMostWidget(IFunctionHandler *pH)
1495{
1496 CHECK_SCRIPT_FUNCTION_PARAMCOUNT(m_pScriptSystem, "UI", SetTopMostWidget, 1);
1497 CHECK_SCRIPT_FUNCTION_PARAMTYPE2(m_pScriptSystem, "UI", SetTopMostWidget, 1, svtString, svtObject);
1498
1499 CUIWidget *pWidget;
1500
1501 if (pH->GetParamType(1) == svtString)
1502 {
1503 char *szWidgetName;
1504
1505 pH->GetParam(1, szWidgetName);
1506
1507 pWidget = m_pUISystem->GetWidget(szWidgetName);
1508 }
1509 else if (pH->GetParamType(1) == svtObject)
1510 {
1511 IScriptObject *pScriptObject = 0;
1512
1513 pH->GetParam(1, pScriptObject);
1514
1515 pWidget = (CUIWidget *)pScriptObject->GetNativeData();
1516 }
1517
1518 if (pWidget)
1519 {
1520 m_pUISystem->SetTopMostWidget(pWidget);
1521 }
1522
1523 return pH->EndFunctionNull();
1524}
1525
1526//-------------------------------------------------------------------------------------------------
1527int CScriptObjectUI::GetTopMostWidget(IFunctionHandler *pH)

Callers

nothing calls this directly

Calls 5

GetParamTypeMethod · 0.80
GetNativeDataMethod · 0.80
EndFunctionNullMethod · 0.80
GetParamMethod · 0.45
GetWidgetMethod · 0.45

Tested by

no test coverage detected