Exemplo n.º 1
0
Checkbox::Checkbox( int iX, int iY, int iUnCheckedPic, int iCheckedPic, bool bChecked ) : m_bChecked( bChecked )
{PROFILE
	SetGump( CHECKBOX_CHECKED, iCheckedPic );
	SetGump( CHECKBOX_UNCHECKED, iUnCheckedPic );
	SetPosition( iX, iY );
	SetFlag( GUMPFLAG_MOVABLE, false );
}
Exemplo n.º 2
0
Checkbox::Checkbox( int iUnCheckedPic, int iCheckedPic ) : m_bChecked( false )
{PROFILE
	Control::Control();
	SetGump( CHECKBOX_CHECKED, iCheckedPic );
	SetGump( CHECKBOX_UNCHECKED, iUnCheckedPic );
	SetFlag( GUMPFLAG_MOVABLE, false );
}
Exemplo n.º 3
0
bool CGumpButton::SetGump(CGumpPtr pNormal, CGumpPtr pHover, CGumpPtr pPressed)
{
	if (!pNormal || !pHover || !pPressed) return false;

	SetGump(NORMAL, pNormal);
	SetGump(HOVER, pHover);
	SetGump(PRESSED, pPressed);

	return true;
}
Exemplo n.º 4
0
CGumpPicture::CGumpPicture(CGumpPtr pGump)
{
	SetGump(pGump);

	SetTitle("Picture");
	SetType("picture");
	
	CString strName;
	strName.Format("picture_%x", pGump ? pGump->GetGumpID() : 0);
	SetName(strName);

	AddPropertyPage( &m_page );
}
Exemplo n.º 5
0
CGumpBorder::CGumpBorder(CGumpPtr pGump) : CGumpPicture(NULL)
{
	SetGump(pGump);

	SetTitle("border");
	SetType("border");
	
	CString strName;
	strName.Format("border_%x", pGump ? pGump->GetGumpID() : 0);
	SetName(strName);

	//AddPropertyPage( &m_page );
}
Exemplo n.º 6
0
BOOL CGumpPicture::FromString( XML::Node* node )
{
	if (!CGumpEntity::FromString(node)) return FALSE;
	
	int gump=0;
	XML::Node* gump_node = node->findNode("gump");
	if (gump_node) 
		gump = GfxAtoX(gump_node->asString().c_str()); 
	
	ASSERT(GfxGetGumpDocument());
	SetGump(GfxGetGumpDocument()->LoadGump(gump),false);
	
	return TRUE;
}
Exemplo n.º 7
0
CGumpButton::CGumpButton(CGumpPtr pNormal, CGumpPtr pHover, CGumpPtr pPressed)
{
	//ASSERT(pNormal);
	SetGump(pNormal, pHover, pPressed);	
	
	SetTitle("button");
	SetType("button");
	
	CString strName;
	strName.Format("button_%x", pNormal ? pNormal->GetGumpID() : 0);
	SetName(strName);

	AddPropertyPage( &m_page );
}
CGumpPicture::CGumpPicture(CGumpPtr pGump, TYPE eType, DWORD hueId)
{
	SetGump(pGump);

	SetTitle("Picture");
	SetType("picture");
	
	CString strName;
	strName.Format("picture_%x", pGump ? pGump->GetGumpID() : 0);
	SetName(strName);

	SetPictureType(eType);
	SetHueId(hueId);

	AddPropertyPage( &m_page );
}
BOOL CGumpPicture::FromString( XML::Node* node )
{
	if (!CGumpEntity::FromString(node)) return FALSE;
	
	std::string type=m_szPictureType[FRAME];
	int gump=0,hueId=1;
	XML::Node* pic_node = node->findNode("picture");
	if (pic_node) {
		pic_node->lookupAttribute("type", type);
		pic_node->lookupAttribute("hue", hueId);
		pic_node->lookupAttribute("gump", gump); 	
	}
	
	ASSERT(GfxGetGumpDocument());
	SetPictureTypeStr(type.c_str());
	SetHueId(hueId);
	SetGump(GfxGetGumpDocument()->GetGump(gump),false);
	
	return TRUE;
}