forked from perilouswithadollarsign/cstrike15_src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObjectPage.cpp
76 lines (57 loc) · 2.02 KB
/
ObjectPage.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#include "stdafx.h"
#include "hammer.h"
#include "ObjectPage.h"
#include "GlobalFunctions.h"
#include "ObjectProperties.h"
//
// Used to indicate multiselect of entities with different keyvalues.
//
char *CObjectPage::VALUE_DIFFERENT_STRING = "(different)";
//
// Set while we are changing the page layout.
//
BOOL CObjectPage::s_bRESTRUCTURING = FALSE;
IMPLEMENT_DYNCREATE(CObjectPage, CPropertyPage)
//-----------------------------------------------------------------------------
// Purpose: stores whether or not this page can be updated
// Input : Mode - unused
// pData - unused
// bCanEdit - the edit state
//-----------------------------------------------------------------------------
void CObjectPage::UpdateData( int Mode, PVOID pData, bool bCanEdit )
{
m_bCanEdit = bCanEdit;
}
//-----------------------------------------------------------------------------
// Purpose: Called when we become the active page.
//-----------------------------------------------------------------------------
BOOL CObjectPage::OnSetActive(void)
{
//VPROF_BUDGET( "CObjectPage::OnSetActive", "Object Properties" );
if (CObjectPage::s_bRESTRUCTURING || !GetActiveWorld())
{
return CPropertyPage::OnSetActive();
}
CObjectProperties *pParent = (CObjectProperties *)GetParent();
pParent->UpdateAnchors( this );
if (m_bFirstTimeActive)
{
m_bFirstTimeActive = false;
pParent->LoadDataForPages(pParent->GetPageIndex(this));
}
return CPropertyPage::OnSetActive();
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
PVOID CObjectPage::GetEditObject()
{
//VPROF_BUDGET( "CObjectPage::GetEditObject", "Object Properties" );
return ((CObjectProperties*) GetParent())->GetEditObject(GetEditObjectRuntimeClass());
}