예제 #1
0
void MkWindowThemedNode::LoadObject(const MkDataNode& node)
{
	MkVisualPatternNode::LoadObject(node);

	// theme name
	MkHashStr themeName;
	if (node.GetDataEx(ObjKey_ThemeName, themeName, 0) && (!themeName.Empty()))
	{
		SetThemeName(themeName);
	}

	// component
	MkHashStr componentBuffer;
	if (node.GetDataEx(ObjKey_ComponentType, componentBuffer, 0) && (!componentBuffer.Empty()))
	{
		SetComponentType(MkWindowThemeData::ConvertComponentNameToType(componentBuffer));
	}
	else if (node.GetDataEx(ObjKey_CustomFormName, componentBuffer, 0) && (!componentBuffer.Empty()))
	{
		SetComponentType(MkWindowThemeData::eCT_CustomForm);
		SetCustomForm(componentBuffer);
	}

	// shadow
	bool useShadow;
	if (node.GetData(ObjKey_UseShadow, useShadow, 0))
	{
		SetShadowUsage(useShadow);
	}

	// client size
	MkFloat2 clientSize;
	if (node.GetDataEx(ObjKey_ClientSize, clientSize, 0))
	{
		SetClientSize(clientSize);
	}

	// frame type
	MkHashStr frameTypeName;
	if (node.GetDataEx(ObjKey_FrameType, frameTypeName, 0) && (!frameTypeName.Empty()))
	{
		m_FrameType = MkWindowThemeData::ConvertFrameNameToType(frameTypeName);
	}

	// form state -> default
	SetFormState(MkWindowThemeFormData::eS_Default);
}
예제 #2
0
void MkLineShape::LoadObject(const MkDataNode& node)
{
	// attribute
	node.GetData(ObjKey_Attribute, m_Attribute.m_Field, 0);

	// local vertices
	node.GetDataEx(ObjKey_LocalVertices, m_LocalVertices);

	// local depth
	node.GetData(ObjKey_LocalDepth, m_LocalDepth, 0);

	// indice
	node.GetData(ObjKey_Indice, m_Indices);

	// color
	unsigned int color;
	if (node.GetData(ObjKey_Color, color, 0))
	{
		m_Color.SetByD3DCOLOR(color);
	}
}
void MkCheckBoxControlNode::LoadObject(const MkDataNode& node)
{
	MkWindowBaseNode::LoadObject(node);

	// caption
	MkArray<MkHashStr> textName;
	if (node.GetDataEx(ObjKey_CaptionTextName, textName) && (!textName.Empty()))
	{
		MkStr caption;
		node.GetData(ObjKey_CaptionString, caption, 0);

		_SetCaption(textName, caption);
	}

	// check
	bool onCheck;
	if (node.GetData(ObjKey_OnCheck, onCheck, 0))
	{
		SetCheck(onCheck);
	}
}