void MkBodyFrameControlNode::_SetBodyFrame
(const MkHashStr& themeName, MkWindowThemeData::eComponentType componentType, const MkHashStr& customFormName,
 bool useShadow, eHangingType hangingType, const MkFloat2& clientSize)
{
	SetThemeName(themeName);

	if (componentType == MkWindowThemeData::eCT_CustomForm)
	{
		SetCustomForm(customFormName);
	}
	else
	{
		SetComponentType(componentType);
	}

	SetFormState(MkWindowThemeFormData::eS_Default);
	SetShadowUsage(useShadow);

	m_HangingType = hangingType;
	SetClientSize(clientSize);

	SetLocalDepth(0.1f); // title과 겹치는 것을 피하기 위해 0.1f만큼 뒤에 위치

	_ApplyHangingType();
}
Beispiel #2
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);
}