Added Editor Properties widget at the top of every World Editor tab, made tons of backend changes to get it to work properly

This commit is contained in:
parax0
2016-02-07 23:48:43 -07:00
parent 8e1b66fa5a
commit a46cd5446f
49 changed files with 930 additions and 299 deletions

View File

@@ -116,12 +116,12 @@ void CScene::SetActiveArea(CGameArea *pArea)
for (u32 iLyr = 0; iLyr < NumLayers; iLyr++)
{
CScriptLayer *pLayer = mpArea->GetScriptLayer(iLyr);
u32 NumObjects = pLayer->GetNumObjects();
u32 NumObjects = pLayer->NumInstances();
mNodes[eScriptNode].reserve(mNodes[eScriptNode].size() + NumObjects);
for (u32 iObj = 0; iObj < NumObjects; iObj++)
{
CScriptObject *pObj = pLayer->ObjectByIndex(iObj);
CScriptObject *pObj = pLayer->InstanceByIndex(iObj);
CScriptNode *pNode = CreateScriptNode(pObj);
pNode->BuildLightList(mpArea);
@@ -142,9 +142,9 @@ void CScene::SetActiveArea(CGameArea *pArea)
CScriptLayer *pGenLayer = mpArea->GetGeneratorLayer();
if (pGenLayer)
{
for (u32 iObj = 0; iObj < pGenLayer->GetNumObjects(); iObj++)
for (u32 iObj = 0; iObj < pGenLayer->NumInstances(); iObj++)
{
CScriptObject *pObj = pGenLayer->ObjectByIndex(iObj);
CScriptObject *pObj = pGenLayer->InstanceByIndex(iObj);
CScriptNode *pNode = CreateScriptNode(pObj);
// Add to map

View File

@@ -191,6 +191,8 @@ void CScriptNode::Draw(FRenderOptions Options, int ComponentIndex, const SViewIn
{
glBlendFuncSeparate(GL_ONE, GL_ZERO, GL_ZERO, GL_ZERO);
glDepthMask(GL_TRUE);
CGraphics::UpdateVertexBlock();
CGraphics::UpdatePixelBlock();
CDrawUtil::DrawShadedCube(CColor::skTransparentPurple * TintColor(ViewInfo));
}
}