Exemple #1
0
BOOL _XWindow_ZoomWindow::Initialize(_XTextureManager& texturearchive)
{
	_XSLIDERCONTROL_STRUCTURE basesliderstruct = 
	{
		TRUE,
		{50, 5}, {176, 8}, 
		_XDEF_CC_ZOOM_SLIDER,
		-1,
		-1,
		texturearchive.FindResource("cs_scrollbar.tga"),
		texturearchive.FindResource("cs_scrollbar.tga"),
		texturearchive.FindResource("cs_scrollbar.tga"),
		{0, 0}, {21, 9},
		-1, //texturearchive.FindResource("scrollbar_base.tga"),
		&texturearchive,
		" "
	};
	m_BaseSlider = new _XHSlider;
	m_BaseSlider->Create(basesliderstruct);
	m_BaseSlider->SetScale();
	m_BaseSlider->ShowWindow(TRUE);
	m_BaseSlider->SetSlidingPosition(79);
	InsertChildObject(m_BaseSlider);

	m_OriginSlidingPosition = 79;

	_XBTN_STRUCTURE leftbtn = 
	{
		TRUE, 
		{42, 5}, {8, 9},
		_XDEF_CC_ZOOM_LEFTBUTTON,
		texturearchive.FindResource("button_scrollleft_normal.tga"),
		texturearchive.FindResource("button_scrollleft_push.tga"),
		texturearchive.FindResource("button_scrollleft_highlight.tga"),
		&texturearchive
	};
	m_LeftButton = new _XButton;
	m_LeftButton->Create(leftbtn);
	m_LeftButton->setMessageMode( _BTNMESSAGEMODE_BTNDOWN );
	InsertChildObject(m_LeftButton);

	_XBTN_STRUCTURE rightbtn = 
	{
		TRUE, 
		{226, 5}, {8, 9},
		_XDEF_CC_ZOOM_RIGHTBUTTON,
		texturearchive.FindResource("button_scrollright_normal.tga"),
		texturearchive.FindResource("button_scrollright_push.tga"),
		texturearchive.FindResource("button_scrollright_highlight.tga"),
		&texturearchive
	};
	m_RightButton = new _XButton;
	m_RightButton->Create(rightbtn);
	m_RightButton->setMessageMode( _BTNMESSAGEMODE_BTNDOWN );
	InsertChildObject(m_RightButton);

	SetWindowMoveMode(_XWMOVE_FIXED);

	return TRUE;
}
Exemple #2
0
BOOL _XWindow_MatchWindow::Initialize(void)
{
	_XBTN_STRUCTURE btnstruct = 
	{
		TRUE, {50, 113}, {46, 17},
		_XDEF_MATCH_ACCEPT,
		g_MainInterfaceTextureArchive.FindResource("etcwindow_button.tga"),
		g_MainInterfaceTextureArchive.FindResource("etcwindow_button.tga"),
		g_MainInterfaceTextureArchive.FindResource("etcwindow_button.tga"),
		&g_MainInterfaceTextureArchive
	};
	m_AcceptButton = new _XButton;
	m_AcceptButton->Create(btnstruct);
	m_AcceptButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 0, 13, 47, 30);
	m_AcceptButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 0, 30, 47, 48);
	m_AcceptButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 0, 47, 47, 64);
	m_AcceptButton->SetButtonTextColor(_XSC_DEFAULT);
	m_AcceptButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_COMMON_ACCEPT);	// "수락"
	InsertChildObject(m_AcceptButton);

	btnstruct.position.x = 245;
	btnstruct.commandid = _XDEF_MATCH_REFUSE;

	m_RefuseButton = new _XButton;
	m_RefuseButton->Create(btnstruct);
	m_RefuseButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 0, 13, 47, 30);
	m_RefuseButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 0, 30, 47, 48);
	m_RefuseButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 0, 47, 47, 64);
	m_RefuseButton->SetButtonTextColor(_XSC_DEFAULT);
	m_RefuseButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_COMMON_REFUSE);	// "거절"
	InsertChildObject(m_RefuseButton);

	btnstruct.position.x = 92;
	btnstruct.position.y = 27;
	btnstruct.windowsize.cx = 13;
	btnstruct.windowsize.cy = 13;
	btnstruct.commandid = _XDEF_MATCH_DETAILINFO_CHARAC;

	m_DetailInfoButton = new _XButton;
	m_DetailInfoButton->Create(btnstruct);
	m_DetailInfoButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 0, 0, 13, 13);
	m_DetailInfoButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 13, 0, 26, 13);
	m_DetailInfoButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 26, 0, 39, 13);
	m_DetailInfoButton->SetButtonTextColor(_XSC_DEFAULT);
	m_DetailInfoButton->SetButtonText("*");//"★"
	InsertChildObject(m_DetailInfoButton);

	memset(m_FMessageString, 0, sizeof(TCHAR)*1024);
	memset(m_SMessageString, 0, sizeof(TCHAR)*1024);
	
	return TRUE;
}
Exemple #3
0
BOOL _XWindow_IME::Initialize(void)
{
	int scrollresourceindex = g_MainInterfaceTextureArchive.FindResource("MI_chat_quick.tga");
	_XLISTBOX_STRUCTURE listboxstructure = 
	{
		TRUE,								
		{ 6, 24 },							
		{ 116, 128 },						
		0,									
		-1,									
		&g_MainInterfaceTextureArchive,		
		_T(" "),							
		14,									
		9,									
		_XLSTYLE_RIGHTSCROLLBAR,			

		
		{12, 128},
		12,
		22,
		150,
		scrollresourceindex,
		scrollresourceindex,
		scrollresourceindex,
		scrollresourceindex,
		scrollresourceindex
	};

	m_pListBox = new _XListBox;
	m_pListBox->Create(listboxstructure);

	POINT coloffset = { 2, 2 };
	m_pListBox->SetColumnOffset(0, coloffset);
	m_pListBox->SetColumnStyle(0, _XLCOLUMNSTYLE_STRING);
	m_pListBox->SetAlignType(0, _XFONT_ALIGNTYPE_LEFT);
	m_pListBox->SetColumnWidth(0, 110 );
	m_pListBox->SetTrackHeight(14);
	m_pListBox->SetTrackBarColor( D3DCOLOR_ARGB(64,128,128,128) );
	m_pListBox->EnableSelectItem(FALSE);
	m_pListBox->SetAlwaysShowScrollBarMode( FALSE );

	_XVScrollBar* pScrollBar = m_pListBox->GetScrollBarObject();
	if( pScrollBar )
	{
		_XSCRBAR_IMAGECLIPRECTSTRUCTURE cliprectstructure = 
		{
			{ 0,  0, 12, 12 },
			{ 24, 0, 36, 12 },
			{ 0,  12, 12, 24 },
			{ 24, 12, 36, 24 },
			{ 40,157, 52, 179}
		};
		pScrollBar->SetClipRect( cliprectstructure );	
	}

	InsertChildObject(m_pListBox);	
	
	return TRUE;
}
Exemple #4
0
BOOL _XWindow_HelpBook::Initialize( void )
{
	// Title---------------------------------------------------------------------------------------=	
	int titleimageindex = g_MainInterfaceTextureArchive.FindResource( "MI_Main_Back01.tga" );
	
	_XImageStatic* pTitleLeftBar = new _XImageStatic;
	pTitleLeftBar->Create( 0, 0, 177, 23,
		&g_MainInterfaceTextureArchive, titleimageindex );
	pTitleLeftBar->SetClipRect( 0, 0, 177, 24 );
	InsertChildObject( pTitleLeftBar );
	
	_XImageStatic* pTitleCentertBar = new _XImageStatic;
	pTitleCentertBar->Create( 176, 0, 177+175, 23,
		&g_MainInterfaceTextureArchive, titleimageindex );
	pTitleCentertBar->SetClipRect( 79, 0, 177, 24 );
	InsertChildObject( pTitleCentertBar );

	_XImageStatic* pTitleRightBar = new _XImageStatic; 
	pTitleRightBar->Create( 451, 0, 451+177, 23,
		&g_MainInterfaceTextureArchive, titleimageindex );
	pTitleRightBar->SetClipRect( 0, 0, 177, 24 );
	pTitleRightBar->SetScale( -1, 1 );
	InsertChildObject( pTitleRightBar );

	// Button ----------------------------------------------------------------------------------------=
	int btnimageindex = g_MainInterfaceTextureArchive.FindResource( g_MI_CharTextureName );
	_XBTN_STRUCTURE closebtnstruct = { TRUE, { 429, 6 }, { 12, 12 }, _XDEF_HELPBOOK_CLOSE,
									  btnimageindex,btnimageindex,btnimageindex, 
									  &g_MainInterfaceTextureArchive };
	_XButton* pClosebutton = new _XButton;
	pClosebutton->Create( closebtnstruct );	
		
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL,  96, 238, 108, 250 );
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  108, 238, 120, 250 );
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  120, 238, 132, 250 );
	InsertChildObject( pClosebutton );

	btnimageindex = g_MainInterfaceTextureArchive.FindResource( "MI_Trade.tga" );

	#ifdef _XRUSSIAN	
	_XBTN_STRUCTURE close2btnstruct = { TRUE, { 403-15, 292 }, { 55, 17 }, _XDEF_HELPBOOK_CLOSE,
BOOL _XWindow_PartyMasterMiniBar::Initialize( void )
{
	int partyresourceindex = g_MainInterfaceTextureArchive.FindResource( "mi_party.tga" );
	int charinforesourceindex = g_MainInterfaceTextureArchive.FindResource( g_MI_CharTextureName );
	int chattingbuttonindex = g_MainInterfaceTextureArchive.FindResource( "MI_chat_quick.tga" );
		
#ifdef _XDEF_PARTY_NOTAVAILABLE
	// 동행 행수창 바탕 이미지 ( 179 X 56 ) 
	m_imagePartyMasterBorder = new _XImageStatic;
	m_imagePartyMasterBorder->Create( 0, 0, 179, 56, &g_MainInterfaceTextureArchive, g_MainInterfaceTextureArchive.FindResource("mi_party2.tga") );
	m_imagePartyMasterBorder->SetClipRect(0, 0, 180, 57);
	m_imagePartyMasterBorder->ShowWindow(TRUE);
	InsertChildObject( m_imagePartyMasterBorder );
#else
	// 동행 행수창 바탕 이미지 ( 165 X 56 ) 
	m_imagePartyMasterBorder = new _XImageStatic;
	m_imagePartyMasterBorder->Create( 0, 0, 165, 56, &g_MainInterfaceTextureArchive, partyresourceindex );
	m_imagePartyMasterBorder->SetClipRect(0, 0, 165, 56);
	m_imagePartyMasterBorder->ShowWindow(TRUE);
	InsertChildObject( m_imagePartyMasterBorder );
#endif
	
	// 동행 행수창 축소시 바탕 이미지 ( 165 X 36 ) 
	m_imagePartyMasterMinimizeBorder = new _XImageStatic;
	m_imagePartyMasterMinimizeBorder->Create( 0, 0, 165, 36, &g_MainInterfaceTextureArchive, partyresourceindex );
	m_imagePartyMasterMinimizeBorder->SetClipRect(0, 106, 165, 142);
	m_imagePartyMasterMinimizeBorder->ShowWindow(FALSE);
	InsertChildObject( m_imagePartyMasterMinimizeBorder );
	
	//동행 행수창 축소 버튼 ( 12 X 12 ) 
	_XBTN_STRUCTURE minimizestruct = { TRUE, { 134, 4 }, { 12, 12 }, _XDEF_MINIPARTYWINDOW_MINIMIZEBUTTON,
		charinforesourceindex,charinforesourceindex,charinforesourceindex, 
		&g_MainInterfaceTextureArchive };
	m_btnPartyMasterMinimize = new _XButton;
	m_btnPartyMasterMinimize->Create( minimizestruct );		
	m_btnPartyMasterMinimize->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 155, 212, 167, 224);
	m_btnPartyMasterMinimize->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  167, 212, 179, 224 );
	m_btnPartyMasterMinimize->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  179, 212, 191, 224 );
	m_btnPartyMasterMinimize->ShowWindow(TRUE);
	m_btnPartyMasterMinimize->SetCallBackFunction_ToolTip( _XCallback_Minimize );
	InsertChildObject( m_btnPartyMasterMinimize );
	
	//동행 행수창 확대 버튼 ( 12 X 12 ) 
	_XBTN_STRUCTURE maximizestruct = { TRUE, { 134, 4 }, { 12, 12 }, _XDEF_MINIPARTYWINDOW_MAXIMIZEBUTTON,
		partyresourceindex,partyresourceindex,partyresourceindex, 
		&g_MainInterfaceTextureArchive };
	m_btnPartyMasterMaximize = new _XButton;
	m_btnPartyMasterMaximize->Create( maximizestruct );		
	m_btnPartyMasterMaximize->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 167, 2, 179, 14);
	m_btnPartyMasterMaximize->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  179, 2, 191, 14 );
	m_btnPartyMasterMaximize->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  191, 2, 203, 14 );
	m_btnPartyMasterMaximize->ShowWindow(FALSE);
	m_btnPartyMasterMaximize->SetCallBackFunction_ToolTip( _XCallback_Maximize );
	InsertChildObject( m_btnPartyMasterMaximize );
	
	// 동행 행수창 닫기 버튼	 ( 12 X 12 ) 
	_XBTN_STRUCTURE closebtnstruct = { TRUE, { 147, 4 }, { 12, 12 }, m_CloseButtoncommandid,
		charinforesourceindex,charinforesourceindex,charinforesourceindex, 
		&g_MainInterfaceTextureArchive };
	m_btnPartyMasterClose = new _XButton;
	m_btnPartyMasterClose->Create( closebtnstruct );	
	m_btnPartyMasterClose->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL,  96, 238, 108, 250 );
	m_btnPartyMasterClose->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  108, 238, 120, 250 );
	m_btnPartyMasterClose->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  120, 238, 132, 250 );
	m_btnPartyMasterClose->ShowWindow(TRUE);
	m_btnPartyMasterClose->SetCallBackFunction_ToolTip( _XCallback_Close );
	InsertChildObject( m_btnPartyMasterClose );
	
	
	// 동행 행수창 체력 게이지 ( 130 X 5)
	_XSTICKGAUGE_STRUCTURE	gaugestruct = 
	{
		TRUE, { 30, 20 }, { 130, 5 },	
			partyresourceindex, -1, &g_MainInterfaceTextureArchive, 
	};
	
	m_pPartyMasterLifePowerGauge = new _XStickGauge;
	m_pPartyMasterLifePowerGauge->Create( gaugestruct );	
	m_pPartyMasterLifePowerGauge->SetImageClipRect( _XGAUGEIMAGE_BORDER,  3,  58, 133,  63 );
	m_pPartyMasterLifePowerGauge->SetFactorDraw(TRUE);	
	InsertChildObject( m_pPartyMasterLifePowerGauge );
	
	// 동행 행수창 진기 게이지 ( 130 X 5)
	gaugestruct.position.y = 27;
	m_pPartyMasterForcePowerGauge = new _XStickGauge;
	m_pPartyMasterForcePowerGauge->Create( gaugestruct );	
	m_pPartyMasterForcePowerGauge->SetImageClipRect( _XGAUGEIMAGE_BORDER,  3,  65, 133,  70 );
	m_pPartyMasterForcePowerGauge->SetFactorDraw(TRUE);	
	InsertChildObject( m_pPartyMasterForcePowerGauge );

		
	//동행 행수창 경험치 분배 버튼 ( 12 X 12 ) 
	_XBTN_STRUCTURE experiencestruct = { TRUE, { 69, 38 }, { 12, 12 }, _XDEF_MINIPARTYWINDOW_EXPSHARINGBUTTON,
		chattingbuttonindex,chattingbuttonindex,chattingbuttonindex, 
		&g_MainInterfaceTextureArchive };
	m_btnPartyExperienceSharing = new _XButton;
	m_btnPartyExperienceSharing->Create( experiencestruct );		
	m_btnPartyExperienceSharing->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 0,  12, 12, 24 );
	m_btnPartyExperienceSharing->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  12, 12, 24, 24 );
	m_btnPartyExperienceSharing->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  24, 12, 36, 24 );
	m_btnPartyExperienceSharing->ShowWindow(TRUE);
	m_btnPartyExperienceSharing->EnableWindow(FALSE);
	InsertChildObject( m_btnPartyExperienceSharing );
	
	//동행 행수창 아이템 분배 버튼 ( 12 X 12 ) 
	_XBTN_STRUCTURE itemstruct = { TRUE, { 148, 38 }, { 12, 12 }, _XDEF_MINIPARTYWINDOW_ITEMSHARINGBUTTON,
		chattingbuttonindex,chattingbuttonindex,chattingbuttonindex, 
		&g_MainInterfaceTextureArchive };
	m_btnPartyItemSharing = new _XButton;
	m_btnPartyItemSharing->Create( itemstruct );		
	m_btnPartyItemSharing->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 0,  12, 12, 24 );
	m_btnPartyItemSharing->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  12, 12, 24, 24 );
	m_btnPartyItemSharing->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  24, 12, 36, 24 );
	m_btnPartyItemSharing->ShowWindow(TRUE);
	m_btnPartyItemSharing->EnableWindow(FALSE);

	//m_btnPartyItemSharing->ShowWindow(TRUE);
	//m_btnPartyItemSharing->EnableWindow(FALSE);
	InsertChildObject( m_btnPartyItemSharing );
	
	
	// 위험 표시 이미지 ( 39 X 32 )
	for(int i = 0 ; i < 3 ; i++)
	{
		m_pPartyMasterDanger[i] = new _XImageStatic;
		m_pPartyMasterDanger[i]->Create(0, 0, 39, 32, &g_MainInterfaceTextureArchive, partyresourceindex);
	}
	m_pPartyMasterDanger[0]->SetClipRect(0, 71, 39, 103);
	m_pPartyMasterDanger[1]->SetClipRect(40, 71, 79, 103);
	m_pPartyMasterDanger[2]->SetClipRect(81, 71, 120, 103);	
	
	// ---------------------------------------------------------------------------------------------------------------------=		
	// 경험치 분배 설정에 사용될 리스트 박스
	_XLISTBOX_STRUCTURE sharingstructure = 
	{
		TRUE,											// 윈도우 활성화
		{ 2, 53 },										// 윈도우 좌표
		{ 80, 38 },										// 윈도우 사이즈
		_XDEF_MINIPARTYWINDOW_EXPSHAERINGLISTBOX,		// 윈도우 command 아이디
		-1,												// 윈도우 border image
		&g_MainInterfaceTextureArchive,					// Texture list
		_T(" "),										// 윈도우 타이틀
		19,												// 리스트 아이템 라인 피치
		2,												// 리스트 박스에 보이는 최대 라인수
		_XLSTYLE_NOSCROLLBAR,							// 스크롤바의 위치
	};
	m_listboxPartyExperienceSharing = new _XListBox;
	m_listboxPartyExperienceSharing->Create(sharingstructure);
	
	POINT columnoffset1 = { 10, 3 };
	m_listboxPartyExperienceSharing->SetColumnOffset(0, columnoffset1);			// column offset	
	m_listboxPartyExperienceSharing->SetColumnStyle(0, _XLCOLUMNSTYLE_STRING);		// column style (아이콘)	
	m_listboxPartyExperienceSharing->SetAlignType(0, _XFONT_ALIGNTYPE_LEFT);		// column align type
	m_listboxPartyExperienceSharing->SetColumnWidth(0, 80);						// column width (column offset과 맞지 않거나 부족해도 상관없음)
	
	m_listboxPartyExperienceSharing->SetBorderColorFactor( 0xB1000000 );
	m_listboxPartyExperienceSharing->SetSelectedImagePosition(0, 3);
	m_listboxPartyExperienceSharing->SetSelectedImageHeight(19);
	m_listboxPartyExperienceSharing->SetTrackWidth(70);
	m_listboxPartyExperienceSharing->SetTrackHeight(19);
	
	for( i = 0; i < 2; i++ )
	{
		m_listboxPartyExperienceSharing->InsertListItem(_T(""), 0, i+1);		
		
		m_listboxPartyExperienceSharing->SetItemText(i, 0, g_stringExperienceSharingForm[i+1]);
		m_listboxPartyExperienceSharing->SetItemAttrib(i, 0, _XSC_DEFAULT);
		m_listboxPartyExperienceSharing->SetItemAttribHighlight(i, 0, _XSC_DEFAULT_HIGHLIGHT);		
	}
	m_listboxPartyExperienceSharing->ShowWindow(FALSE);
	InsertChildObject(m_listboxPartyExperienceSharing);
	
	// ---------------------------------------------------------------------------------------------------------------------=		
	// 아이템 분배 설정에 사용될 리스트 박스
	_XLISTBOX_STRUCTURE itemsharingstructure = 
	{
		TRUE,											// 윈도우 활성화
		{ 83, 53 },										// 윈도우 좌표
		{ 80, 38 },										// 윈도우 사이즈 -> 나중에 38-> 57 변경예정
		_XDEF_MINIPARTYWINDOW_ITEMSHAERINGLISTBOX,		// 윈도우 command 아이디
		-1,												// 윈도우 border image
		&g_MainInterfaceTextureArchive,					// Texture list
		_T(" "),										// 윈도우 타이틀
		19,												// 리스트 아이템 라인 피치
		3,												// 리스트 박스에 보이는 최대 라인수
		_XLSTYLE_NOSCROLLBAR,							// 스크롤바의 위치
	};
	m_listboxPartyItemSharing = new _XListBox;
	m_listboxPartyItemSharing->Create(itemsharingstructure);
	
	POINT itemcolumnoffset1 = { 10, 3 };
	m_listboxPartyItemSharing->SetColumnOffset(0, itemcolumnoffset1);			// column offset	
	m_listboxPartyItemSharing->SetColumnStyle(0, _XLCOLUMNSTYLE_STRING);		// column style (아이콘)	
	m_listboxPartyItemSharing->SetAlignType(0, _XFONT_ALIGNTYPE_LEFT);		// column align type
	m_listboxPartyItemSharing->SetColumnWidth(0, 80);						// column width (column offset과 맞지 않거나 부족해도 상관없음)
	
	m_listboxPartyItemSharing->SetBorderColorFactor( 0xB1000000 );
	m_listboxPartyItemSharing->SetSelectedImagePosition(0, 3);
	m_listboxPartyItemSharing->SetSelectedImageHeight(19);
	m_listboxPartyItemSharing->SetTrackWidth(70);
	m_listboxPartyItemSharing->SetTrackHeight(19);
	
	for( i = 0; i < 2; i++ ) 
	{
		m_listboxPartyItemSharing->InsertListItem(_T(""), 0, i+1);		
		
		m_listboxPartyItemSharing->SetItemText(i, 0, g_stringItemSharingForm[i+1]);
		m_listboxPartyItemSharing->SetItemAttrib(i, 0, _XSC_DEFAULT);
		m_listboxPartyItemSharing->SetItemAttribHighlight(i, 0, _XSC_DEFAULT_HIGHLIGHT);		
	}
	m_listboxPartyItemSharing->ShowWindow(FALSE);
	InsertChildObject(m_listboxPartyItemSharing);
	


	memset( m_PartyMasterName, 0, sizeof(TCHAR) * _XDEF_MAX_USERNAMESTRINGLENGTH );

#ifdef _XTS_TARGET_STATE
	for(i = 0 ; i < 32 ; i++)
	{
		m_StateImage[i].Create(0, 0, 30, 30, &g_MainInterfaceTextureArchive, -1);
	}
#endif

#ifdef _XDEF_PARTY_NOTAVAILABLE
	m_pFarActionIcon = new _XImageStatic;
	m_pFarActionIcon->Create(0, 0, 11, 11, &g_MainInterfaceTextureArchive, partyresourceindex);
	m_pFarActionIcon->SetClipRect(192, 36, 203, 47);

	m_pOutActionIcon = new _XImageStatic;
	m_pOutActionIcon->Create(0, 0, 11, 11, &g_MainInterfaceTextureArchive, partyresourceindex);
	m_pOutActionIcon->SetClipRect(192, 36, 203, 47);
#endif
	
#ifdef _XDEF_INTERFACE_RENEWAL_071002_KUKURI
	m_pClassIcon = new _XImageStatic;
	m_pClassIcon->Create(0, 0, 30, 30, &g_MainInterfaceTextureArchive, g_MainInterfaceTextureArchive.FindResource("skill_icon_08_02.tga"));
	m_pClassIcon->SetClipRect(2, 2, 32, 32);
	//m_pClassIcon->SetScale( 0.5f, 0.5f );

	m_pClassBorderIcon = new _XImageStatic;
	m_pClassBorderIcon->Create(0, 0, 44, 48, &g_MainInterfaceTextureArchive, g_MainInterfaceTextureArchive.FindResource("MI_Char_01.tga"));
	m_pClassBorderIcon->SetClipRect(153, 121, 196, 168);
#endif

	return TRUE;
}
Exemple #6
0
BOOL _XWindow_Rebirth::Initialize(void)
{
	int resourceindex = g_MainInterfaceTextureArchive.FindResource("mi_death01.tga");

	_XImageStatic* pTitleLeftBar = new _XImageStatic;
	pTitleLeftBar->Create(0, 0, 212, 18, &g_MainInterfaceTextureArchive, resourceindex);
	pTitleLeftBar->SetClipRect(0, 0, 212, 18);
	InsertChildObject(pTitleLeftBar);

	int charinfointerface = g_MainInterfaceTextureArchive.FindResource(g_MI_CharTextureName);	
	_XBTN_STRUCTURE btnstruct = 
	{
		TRUE, 
		{5, 20},
		{202, 22},
		_XDEF_REBIRTHWINDOW_TOWN,
		resourceindex,
		resourceindex,
		resourceindex,
		&g_MainInterfaceTextureArchive
	};
	m_TownButton = new _XButton;
	m_TownButton->Create(btnstruct);
	m_TownButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 2, 19, 204, 41);
	m_TownButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 2, 42, 204, 64);
	m_TownButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 2, 65, 204, 87);
	m_TownButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 233, 231, 232));
	m_TownButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_REBIRTH_TOWN);	// "마을에서 소생합니다."
	InsertChildObject(m_TownButton);
	
	btnstruct.position.y = 43;
	btnstruct.commandid = _XDEF_REBIRTHWINDOW_SAVEPOINT;
	m_SavePointButton = new _XButton;
	m_SavePointButton->Create(btnstruct);
	m_SavePointButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 2, 19, 204, 41);
	m_SavePointButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 2, 42, 204, 64);
	m_SavePointButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 2, 65, 204, 87);
	m_SavePointButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 233, 231, 232));
	InsertChildObject(m_SavePointButton);

	btnstruct.position.y = 66;
	btnstruct.commandid = _XDEF_REBIRTHWINDOW_FIELD;
	m_FieldButton = new _XButton;
	m_FieldButton->Create(btnstruct);
	m_FieldButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 2, 19, 204, 41);
	m_FieldButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 2, 42, 204, 64);
	m_FieldButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 2, 65, 204, 87);
	m_FieldButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 233, 231, 232));
	m_FieldButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_REBIRTH_THIS);	// "이 자리에서 소생합니다."
	InsertChildObject(m_FieldButton);
	
	btnstruct.position.y = 89;
	btnstruct.commandid = _XDEF_REBIRTHWINDOW_USEITEM;
	m_UseItemButton = new _XButton;
	m_UseItemButton->Create(btnstruct);
	m_UseItemButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 2, 19, 204, 41);
	m_UseItemButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 2, 42, 204, 64);
	m_UseItemButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 2, 65, 204, 87);
	m_UseItemButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 204, 187, 51));
	m_UseItemButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_REBIRTH_2571);
	m_UseItemButton->ShowWindow(FALSE);
	InsertChildObject(m_UseItemButton);

/*	btnstruct.position.y = 112;
	btnstruct.commandid = _XDEF_REBIRTHWINDOW_INCB;
	m_InCBButton = new _XButton;
	m_InCBButton->Create(btnstruct);
	m_InCBButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 2, 19, 204, 41);
	m_InCBButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 2, 42, 204, 64);
	m_InCBButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 2, 65, 204, 87);
	m_InCBButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 233, 231, 232));
//	m_InCBButton->SetButtonText("게임을 종료합니다.");
	InsertChildObject(m_InCBButton);*/

#ifdef _ACCLAIM_IGAADSYSTEM
	btnstruct.position.y = 135;
	btnstruct.commandid = _XDEF_REBIRTHWINDOW_ACCLAIMVIDEOAD;
	m_AcclaimAdVideoButton = new _XButton;
	m_AcclaimAdVideoButton->Create(btnstruct);
	m_AcclaimAdVideoButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 2, 19, 204, 41);
	m_AcclaimAdVideoButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 2, 42, 204, 64);
	m_AcclaimAdVideoButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 2, 65, 204, 87);	
	m_AcclaimAdVideoButton->SetButtonText( _T("WATCH & WIN: 15 sec video ad") );
	m_AcclaimAdVideoButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 204, 187, 51));	
	m_AcclaimAdVideoButton->SetButtonTextHighlightColor( 0xFFFFFF00 );
	m_AcclaimAdVideoButton->SetGrowTextMode( FALSE );
	m_AcclaimAdVideoButton->ShowWindow(FALSE);
	InsertChildObject(m_AcclaimAdVideoButton);
#endif
	
	for(int i = 0 ; i < 2 ; i++)
	{
		m_CornerImage[i].Create(0, 0, 3, 3, &g_MainInterfaceTextureArchive, resourceindex);
	}
	m_CornerImage[0].SetClipRect(213, 0, 216, 3);
	m_CornerImage[1].SetClipRect(217, 0, 220, 3);

	return TRUE;
}
Exemple #7
0
BOOL _XWindow_NPCBuff::Initialize()
{
	int mainframeinterface = g_MainInterfaceTextureArchive.FindResource("MI_main_back01.tga");
	
	_XImageStatic* pTitleLeftBar = new _XImageStatic;
	pTitleLeftBar->Create(0, 0, 180, 18, &g_MainInterfaceTextureArchive, mainframeinterface);
	pTitleLeftBar->SetClipRect(0, 125, 180, 143);
	InsertChildObject(pTitleLeftBar);
	
	_XImageStatic* pTitleCenterBar = new _XImageStatic;
	pTitleCenterBar->Create(180, 0, 282, 18, &g_MainInterfaceTextureArchive, mainframeinterface);
	pTitleCenterBar->SetClipRect(77, 125, 180, 143);
	InsertChildObject(pTitleCenterBar);
	
	_XImageStatic* pTitleRightBar = new _XImageStatic;
	pTitleRightBar->Create(282, 0, 365, 18, &g_MainInterfaceTextureArchive, mainframeinterface);
	pTitleRightBar->SetClipRect(99, 125, 183, 143);
	InsertChildObject(pTitleRightBar);
	
	m_BorderTitle.Create(m_WindowPosition.x+1, m_WindowPosition.y+18, m_WindowPosition.x+365, m_WindowPosition.y+268);
	m_BorderTitle.SetTexture(&g_MainInterfaceTextureArchive, g_MainInterfaceTextureArchive.FindResource("MI_BorderTile.tga"));
	m_BorderTitle.SetFaceColor(D3DCOLOR_ARGB(128, 255, 255, 255));
	
	FLOAT ufactor = 364.0f/128.0f;
	FLOAT vfactor = 250.0f/128.0f;
	
	m_BorderTitle.ChangeUV(0.0f, ufactor, ufactor, 0.0f, 0.0f, 0.0f, vfactor, vfactor);
	
	_XImageStatic* pLeftBorder_1 = new _XImageStatic;
	pLeftBorder_1->Create(0, 17, 2, 48, &g_MainInterfaceTextureArchive, mainframeinterface);
	pLeftBorder_1->SetClipRect(0, 195, 3, 227);
	pLeftBorder_1->SetScale(1.0f, 7.2f);
	InsertChildObject(pLeftBorder_1);
	
	_XImageStatic* pRightBorder_1 = new _XImageStatic;
	pRightBorder_1->Create(363, 17, 365, 48, &g_MainInterfaceTextureArchive, mainframeinterface);
	pRightBorder_1->SetClipRect(0, 195, 3, 227);
	pRightBorder_1->SetScale(1.0f, 7.2f);
	InsertChildObject(pRightBorder_1);
	
	_XImageStatic* pLeftCorner = new _XImageStatic;
	pLeftCorner->Create(0, 245, 2, 269, &g_MainInterfaceTextureArchive, mainframeinterface);
	pLeftCorner->SetClipRect(0, 205, 3, 230);
	InsertChildObject(pLeftCorner);
	
	_XImageStatic* pRightCorner = new _XImageStatic;
	pRightCorner->Create(363, 245, 365, 269, &g_MainInterfaceTextureArchive, mainframeinterface);
	pRightCorner->SetClipRect(180, 205, 183, 230);
	InsertChildObject(pRightCorner);
	
	_XImageStatic* pBottomBorder = new _XImageStatic;
	pBottomBorder->Create(3, 267, 179, 269, &g_MainInterfaceTextureArchive, mainframeinterface);
	pBottomBorder->SetClipRect(3, 227, 180, 230);
	pBottomBorder->SetScale(2.033f, 1.0f);
	InsertChildObject(pBottomBorder);
	
	int charinfointerface = g_MainInterfaceTextureArchive.FindResource( g_MI_CharTextureName );
	_XBTN_STRUCTURE closebtnstruct = { TRUE, { 349, 2 }, { 12, 12 }, _XDEF_NPCBUFF_CLOSE,
		charinfointerface,charinfointerface,charinfointerface, 
		&g_MainInterfaceTextureArchive };
	_XButton* pClosebutton = new _XButton;
	pClosebutton->Create( closebtnstruct );	
	
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL,  96, 238, 108, 250 );
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  108, 238, 120, 250 );	
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  120, 238, 132, 250 );
	InsertChildObject( pClosebutton );

	int skillresourceindex = g_MainInterfaceTextureArchive.FindResource("mi_skillwin.tga");

	_XBTN_STRUCTURE btnstruct = 
	{
		TRUE, {241, 235}, {108, 23}, _XDEF_NPCBUFF_APPLY,
		skillresourceindex,
		skillresourceindex,
		skillresourceindex,
		&g_MainInterfaceTextureArchive
	};
	_XButton* pApplyBtn = new _XButton;
	pApplyBtn->Create(btnstruct);
	pApplyBtn->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 2, 176, 110, 199);
	pApplyBtn->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 2, 152, 110, 175);
	pApplyBtn->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 2, 201, 110, 224);
	pApplyBtn->SetGrowTextMode(TRUE);
	pApplyBtn->SetButtonTextColor(0xFFCBCBCB);
	pApplyBtn->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_NPCBUFF_2533);
	pApplyBtn->ShowWindow(TRUE);
	InsertChildObject(pApplyBtn);

	_XImageStatic* pMoneyIcon = new _XImageStatic;
	pMoneyIcon->Create(111, 240, 126, 252, &g_MainInterfaceTextureArchive, mainframeinterface);
	pMoneyIcon->SetClipRect(185, 6, 200, 18);
	InsertChildObject(pMoneyIcon);

	int borderresourceindex = g_MainInterfaceTextureArchive.FindResource("MI_Premium.tga");

	_XImageStatic* pBorder_1 = new _XImageStatic;
	pBorder_1->Create(15, 24, 269, 70, &g_MainInterfaceTextureArchive, borderresourceindex);
	pBorder_1->SetClipRect(2, 42, 256, 88);
	InsertChildObject(pBorder_1);

	_XImageStatic* pBorder_2 = new _XImageStatic;
	pBorder_2->Create(269, 24, 325, 70, &g_MainInterfaceTextureArchive, borderresourceindex);
	pBorder_2->SetClipRect(0, 92, 56, 138);
	InsertChildObject(pBorder_2);

	_XImageStatic* pBorder_3 = new _XImageStatic;
	pBorder_3->Create(15, 77, 269, 123, &g_MainInterfaceTextureArchive, borderresourceindex);
	pBorder_3->SetClipRect(2, 42, 256, 88);
	InsertChildObject(pBorder_3);
	
	_XImageStatic* pBorder_4 = new _XImageStatic;
	pBorder_4->Create(269, 77, 325, 123, &g_MainInterfaceTextureArchive, borderresourceindex);
	pBorder_4->SetClipRect(0, 92, 56, 138);
	InsertChildObject(pBorder_4);

	_XImageStatic* pBorder_5 = new _XImageStatic;
	pBorder_5->Create(15, 130, 269, 176, &g_MainInterfaceTextureArchive, borderresourceindex);
	pBorder_5->SetClipRect(2, 42, 256, 88);
	InsertChildObject(pBorder_5);
	
	_XImageStatic* pBorder_6 = new _XImageStatic;
	pBorder_6->Create(269, 130, 325, 176, &g_MainInterfaceTextureArchive, borderresourceindex);
	pBorder_6->SetClipRect(0, 92, 56, 138);
	InsertChildObject(pBorder_6);

	_XImageStatic* pBorder_7 = new _XImageStatic;
	pBorder_7->Create(15, 183, 269, 229, &g_MainInterfaceTextureArchive, borderresourceindex);
	pBorder_7->SetClipRect(2, 42, 256, 88);
	InsertChildObject(pBorder_7);
	
	_XImageStatic* pBorder_8 = new _XImageStatic;
	pBorder_8->Create(269, 183, 325, 229, &g_MainInterfaceTextureArchive, borderresourceindex);
	pBorder_8->SetClipRect(0, 92, 56, 138);
	InsertChildObject(pBorder_8);

	_XImageStatic* pIconBorder_1 = new _XImageStatic;
	pIconBorder_1->Create(21, 30, 55, 64, &g_MainInterfaceTextureArchive, borderresourceindex);

	_XImageStatic* pIconBorder_2 = new _XImageStatic;
	pIconBorder_2->Create(21, 83, 55, 117, &g_MainInterfaceTextureArchive, borderresourceindex);

	_XImageStatic* pIconBorder_3 = new _XImageStatic;
	pIconBorder_3->Create(21, 136, 55, 170, &g_MainInterfaceTextureArchive, borderresourceindex);

	_XImageStatic* pIconBorder_4 = new _XImageStatic;
	pIconBorder_4->Create(21, 189, 55, 223, &g_MainInterfaceTextureArchive, borderresourceindex);

#ifdef _XDEF_INTERFACE_RENEWAL_071002_KUKURI //Author :양희왕// breif : 구룡창 사이즈 변경 되면서 이미지상 아이콘 위치도 변경
	pIconBorder_1->SetClipRect(172, 0, 206, 34);
	pIconBorder_2->SetClipRect(172, 0, 206, 34);
	pIconBorder_3->SetClipRect(172, 0, 206, 34);
	pIconBorder_4->SetClipRect(172, 0, 206, 34);
#else
	pIconBorder_1->SetClipRect(146, 0, 180, 34);
	pIconBorder_2->SetClipRect(146, 0, 180, 34);
	pIconBorder_3->SetClipRect(146, 0, 180, 34);
	pIconBorder_4->SetClipRect(146, 0, 180, 34);
#endif
	InsertChildObject(pIconBorder_1);
	InsertChildObject(pIconBorder_2);
	InsertChildObject(pIconBorder_3);
	InsertChildObject(pIconBorder_4);

	int scrollresourceindex = g_MainInterfaceTextureArchive.FindResource("mi_chat_quick.tga");
	_XLISTBOX_STRUCTURE lboxstruct = 
	{
		TRUE,
		{15, 22},
		{333, 207},
		_XDEF_NPCBUFF_LISTBOX,
		-1,
		&g_MainInterfaceTextureArchive,
		_T(""),
		46,
		4,
		_XLSTYLE_RIGHTSCROLLBAR,

		{12, 207},
		12,
		22,
		150,
		scrollresourceindex,
		scrollresourceindex,
		scrollresourceindex,
		scrollresourceindex,
		scrollresourceindex
	};
	m_lstboxBuff = new _XListBox;
	m_lstboxBuff->Create(lboxstruct);

	_XVScrollBar* pScrollBar = m_lstboxBuff->GetScrollBarObject();
	if( pScrollBar )
	{
		_XSCRBAR_IMAGECLIPRECTSTRUCTURE cliprectstructure = 
		{
			{ 0,  0, 12, 12 },
			{ 24, 0, 36, 12 },
			{ 0,  12, 12, 24 },
			{ 24, 12, 36, 24 },
			{ 40,157, 52, 179}
		};
		pScrollBar->SetClipRect( cliprectstructure );	
	}

	m_lstboxBuff->SetItemSelectDrawCallBack(NPCBuffListItemSelectDrawCallback);
	m_lstboxBuff->SetItemClickedDrawCallBack(NPCBuffListItemClickedDrawCallback);

	m_lstboxBuff->SetIconReportMode(TRUE);
	m_lstboxBuff->SetIconReportModeInfo(4, 1, 53, 310);
	m_lstboxBuff->SetTrackWidth(310);
	m_lstboxBuff->SetTrackHeight(53);

	m_lstboxBuff->SetColumnStyle(0, _XLCOLUMNSTYLE_ICONRECT);
	m_lstboxBuff->SetColumnStyle(1, _XLCOLUMNSTYLE_STRING);
	m_lstboxBuff->SetColumnStyle(2, _XLCOLUMNSTYLE_STRING);
	m_lstboxBuff->SetColumnStyle(3, _XLCOLUMNSTYLE_STRING);
	m_lstboxBuff->SetColumnStyle(4, _XLCOLUMNSTYLE_ICONRECT);
	m_lstboxBuff->SetColumnStyle(5, _XLCOLUMNSTYLE_STRING);

	POINT columnoffset0 = { 8, 10  };
	POINT columnoffset1 = { 46, 10 };
	POINT columnoffset2 = { 303, 10};
	POINT columnoffset3 = { 46, 29 };
	POINT columnoffset4 = { 221, 29};
	POINT columnoffset5 = { 303, 29};

	m_lstboxBuff->SetColumnOffset(0, columnoffset0);
	m_lstboxBuff->SetColumnOffset(1, columnoffset1);
	m_lstboxBuff->SetColumnOffset(2, columnoffset2);
	m_lstboxBuff->SetColumnOffset(3, columnoffset3);
	m_lstboxBuff->SetColumnOffset(4, columnoffset4);
	m_lstboxBuff->SetColumnOffset(5, columnoffset5);

	m_lstboxBuff->SetAlignType(0, _XFONT_ALIGNTYPE_LEFT);
	m_lstboxBuff->SetAlignType(1, _XFONT_ALIGNTYPE_LEFT);
	m_lstboxBuff->SetAlignType(2, _XFONT_ALIGNTYPE_RIGHT);
	m_lstboxBuff->SetAlignType(3, _XFONT_ALIGNTYPE_LEFT);
	m_lstboxBuff->SetAlignType(4, _XFONT_ALIGNTYPE_LEFT);
	m_lstboxBuff->SetAlignType(5, _XFONT_ALIGNTYPE_RIGHT);

	m_lstboxBuff->SetColumnWidth(0, 30);
	m_lstboxBuff->SetColumnWidth(1, 166);
	m_lstboxBuff->SetColumnWidth(2, 120);
	m_lstboxBuff->SetColumnWidth(3, 170);
	m_lstboxBuff->SetColumnWidth(4, 15);
	m_lstboxBuff->SetColumnWidth(5, 50);

	InsertChildObject(m_lstboxBuff);

	m_LeftSelectedImage.Create(0, 0, 156, 47, &g_MainInterfaceTextureArchive, borderresourceindex);
	m_LeftSelectedImage.SetClipRect(61, 92, 216, 138);

	m_RightSelectedImage.Create(0, 0, 156, 47, &g_MainInterfaceTextureArchive, borderresourceindex);
	m_RightSelectedImage.SetClipRect(61, 92, 216, 138);
	m_RightSelectedImage.SetScale(-1, 1);

	SetWindowMoveMode(_XWMOVE_FIXED);
	
	return TRUE;
}
Exemple #8
0
BOOL _XWindow_OptionMenu::Initialize( void )
{
	//this->SetDrawBorder( FALSE );

	int mainbackinterface = g_MainInterfaceTextureArchive.FindResource( "MI_Main_Back01.tga" );
	int optionmenuinterface = g_MainInterfaceTextureArchive.FindResource( "MI_System.tga" );
	
	_XImageStatic* pTitleBar = new _XImageStatic;
	pTitleBar->Create( 0, 0, 183, 59, &g_MainInterfaceTextureArchive, mainbackinterface );
	pTitleBar->SetClipRect( 0, 125, 183, 184 );
	InsertChildObject( pTitleBar );

	_XImageStatic* pBottomBar = new _XImageStatic;
	pBottomBar->Create( 0, 59, 182, 269, &g_MainInterfaceTextureArchive, optionmenuinterface );
	pBottomBar->SetClipRect( 0, 0, 183, 211 );
	InsertChildObject( pBottomBar );

	_XImageStatic* pTopEdgeLeftLine = new _XImageStatic;
	pTopEdgeLeftLine->Create( 10, 25, 13, 146, &g_MainInterfaceTextureArchive, optionmenuinterface );
	pTopEdgeLeftLine->SetClipRect( 186, 0, 190, 122 );
	InsertChildObject( pTopEdgeLeftLine );

	_XImageStatic* pTopEdgeRightLine = new _XImageStatic;
	pTopEdgeRightLine->Create( 171, 25, 175, 146, &g_MainInterfaceTextureArchive, optionmenuinterface );
	pTopEdgeRightLine->SetClipRect( 186, 0, 190, 122 );
	pTopEdgeRightLine->SetScale( -1, 1 );
	InsertChildObject( pTopEdgeRightLine );

	_XImageStatic* pTopEdgeTopLine = new _XImageStatic;
	pTopEdgeTopLine->Create( 14, 24, 167, 28, &g_MainInterfaceTextureArchive, optionmenuinterface );
	pTopEdgeTopLine->SetClipRect( 2, 216, 156, 222 );	
	InsertChildObject( pTopEdgeTopLine );

	_XImageStatic* pTopEdgeBottomLine = new _XImageStatic;
	pTopEdgeBottomLine->Create( 14, 142, 167, 146, &g_MainInterfaceTextureArchive, optionmenuinterface );
	pTopEdgeBottomLine->SetClipRect( 2, 223, 156, 228 );
	InsertChildObject( pTopEdgeBottomLine );


	_XImageStatic* pBottomEdgeLeftLine = new _XImageStatic;
	pBottomEdgeLeftLine->Create( 10, 146, 14, 242, &g_MainInterfaceTextureArchive, optionmenuinterface );
	pBottomEdgeLeftLine->SetClipRect( 192, 0, 196, 96 );
	InsertChildObject( pBottomEdgeLeftLine );
	
	_XImageStatic* pBottomEdgeRightLine = new _XImageStatic;
	pBottomEdgeRightLine->Create( 171, 146, 175, 242, &g_MainInterfaceTextureArchive, optionmenuinterface );
	pBottomEdgeRightLine->SetClipRect( 192, 0, 196, 96 );
	pBottomEdgeRightLine->SetScale( -1, 1 );
	InsertChildObject( pBottomEdgeRightLine );
	
	_XImageStatic* pBottomEdgeTopLine = new _XImageStatic;
	pBottomEdgeTopLine->Create( 14, 145, 167, 150, &g_MainInterfaceTextureArchive, optionmenuinterface );
	pBottomEdgeTopLine->SetClipRect( 2, 231, 156, 237 );
	InsertChildObject( pBottomEdgeTopLine );
	
	_XImageStatic* pBottomEdgeBottomLine = new _XImageStatic;
	pBottomEdgeBottomLine->Create( 14, 237, 167, 241, &g_MainInterfaceTextureArchive, optionmenuinterface );
	pBottomEdgeBottomLine->SetClipRect( 2, 237, 156, 242 );
	InsertChildObject( pBottomEdgeBottomLine );


	int charinfointerface = g_MainInterfaceTextureArchive.FindResource( g_MI_CharTextureName );
	_XBTN_STRUCTURE closebtnstruct = { TRUE, { 166, 2 }, { 12, 12 }, _XDEF_OPTIONMENU_CLOSEBUTTON,
		charinfointerface,charinfointerface,charinfointerface, 
		&g_MainInterfaceTextureArchive };
	_XButton* pClosebutton = new _XButton;
	pClosebutton->Create( closebtnstruct );	
	
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL,  96, 238, 108, 250 );
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  108, 238, 120, 250 );	
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  120, 238, 132, 250 );
	InsertChildObject( pClosebutton );
	
	_XBTN_STRUCTURE closebtn2struct = { TRUE, { 59, 241 }, { 62, 26 }, _XDEF_OPTIONMENU_CLOSEBUTTON,
		optionmenuinterface,optionmenuinterface,optionmenuinterface, 
		&g_MainInterfaceTextureArchive };
	pClosebutton = new _XButton;
	pClosebutton->Create( closebtn2struct );
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 186, 126, 248, 152 );
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  186, 151, 248, 177 );
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  186, 176, 248, 202 );
	pClosebutton->SetButtonTextID( _XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_ITEMDROPCONFIRM_CANCEL );
	InsertChildObject( pClosebutton );	
	
	_XBTN_STRUCTURE helpstruct = { TRUE, { 153, 2 }, { 12, 12 }, _XDEF_OPTIONMENU_HELPBUTTON,
		charinfointerface,charinfointerface,charinfointerface, 
		&g_MainInterfaceTextureArchive };
	_XButton* pHelpbutton = new _XButton;
	pHelpbutton->Create( helpstruct );	
	
	pHelpbutton->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 240, 88, 252, 100 );
	pHelpbutton->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  240, 100, 252, 112 );
	pHelpbutton->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  240, 112, 252, 124 );
	InsertChildObject( pHelpbutton );


	int characterwindowimageindex = g_MainInterfaceTextureArchive.FindResource( "MI_Characterwin.tga" );

	int ButtonMenuString[7];
	ButtonMenuString[0] = ID_STRING_OPTION_2285;
	ButtonMenuString[1] = ID_STRING_OPTION_2286;
	ButtonMenuString[2] = ID_STRING_OPTION_2287;
	ButtonMenuString[3] = ID_STRING_OPTION_2288;
	ButtonMenuString[4] = ID_STRING_OPTION_OTHERCHARACTER;

#ifdef _XNEXON_WEBLOGIN
	BOOL readyautologin = TRUE;

	int parampos = _XCmdLineOption("passport=",0,8);
	if( parampos != 0 )
	{
		ButtonMenuString[5] = ID_STRING_LOGINSERVER_2179; // ╪╜╧Ж ╪╠ец.
	}		
	else
	{
		ButtonMenuString[5] = ID_STRING_OPTION_GOTITLE;		
	}
		
#else	
	ButtonMenuString[5] = ID_STRING_OPTION_GOTITLE;
#endif

	ButtonMenuString[6] = ID_STRING_OPTION_EXITGAME;
	
	_XBTN_STRUCTURE menubtnstruct = { TRUE, { 34, 31 }, { 111, 26 }, _XDEF_OPTIONMENU_GRAPHICTABBUTTON,
		characterwindowimageindex,characterwindowimageindex,characterwindowimageindex, 
		&g_MainInterfaceTextureArchive };

	for( int i = 0; i < 7; i++ )
	{
		_XButton* pMenubutton = new _XButton;
		pMenubutton->Create( menubtnstruct );
		pMenubutton->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 1, 105, 112, 131 );
		pMenubutton->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  1, 105, 112, 131 );
		pMenubutton->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  1, 131, 112, 157 );		
		pMenubutton->SetButtonTextID( _XSTRINGDB_SN_EODSTRING_XSR, ButtonMenuString[i] );
		pMenubutton->SetGrowTextMode( TRUE );
		pMenubutton->SetButtonTextColor( D3DCOLOR_ARGB(255,180,180,180) );
		InsertChildObject( pMenubutton );

		if( i == 4 )
		{
#ifdef _XDEF_SELECT_ANOTHERCHARACTER_080721_KUKURI
#else
			pMenubutton->EnableWindow( FALSE );
#endif
		}

		menubtnstruct.commandid++;

		if( i == 3 )
		{
			menubtnstruct.position.y += 38;
		}
		else
		{
			menubtnstruct.position.y += 28;
		}		
	}
	
	return TRUE;
}
BOOL _XWindow_CastleBattlePersonalHistory::Initialize(void)
{	
	int manorresourceindex02	= g_MainInterfaceTextureArchive.FindResource("MI_manor02.tga");
	int manorresourceindex03	= g_MainInterfaceTextureArchive.FindResource("MI_manor03.tga");
	int pvpresourceindex01		= g_MainInterfaceTextureArchive.FindResource("MI_pvp_01.tga");
	
	// 타이틀 바 ( 187 X 19 )
	_XImageStatic* pTitleBar = new _XImageStatic;
	pTitleBar->Create( 0, 0, 187, 19, &g_MainInterfaceTextureArchive, manorresourceindex03 );
	pTitleBar->SetClipRect( 2, 214, 189, 233 );
	InsertChildObject( pTitleBar );
	
	// 바닥 바 ( 187 X 19 )
	_XImageStatic* pBottomBar = new _XImageStatic;
#ifdef _XDEF_CASTLEBATTLE_RECORD
	pBottomBar->Create( 0, 152, 187, 171, &g_MainInterfaceTextureArchive, manorresourceindex03 );
#else
	pBottomBar->Create( 0, 125, 187, 144, &g_MainInterfaceTextureArchive, manorresourceindex03 );
#endif
	pBottomBar->SetClipRect( 2, 235, 189, 254 );
	InsertChildObject( pBottomBar );
	
	// 게이지 왼쪽 바 ( 13 X 13 )
	_XImageStatic* pGaugeLeft = new _XImageStatic;
	pGaugeLeft->Create( 25, 87, 38, 100, &g_MainInterfaceTextureArchive, manorresourceindex02 );
	pGaugeLeft->SetClipRect( 108, 159, 121, 172 );
	InsertChildObject( pGaugeLeft );
	
	// 게이지 오른쪽 바 ( 14 X 13 )
	_XImageStatic* pGaugeRight = new _XImageStatic;
	pGaugeRight->Create( 150, 87, 164, 100, &g_MainInterfaceTextureArchive, manorresourceindex02 );
	pGaugeRight->SetClipRect( 233, 159, 247, 172 );
	InsertChildObject( pGaugeRight );
	
	// 회색 포인트 ( 15 X 15 )
	m_pImageGrayPoint = new _XImageStatic;
	m_pImageGrayPoint->Create( 0, 0, 15, 15, &g_MainInterfaceTextureArchive, pvpresourceindex01 );
	m_pImageGrayPoint->SetClipRect( 113, 104, 128, 119 );
	
	// 녹색 포인트 ( 15 X 15 )
	m_pImageGreenPoint = new _XImageStatic;
	m_pImageGreenPoint->Create( 0, 0, 15, 15, &g_MainInterfaceTextureArchive, pvpresourceindex01 );
	m_pImageGreenPoint->SetClipRect( 113, 88, 128, 103 );
	
	// 빨간 포인트 ( 15 X 15 )
	m_pImageRedPoint = new _XImageStatic;
	m_pImageRedPoint->Create( 0, 0, 15, 15, &g_MainInterfaceTextureArchive, manorresourceindex02 );
	m_pImageRedPoint->SetClipRect( 175, 129, 190, 144 );
	
	_XSTICKGAUGE_STRUCTURE thretegaugestruct =
	{
		TRUE, {38, 87}, {112, 13},
			manorresourceindex02,manorresourceindex02,
			&g_MainInterfaceTextureArchive
	};
	
	m_GaugeThreate = new _XStickGauge;
	m_GaugeThreate->Create(thretegaugestruct);	
	m_GaugeThreate->SetImageClipRect(_XGAUGEIMAGE_OVERLAY, 121, 159, 233, 172);
	m_GaugeThreate->SetImageClipRect(_XGAUGEIMAGE_BORDER, 121, 172, 233, 185);
	m_GaugeThreate->SetFactorDraw(TRUE);
	m_GaugeThreate->SetBackGroundDraw(TRUE);
	m_GaugeThreate->SetGaugeFactor( 0.0f );
	m_GaugeThreate->SetGaugeColorFactor( 0xFFFFFFFF, 0x00000000 );
	m_GaugeThreate->SetViewDelayGauge( FALSE );
	m_GaugeThreate->SetGaugeImageDrawType(_XGAUGEIMAGEDRAWTYPE_RESIZE);
	m_GaugeThreate->ShowWindow(FALSE);
	InsertChildObject(m_GaugeThreate);
	
	
	_XSTICKGAUGE_STRUCTURE settlegaugestruct =
	{
		TRUE, {38, 87}, {112, 13},
			manorresourceindex02,manorresourceindex02,
			&g_MainInterfaceTextureArchive
	};
	
	m_GaugeSettle = new _XStickGauge;
	m_GaugeSettle->Create(thretegaugestruct);	
	m_GaugeSettle->SetImageClipRect(_XGAUGEIMAGE_OVERLAY, 121, 159, 233, 172);
	m_GaugeSettle->SetImageClipRect(_XGAUGEIMAGE_BORDER, 121, 185, 233, 198);
	m_GaugeSettle->SetFactorDraw(FALSE);
	m_GaugeSettle->SetBackGroundDraw(TRUE);
	m_GaugeSettle->SetGaugeFactor( 0.0f );
	m_GaugeSettle->SetGaugeColorFactor( 0xFFFFFFFF, 0x00000000 );
	m_GaugeSettle->SetViewDelayGauge( FALSE );
	m_GaugeSettle->SetGaugeImageDrawType(_XGAUGEIMAGEDRAWTYPE_RESIZE);
//	m_GaugeSettle->SetGaugeProgressType(_XGAUGEPROGRESSTYPE_BACKWARD);
	m_GaugeSettle->ShowWindow(FALSE);
	InsertChildObject(m_GaugeSettle);

#ifdef _XDEF_CASTLEBATTLE_RECORD
	int btnresourceindex = g_MainInterfaceTextureArchive.FindResource("mi_skillwin.tga");

	_XBTN_STRUCTURE btnstruct = 
	{
		TRUE, {40, 127}, {106, 22},
			_XDEF_CBPERSONAL_VIEWRECORD,
			btnresourceindex,
			btnresourceindex,
			btnresourceindex,
			&g_MainInterfaceTextureArchive
	};

	_XButton* pRecordButton = new _XButton;
	pRecordButton->Create(btnstruct);
	pRecordButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 3, 177, 109, 199);
	pRecordButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 3, 153, 109, 175);
	pRecordButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 3, 202, 109, 224);

	pRecordButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 205, 205, 205));
	pRecordButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_NEW_3400);	//"장원 전적 보기"
	InsertChildObject(pRecordButton);
#endif
	
	return TRUE;
}
BOOL _XWindow_PartyMemberMiniBar::Initialize( void )
{
	int partyresourceindex = g_MainInterfaceTextureArchive.FindResource( "mi_party.tga" );
	int charinforesourceindex = g_MainInterfaceTextureArchive.FindResource( g_MI_CharTextureName );
	
#ifdef _XDEF_PARTY_NOTAVAILABLE
	// 동행 멤버창 바탕 이미지 ( 160 X 36 ) 
	m_imagePartyMemberBorder = new _XImageStatic;
	m_imagePartyMemberBorder->Create( 0, 0, 160, 36, &g_MainInterfaceTextureArchive, g_MainInterfaceTextureArchive.FindResource("mi_party2.tga") );
	m_imagePartyMemberBorder->SetClipRect(0, 57, 160, 93);
	m_imagePartyMemberBorder->ShowWindow(TRUE);
	InsertChildObject( m_imagePartyMemberBorder );
#else
	// 동행 멤버창 바탕 이미지 ( 146 X 36 ) 
	m_imagePartyMemberBorder = new _XImageStatic;
	m_imagePartyMemberBorder->Create( 0, 0, 146, 36, &g_MainInterfaceTextureArchive, partyresourceindex );
	m_imagePartyMemberBorder->SetClipRect(0, 143, 146, 179);
	m_imagePartyMemberBorder->ShowWindow(TRUE);
	InsertChildObject( m_imagePartyMemberBorder );
#endif
	
	// 동행 멤버창 닫기 버튼	 ( 12 X 12 ) 
	_XBTN_STRUCTURE closebtnstruct = { TRUE, { 128, 5 }, { 12, 12 }, m_CloseButtoncommandid,
		charinforesourceindex,charinforesourceindex,charinforesourceindex, 
		&g_MainInterfaceTextureArchive };
	m_btnPartyMemberClose = new _XButton;
	m_btnPartyMemberClose->Create( closebtnstruct );	
	m_btnPartyMemberClose->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL,  96, 238, 108, 250 );
	m_btnPartyMemberClose->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  108, 238, 120, 250 );
	m_btnPartyMemberClose->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  120, 238, 132, 250 );
	m_btnPartyMemberClose->ShowWindow(TRUE);
	m_btnPartyMemberClose->SetCallBackFunction_ToolTip( _XCallback_PartyMember_Close );
	InsertChildObject( m_btnPartyMemberClose );
	
	// 동행 위임 버튼	 ( 12 X 12 ) 
	_XBTN_STRUCTURE entrustbtnstruct = { TRUE, { 115, 5 }, { 12, 12 }, m_EntrustButtoncommandid,
		partyresourceindex,partyresourceindex,partyresourceindex, 
		&g_MainInterfaceTextureArchive };
	m_btnPartyMasterEntrust = new _XButton;
	m_btnPartyMasterEntrust->Create( entrustbtnstruct );	
	m_btnPartyMasterEntrust->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 204, 2, 216, 14 );
	m_btnPartyMasterEntrust->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  216, 2, 228, 14 );
	m_btnPartyMasterEntrust->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  228, 2, 240, 14 );
	m_btnPartyMasterEntrust->ShowWindow(TRUE);
	m_btnPartyMasterEntrust->SetCallBackFunction_ToolTip( _XCallback_PartyMember_Entrust );
	InsertChildObject( m_btnPartyMasterEntrust );
	
	
	// 동행 멤버창 체력 게이지 ( 130 X 5)
	_XSTICKGAUGE_STRUCTURE	gaugestruct = 
	{
		TRUE, { 8, 20 }, { 130, 5 },	
			partyresourceindex, -1, &g_MainInterfaceTextureArchive, 
	};
	
	m_pPartyMemberLifePowerGauge = new _XStickGauge;
	m_pPartyMemberLifePowerGauge->Create( gaugestruct );	
	m_pPartyMemberLifePowerGauge->SetImageClipRect( _XGAUGEIMAGE_BORDER,  3,  58, 133,  63 );
	m_pPartyMemberLifePowerGauge->SetFactorDraw(TRUE);	
	InsertChildObject( m_pPartyMemberLifePowerGauge );
	
	// 동행 멤버창 진기 게이지 ( 130 X 5)
	gaugestruct.position.y = 27;
	m_pPartyMemberForcePowerGauge = new _XStickGauge;
	m_pPartyMemberForcePowerGauge->Create( gaugestruct );	
	m_pPartyMemberForcePowerGauge->SetImageClipRect( _XGAUGEIMAGE_BORDER,  3,  65, 133,  70 );
	m_pPartyMemberForcePowerGauge->SetFactorDraw(TRUE);	
	InsertChildObject( m_pPartyMemberForcePowerGauge );
		
	// 위험 표시 이미지 ( 39 X 32 )
	for(int i = 0 ; i < 3 ; i++)
	{
		m_pPartyMemberDanger[i] = new _XImageStatic;
		m_pPartyMemberDanger[i]->Create(2, 0, 26, 17, &g_MainInterfaceTextureArchive, partyresourceindex);
	}
	m_pPartyMemberDanger[0]->SetClipRect(168, 17, 192, 34);
	m_pPartyMemberDanger[1]->SetClipRect(192, 17, 216, 34);
	m_pPartyMemberDanger[2]->SetClipRect(216, 17, 240, 34);	

	memset( m_PartyMemberName, 0, sizeof(m_PartyMemberName));
	
#ifdef _XTS_TARGET_STATE
	for(i = 0 ; i < 32 ; i++)
	{
		m_StateImage[i].Create(0, 0, 30, 30, &g_MainInterfaceTextureArchive, -1);
	}
#endif

#ifdef _XDEF_PARTY_NOTAVAILABLE
	m_pFarActionIcon = new _XImageStatic;
	m_pFarActionIcon->Create(0, 0, 11, 11, &g_MainInterfaceTextureArchive, partyresourceindex);
	m_pFarActionIcon->SetClipRect(192, 36, 203, 47);

	m_pOutActionIcon = new _XImageStatic;
	m_pOutActionIcon->Create(0, 0, 11, 11, &g_MainInterfaceTextureArchive, partyresourceindex);
	m_pOutActionIcon->SetClipRect(192, 36, 203, 47);
#endif

#ifdef _XDEF_INTERFACE_RENEWAL_071002_KUKURI
	m_pClassIcon = new _XImageStatic;
	m_pClassIcon->Create(0, 0, 30, 30, &g_MainInterfaceTextureArchive, g_MainInterfaceTextureArchive.FindResource("skill_icon_08_02.tga"));
	m_pClassIcon->SetClipRect(2, 2, 32, 32);
	//m_pClassIcon->SetScale( 0.5f, 0.5f );

	m_pClassBorderIcon = new _XImageStatic;
	m_pClassBorderIcon->Create(0, 0, 40, 36, &g_MainInterfaceTextureArchive, g_MainInterfaceTextureArchive.FindResource("MI_Char_01.tga"));
	m_pClassBorderIcon->SetClipRect(198, 121, 238, 157);
#endif

	return TRUE;
}
Exemple #11
0
BOOL _XWindow_NPCMnDInfo::Initialize(void)
{
	int mainframeinterface		= g_MainInterfaceTextureArchive.FindResource("MI_main_back01.tga");
	int npcresourceindex4		= g_MainInterfaceTextureArchive.FindResource("mi_npcquestwin_04.tga" );

	int pvpresourceindex = -1;
	if( g_LanguageType == _XLANGUAGE_TYPE_TAIWANESE )
	{
		pvpresourceindex = g_MainInterfaceTextureArchive.FindResource("tw_mi_pvp_01.tga");
	}
	else if( g_LanguageType == _XLANGUAGE_TYPE_ENGLISH )
	{
		pvpresourceindex = g_MainInterfaceTextureArchive.FindResource("us_mi_pvp_01.tga");
	}
	else if( g_LanguageType == _XLANGUAGE_TYPE_RUSSIAN )
	{
		pvpresourceindex = g_MainInterfaceTextureArchive.FindResource("rs_mi_pvp_01.tga");
	}
	else
	{
		pvpresourceindex = g_MainInterfaceTextureArchive.FindResource("mi_pvp_01.tga");
	}
	
	_XImageStatic* pTitleLeftBar = new _XImageStatic;
	pTitleLeftBar->Create(0, 0, 180, 18, &g_MainInterfaceTextureArchive, mainframeinterface);
	pTitleLeftBar->SetClipRect(0, 125, 180, 143);
	InsertChildObject(pTitleLeftBar);
	
	_XImageStatic* pTitleCenterBar = new _XImageStatic;
	pTitleCenterBar->Create(180, 0, 282, 18, &g_MainInterfaceTextureArchive, mainframeinterface);
	pTitleCenterBar->SetClipRect(77, 125, 180, 143);
	InsertChildObject(pTitleCenterBar);
	
	_XImageStatic* pTitleRightBar = new _XImageStatic;
	pTitleRightBar->Create(282, 0, 365, 18, &g_MainInterfaceTextureArchive, mainframeinterface);
	pTitleRightBar->SetClipRect(99, 125, 183, 143);
	InsertChildObject(pTitleRightBar);

	m_BorderTitle.Create(m_WindowPosition.x+1, m_WindowPosition.y+18, m_WindowPosition.x+365, m_WindowPosition.y+268);
	m_BorderTitle.SetTexture(&g_MainInterfaceTextureArchive, g_MainInterfaceTextureArchive.FindResource("MI_BorderTile.tga"));
	m_BorderTitle.SetFaceColor(D3DCOLOR_ARGB(128, 255, 255, 255));

	FLOAT ufactor = 364.0f/128.0f;
	FLOAT vfactor = 250.0f/128.0f;

	m_BorderTitle.ChangeUV(0.0f, ufactor, ufactor, 0.0f, 0.0f, 0.0f, vfactor, vfactor);
	
	_XImageStatic* pLeftBorder_1 = new _XImageStatic;
	pLeftBorder_1->Create(0, 17, 2, 48, &g_MainInterfaceTextureArchive, mainframeinterface);
	pLeftBorder_1->SetClipRect(0, 195, 3, 227);
	pLeftBorder_1->SetScale(1.0f, 7.2f);
	InsertChildObject(pLeftBorder_1);
	
	_XImageStatic* pRightBorder_1 = new _XImageStatic;
	pRightBorder_1->Create(363, 17, 365, 48, &g_MainInterfaceTextureArchive, mainframeinterface);
	pRightBorder_1->SetClipRect(0, 195, 3, 227);
	pRightBorder_1->SetScale(1.0f, 7.2f);
	InsertChildObject(pRightBorder_1);
	
	_XImageStatic* pLeftCorner = new _XImageStatic;
	pLeftCorner->Create(0, 245, 2, 269, &g_MainInterfaceTextureArchive, mainframeinterface);
	pLeftCorner->SetClipRect(0, 205, 3, 230);
	InsertChildObject(pLeftCorner);
	
	_XImageStatic* pRightCorner = new _XImageStatic;
	pRightCorner->Create(363, 245, 365, 269, &g_MainInterfaceTextureArchive, mainframeinterface);
	pRightCorner->SetClipRect(180, 205, 183, 230);
	InsertChildObject(pRightCorner);
	
	_XImageStatic* pBottomBorder = new _XImageStatic;
	pBottomBorder->Create(3, 267, 179, 269, &g_MainInterfaceTextureArchive, mainframeinterface);
	pBottomBorder->SetClipRect(3, 227, 180, 230);
	pBottomBorder->SetScale(2.033f, 1.0f);
	InsertChildObject(pBottomBorder);

	_XImageStatic* pDragonBorder_1 = new _XImageStatic;
	pDragonBorder_1->Create(5, 18, 181, 73, &g_MainInterfaceTextureArchive, npcresourceindex4);
	pDragonBorder_1->SetClipRect(4, 133, 180, 182);
	InsertChildObject(pDragonBorder_1);

	_XImageStatic* pDragonBorder_2 = new _XImageStatic;
	pDragonBorder_2->Create(357, 18, 180, 73, &g_MainInterfaceTextureArchive, npcresourceindex4);
	pDragonBorder_2->SetClipRect(4, 133, 180, 182);
	pDragonBorder_2->SetScale(-1.0f, 1.0f);
	InsertChildObject(pDragonBorder_2);

	//안에 테투리
	_XImageStatic* pBorder_1 = new _XImageStatic;
	pBorder_1->Create(5, 75, 359, 75, &g_MainInterfaceTextureArchive, mainframeinterface);
	pBorder_1->SetClipRect(9, 193, 175, 194);
	pBorder_1->SetScale(2.138f, 1.0f);
	InsertChildObject(pBorder_1);

	_XImageStatic* pBorder_2 = new _XImageStatic;
	pBorder_2->Create(5, 227, 359, 227, &g_MainInterfaceTextureArchive, mainframeinterface);
	pBorder_2->SetClipRect(9, 193, 175, 194);
	pBorder_2->SetScale(2.138f, 1.0f);
	InsertChildObject(pBorder_2);

	_XImageStatic* pBorder_3 = new _XImageStatic;
	pBorder_3->Create(4, 76, 4, 226, &g_MainInterfaceTextureArchive, mainframeinterface);
	pBorder_3->SetClipRect(192, 64, 193, 214);
	pBorder_3->SetScale(1.0f, 1.0f);
	InsertChildObject(pBorder_3);

	_XImageStatic* pBorder_4 = new _XImageStatic;
	pBorder_4->Create(360, 76, 360, 226, &g_MainInterfaceTextureArchive, mainframeinterface);
	pBorder_4->SetClipRect(192, 64, 193, 214);
	pBorder_4->SetScale(1.0f, 1.0f);
	InsertChildObject(pBorder_4);

	int resourceindex = g_MainInterfaceTextureArchive.FindResource("mi_skillwin.tga");
	int optionresourceindex = g_MainInterfaceTextureArchive.FindResource("mi_system.tga");

	_XBTN_STRUCTURE btnstruct = 
	{
		TRUE, {50, 237}, {60, 24}, _XDEF_WTITLE_NPCMNDAPPLYBUTTON,
			optionresourceindex,
			optionresourceindex,
			optionresourceindex,
			&g_MainInterfaceTextureArchive
	};

	btnstruct.position.x = 215;

	_XButton* pReqButton = new _XButton;
	pReqButton->Create(btnstruct);
	//pReqButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 2, 176, 110, 199);
	//pReqButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 2, 152, 110, 175);
	//pReqButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 2, 201, 110, 224);
	pReqButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 187, 127, 247, 151);
	pReqButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 187, 152, 247, 176);
	pReqButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 187, 177, 247, 201);
	pReqButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 205, 205, 205));
	pReqButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_NEW_3865); //사제 신청
	InsertChildObject(pReqButton);

	btnstruct.position.x = 293;
	btnstruct.position.y = 237;
	btnstruct.windowsize.cx = 60;
	btnstruct.windowsize.cy = 24;
	btnstruct.commandid = _XDEF_WTITLE_NPCMNDREQLISTBTN;
	btnstruct.imageindex_click = optionresourceindex;
	btnstruct.imageindex_normal = optionresourceindex;
	btnstruct.imageindex_ready = optionresourceindex;

	_XButton* pReqListButton = new _XButton;
	pReqListButton->Create(btnstruct);
	pReqListButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 187, 127, 247, 151);
	pReqListButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 187, 152, 247, 176);
	pReqListButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 187, 177, 247, 201);
	pReqListButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 205, 205, 205));
	pReqListButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_MATCH_2557); //목록갱신
	InsertChildObject(pReqListButton);

	int scrollbarresourceindex = g_MainInterfaceTextureArchive.FindResource( "MI_chat_quick.tga" );
	_XLISTBOX_STRUCTURE listboxstructure = 
	{
		// window property
		TRUE,										// 윈도우 활성화
		{6, 75},									// 윈도우 좌표 
		{353, 150},									// 윈도우 사이즈
		_XDEF_PVPBROKER_LISTBOX,					// 윈도우 아이디
		-1,											// 윈도우 볼더 이미지 인덱스
		&g_MainInterfaceTextureArchive,				// 텍스쳐리스트
		_T(""),										// 윈도우 타이틀 
		18,										// 리스트 아이템 라인 피치
		10,											// 리스트 박스에 보이는 최대 라인수 
		_XLSTYLE_RIGHTSCROLLBAR,					// 스크롤바의 위치 		
		
		// Scroll bar property
		{12, 150},									// 스크롤바 사이즈
		12,											// 스크롤바 상하버튼 사이즈
		22,											// 스크롤바 트랙바 사이즈
		150,										// 전체 리스트 갯수 <설정 필요없슴>			
		scrollbarresourceindex,
		scrollbarresourceindex,
		scrollbarresourceindex,
		scrollbarresourceindex,
		scrollbarresourceindex		
	};

	m_pMasterInfoListBox = new _XListBox;
	m_pMasterInfoListBox->Create(listboxstructure);

	_XVScrollBar* pScrollBar = m_pMasterInfoListBox->GetScrollBarObject();
	if( pScrollBar )
	{
		_XSCRBAR_IMAGECLIPRECTSTRUCTURE cliprectstructure = 
		{
			{ 0,  0, 12, 12 },
			{ 24, 0, 36, 12 },
			{ 0,  12, 12, 24 },
			{ 24, 12, 36, 24 },
			{ 40,157, 52, 179}
		};
		pScrollBar->SetClipRect( cliprectstructure );	
	}

	POINT columnoffset1 = { 7, 0  };
	POINT columnoffset2 = { 17+38, 2 };
	POINT columnoffset3 = { 95+20, 2 };
	POINT columnoffset4 = { 137+32, 2};
	POINT columnoffset5 = { 203+8, 2};
	POINT columnoffset6 = { 221+38, 2};

	m_pMasterInfoListBox->SetColumnOffset(0, columnoffset1);
	m_pMasterInfoListBox->SetColumnOffset(1, columnoffset2);
	m_pMasterInfoListBox->SetColumnOffset(2, columnoffset3);
	m_pMasterInfoListBox->SetColumnOffset(3, columnoffset4);
	m_pMasterInfoListBox->SetColumnOffset(4, columnoffset5);
	m_pMasterInfoListBox->SetColumnOffset(5, columnoffset6);

	m_pMasterInfoListBox->SetColumnStyle(0, _XLCOLUMNSTYLE_ICONRECT);
	m_pMasterInfoListBox->SetColumnStyle(1, _XLCOLUMNSTYLE_STRING);
	m_pMasterInfoListBox->SetColumnStyle(2, _XLCOLUMNSTYLE_STRING);
	m_pMasterInfoListBox->SetColumnStyle(3, _XLCOLUMNSTYLE_STRING);
	m_pMasterInfoListBox->SetColumnStyle(4, _XLCOLUMNSTYLE_STRING);
	m_pMasterInfoListBox->SetColumnStyle(5, _XLCOLUMNSTYLE_STRING);

	m_pMasterInfoListBox->SetAlignType(0, _XFONT_ALIGNTYPE_CENTER);
	m_pMasterInfoListBox->SetAlignType(1, _XFONT_ALIGNTYPE_CENTER);
	m_pMasterInfoListBox->SetAlignType(2, _XFONT_ALIGNTYPE_CENTER);
	m_pMasterInfoListBox->SetAlignType(3, _XFONT_ALIGNTYPE_CENTER);
	m_pMasterInfoListBox->SetAlignType(4, _XFONT_ALIGNTYPE_CENTER);
	m_pMasterInfoListBox->SetAlignType(5, _XFONT_ALIGNTYPE_CENTER);

	m_pMasterInfoListBox->SetColumnWidth(0, 15);
	m_pMasterInfoListBox->SetColumnWidth(1, 76);
	m_pMasterInfoListBox->SetColumnWidth(2, 40);
	m_pMasterInfoListBox->SetColumnWidth(3, 64);
	m_pMasterInfoListBox->SetColumnWidth(4, 16);
	m_pMasterInfoListBox->SetColumnWidth(5, 76);

	m_pMasterInfoListBox->SetTrackWidth(338);
	m_pMasterInfoListBox->SetTrackHeight(18);
	InsertChildObject(m_pMasterInfoListBox);

	SetWindowMoveMode(_XWMOVE_FIXED);

	return TRUE;
}
BOOL _XWindow_NPCResource_New::Initialize()
{
	int mi_main_back01_tga = g_MainInterfaceTextureArchive.FindResource("mi_main_back01.tga");
	int mi_skillwin_tga = g_MainInterfaceTextureArchive.FindResource("mi_skillwin.tga");
	int mi_chat_quick_tga = g_MainInterfaceTextureArchive.FindResource( "MI_chat_quick.tga" );
	int mi_characterwin_tga	= g_MainInterfaceTextureArchive.FindResource( "MI_Characterwin.tga" );
	
	_XImageStatic* pTitle = new _XImageStatic;
	pTitle->Create(0, 0, 183, 18, &g_MainInterfaceTextureArchive, mi_main_back01_tga);
	pTitle->SetClipRect(0, 125, 183, 143);
	InsertChildObject(pTitle);

	m_BorderTile.Create(m_WindowPosition.x+1, m_WindowPosition.y+18, m_WindowPosition.x+180, m_WindowPosition.y+270);
	m_BorderTile.SetTexture(&g_MainInterfaceTextureArchive, g_MainInterfaceTextureArchive.FindResource("MI_BorderTile.tga"));
	m_BorderTile.SetFaceColor(D3DCOLOR_ARGB(128, 255, 255, 255));
	
	FLOAT ufactor = 179.0f/128.0f;
	FLOAT vfactor = 252.0f/128.0f; 
	
	m_BorderTile.ChangeUV(0.0f, ufactor, ufactor, 0.0f, 0.0f, 0.0f, vfactor, vfactor);

	_XImageStatic* pLeftBorder_1 = new _XImageStatic;
	pLeftBorder_1->Create(0, 17, 2, 48, &g_MainInterfaceTextureArchive, mi_main_back01_tga);
	pLeftBorder_1->SetClipRect(0, 195, 3, 227);
	pLeftBorder_1->SetScale(1.0f, 250.f/32.f);
	InsertChildObject(pLeftBorder_1);
	
	_XImageStatic* pRightBorder_1 = new _XImageStatic;
	pRightBorder_1->Create(180, 17, 183, 48, &g_MainInterfaceTextureArchive, mi_main_back01_tga);
	pRightBorder_1->SetClipRect(0, 195, 3, 227);
	pRightBorder_1->SetScale(1.0f, 250.f/32.f);
	InsertChildObject(pRightBorder_1);
	
	_XImageStatic* pLeftCorner = new _XImageStatic;
	pLeftCorner->Create(0, 267, 2, 270, &g_MainInterfaceTextureArchive, mi_main_back01_tga);
	pLeftCorner->SetClipRect(0, 227, 3, 230);
	InsertChildObject(pLeftCorner);
	
	_XImageStatic* pRightCorner = new _XImageStatic;
	pRightCorner->Create(180, 267, 183, 270, &g_MainInterfaceTextureArchive, mi_main_back01_tga);
	pRightCorner->SetClipRect(180, 227, 183, 230);
	InsertChildObject(pRightCorner);
	
	_XImageStatic* pBottomBorder = new _XImageStatic;
	pBottomBorder->Create(3, 267, 179, 270, &g_MainInterfaceTextureArchive, mi_main_back01_tga);
	pBottomBorder->SetClipRect(3, 227, 180, 230);
	InsertChildObject(pBottomBorder);

	_XImageStatic* pTitleLeftBorder = new _XImageStatic;
	pTitleLeftBorder->Create(8, 22, 10, 42, &g_MainInterfaceTextureArchive, mi_skillwin_tga);
	pTitleLeftBorder->SetClipRect(4, 154, 6, 174);
	InsertChildObject(pTitleLeftBorder);

	_XImageStatic* pTitleCenterBorder = new _XImageStatic;
	pTitleCenterBorder->Create(10, 22, 173, 42, &g_MainInterfaceTextureArchive, mi_skillwin_tga);
	pTitleCenterBorder->SetClipRect(6, 154, 106, 174);
	pTitleCenterBorder->SetScale(163.f/100.f, 1.0f);
	InsertChildObject(pTitleCenterBorder);

	_XImageStatic* pTitleRightBorder = new _XImageStatic;
	pTitleRightBorder->Create(173, 22, 175, 42, &g_MainInterfaceTextureArchive, mi_skillwin_tga);
	pTitleRightBorder->SetClipRect(106, 154, 108, 174);
	InsertChildObject(pTitleRightBorder);

	// 교환 리스트
	_XLISTBOX_STRUCTURE resourcestructure = 
	{
		TRUE,											// 윈도우 활성화
		{ 9, 48 },		// 윈도우 좌표
		{ 167, 200 },	// 윈도우 사이즈
		_XDEF_NEWRESOURCEWINDOW_RESOURCELIST,			// 윈도우 command 아이디
		-1,												// 윈도우 border image
		&g_MainInterfaceTextureArchive,					// Texture list
		_T(" "),										// 윈도우 타이틀
		20,												// 리스트 아이템 라인 피치
		10,												// 리스트 박스에 보이는 최대 라인수
		_XLSTYLE_RIGHTSCROLLBAR,						// 스크롤바의 위치
		
		// scroll bar property
		{ 12, 200 },										// 스크롤바 사이즈
		12,													// 스크롤바 상하 버튼 사이즈
		22,													// 스크롤바 트랙바 사이즈
		255,												// 전체 리스트 갯수
		mi_chat_quick_tga,
		mi_chat_quick_tga,
		mi_chat_quick_tga,
		mi_chat_quick_tga,
		mi_chat_quick_tga
	};
	
	m_pResourceList = new _XListBox;
	m_pResourceList->Create(resourcestructure);
	
	_XVScrollBar* pScrollBar = m_pResourceList->GetScrollBarObject();
	if( pScrollBar )
	{
		_XSCRBAR_IMAGECLIPRECTSTRUCTURE cliprectstructure = 
		{
			{ 0,  0, 12, 12 },
			{ 24, 0, 36, 12 },
			{ 0,  12, 12, 24 },
			{ 24, 12, 36, 24 },
			{ 40,157, 52, 179}
		};
		pScrollBar->SetClipRect( cliprectstructure );	
	}
//	m_ResourceList->SetAlwaysShowScrollBarMode(TRUE);
//	m_ResourceList->SetSelectItemMouseHoverCallBack( _NPCResourceListBoxItemMouseHoverCallback );
	
	POINT columnoffset1 = { 0, 0 };
	POINT columnoffset2 = { 2, 2 };
	POINT columnoffset3 = { 38, 5 };
	m_pResourceList->SetColumnOffset(0, columnoffset1);				// column offset
	m_pResourceList->SetColumnOffset(1, columnoffset2);
	m_pResourceList->SetColumnOffset(2, columnoffset3);
	
	m_pResourceList->SetColumnStyle(0, _XLCOLUMNSTYLE_ICONRECT);		// column style (아이콘)
	m_pResourceList->SetColumnStyle(1, _XLCOLUMNSTYLE_ICONRECT);		// column style (아이콘)
	m_pResourceList->SetColumnStyle(2, _XLCOLUMNSTYLE_STRING);
	
	m_pResourceList->SetAlignType(0, _XFONT_ALIGNTYPE_LEFT);		// column align type
	m_pResourceList->SetAlignType(1, _XFONT_ALIGNTYPE_LEFT);
	m_pResourceList->SetAlignType(2, _XFONT_ALIGNTYPE_LEFT);
	
	m_pResourceList->SetColumnWidth(0, 150);						// column width (column offset과 맞지 않거나 부족해도 상관없음)
	m_pResourceList->SetColumnWidth(1, 150);
	m_pResourceList->SetColumnWidth(2, 134);
	
	m_pResourceList->SetTrackWidth(134);	
	m_pResourceList->ShowWindow(FALSE);
	InsertChildObject(m_pResourceList);

	m_pEmptyItemBorder = new _XImageStatic;
	m_pEmptyItemBorder->Create(0, 0, 32, 32, &g_MainInterfaceTextureArchive, mi_characterwin_tga);
	m_pEmptyItemBorder->SetClipRect(191, 0, 223, 32);
	
	m_pCompleteItemBorder = new _XImageStatic;
	m_pCompleteItemBorder->Create(0, 0, 32, 32, &g_MainInterfaceTextureArchive, mi_characterwin_tga);
	m_pCompleteItemBorder->SetClipRect(191, 33, 223, 65);

	// 버튼 (56x20)
	_XBTN_STRUCTURE btnstruct = 
	{	 TRUE, 
		{ 23, 241 }, 
		{ 56, 20 }, 
		_XDEF_NEWRESOURCEWINDOW_EXCHANGE,
		g_MainInterfaceTextureArchive.FindResource( "MI_Messenger1.tga" ),
		g_MainInterfaceTextureArchive.FindResource( "MI_Messenger1.tga" ),
		g_MainInterfaceTextureArchive.FindResource( "MI_Messenger1.tga" ),
		&g_MainInterfaceTextureArchive 
	};

	m_pExchangeBtn = new _XButton;
	m_pExchangeBtn->Create( btnstruct );
	m_pExchangeBtn->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 191, 196, 247, 216 );
	m_pExchangeBtn->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  191, 169, 247, 189 );
	m_pExchangeBtn->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  191, 223, 247, 243 );
	m_pExchangeBtn->SetButtonTextID( _XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_NPCRESOURCE_2265 );	// _T("교환하기")
	m_pExchangeBtn->SetButtonTextColor( 0xFFE0D7BA );
	m_pExchangeBtn->ShowWindow(FALSE);
	InsertChildObject( m_pExchangeBtn );

	btnstruct.position.x = 100;
	btnstruct.commandid = _XDEF_NEWRESOURCEWINDOW_CLOSE;

	m_pCloseBtn = new _XButton;
	m_pCloseBtn->Create( btnstruct );
	m_pCloseBtn->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 191, 196, 247, 216 );
	m_pCloseBtn->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  191, 169, 247, 189 );
	m_pCloseBtn->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  191, 223, 247, 243 );
	m_pCloseBtn->SetButtonTextID( _XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_MESSAGEBOX_CANCEL );	// _T("취소")
	m_pCloseBtn->SetButtonTextColor( 0xFFE0D7BA );
	m_pCloseBtn->ShowWindow(FALSE);
	InsertChildObject( m_pCloseBtn );

	return TRUE;
}
BOOL _XWindow_MatchNoticeSmall::Initialize()
{
	int pvpresourceindex = -1;
	if( g_LanguageType == _XLANGUAGE_TYPE_TAIWANESE )
	{
		pvpresourceindex = g_MainInterfaceTextureArchive.FindResource("tw_mi_pvp_01.tga");
	}
	else if( g_LanguageType == _XLANGUAGE_TYPE_ENGLISH )
	{
		pvpresourceindex = g_MainInterfaceTextureArchive.FindResource("us_mi_pvp_01.tga");
	}
	else if( g_LanguageType == _XLANGUAGE_TYPE_RUSSIAN )
	{
		pvpresourceindex = g_MainInterfaceTextureArchive.FindResource("rs_mi_pvp_01.tga");
	}
	else
	{
		pvpresourceindex = g_MainInterfaceTextureArchive.FindResource("mi_pvp_01.tga");
	}

	_XImageStatic* pLeftBorder = new _XImageStatic;
	pLeftBorder->Create(0, 0, 60, 59, &g_MainInterfaceTextureArchive, pvpresourceindex);
	pLeftBorder->SetClipRect(0, 121, 60, 180);
	InsertChildObject(pLeftBorder);

	_XImageStatic* pRightBorder = new _XImageStatic;
	pRightBorder->Create(212, 0, 222, 59, &g_MainInterfaceTextureArchive, pvpresourceindex);
	pRightBorder->SetClipRect(72, 121, 82, 180);
	InsertChildObject(pRightBorder);

	_XImageStatic* pCenterBorder = new _XImageStatic;
	pCenterBorder->Create(60, 0, 70, 59, &g_MainInterfaceTextureArchive, pvpresourceindex);
	pCenterBorder->SetClipRect(61, 121, 71, 180);
	pCenterBorder->SetScale(15.2f, 1.0f);
	InsertChildObject(pCenterBorder);

	_XImageStatic* pVSBorder = new _XImageStatic;
	pVSBorder->Create(99, 26, 123, 50, &g_MainInterfaceTextureArchive, pvpresourceindex);
	pVSBorder->SetClipRect(86, 155, 110, 179);
	InsertChildObject(pVSBorder);

	_XImageStatic* pVSImage = new _XImageStatic;
	pVSImage->Create(102, 28, 1, 48, &g_MainInterfaceTextureArchive, pvpresourceindex);
	pVSImage->SetClipRect(146, 1, 165, 21);
	InsertChildObject(pVSImage);

	m_DefaultRecordImage.Create(0, 0, 10, 10, &g_MainInterfaceTextureArchive, pvpresourceindex);
	m_DefaultRecordImage.SetClipRect(83, 104, 93, 114);

	_XImageStatic* pMyHPBorder_1 = new _XImageStatic;
	pMyHPBorder_1->Create(9, 32, 97, 44, &g_MainInterfaceTextureArchive, pvpresourceindex);
	pMyHPBorder_1->SetClipRect(82, 137, 126, 149);
	InsertChildObject(pMyHPBorder_1);

	_XImageStatic* pMyHPBorder_2 = new _XImageStatic;
	pMyHPBorder_2->Create(97, 32, 97, 44, &g_MainInterfaceTextureArchive, pvpresourceindex);
	pMyHPBorder_2->SetClipRect(82, 137, 126, 149);
	pMyHPBorder_2->SetScale(-1, 1);
	InsertChildObject(pMyHPBorder_2);

	_XImageStatic* pTargetHPBorder_1 = new _XImageStatic;
	pTargetHPBorder_1->Create(125, 32, 213, 44, &g_MainInterfaceTextureArchive, pvpresourceindex);
	pTargetHPBorder_1->SetClipRect(82, 137, 126, 149);
	InsertChildObject(pTargetHPBorder_1);
	
	_XImageStatic* pTargetHPBorder_2 = new _XImageStatic;
	pTargetHPBorder_2->Create(213, 32, 213, 44, &g_MainInterfaceTextureArchive, pvpresourceindex);
	pTargetHPBorder_2->SetClipRect(82, 137, 126, 149);
	pTargetHPBorder_2->SetScale(-1, 1);
	InsertChildObject(pTargetHPBorder_2);

	_XSTICKGAUGE_STRUCTURE gaugestruct = 
	{
		TRUE, {12, 35}, {82, 6},
			pvpresourceindex,
			-1,
			&g_MainInterfaceTextureArchive
	};
	
	m_MyVitalGauge = new _XStickGauge;
	m_MyVitalGauge->Create(gaugestruct);
	m_MyVitalGauge->SetImageClipRect(_XGAUGEIMAGE_BORDER, 84, 123, 166, 129);
	m_MyVitalGauge->SetFactorDraw(TRUE);
	m_MyVitalGauge->SetGaugeFactor(100.0f);
	m_MyVitalGauge->SetGaugeImageDrawType( _XGAUGEIMAGEDRAWTYPE_RESIZE );
	m_MyVitalGauge->SetViewDelayGauge( TRUE, 20 );
	m_MyVitalGauge->SetBlinking( TRUE, 10 );
	InsertChildObject(m_MyVitalGauge);
	
	gaugestruct.position.x = 128;
	gaugestruct.position.y = 35;
	
	m_TargetVitalGauge = new _XStickGauge;
	m_TargetVitalGauge->Create(gaugestruct);
	m_TargetVitalGauge->SetImageClipRect(_XGAUGEIMAGE_BORDER, 84, 130, 166, 136);
	m_TargetVitalGauge->SetFactorDraw(TRUE);
	m_TargetVitalGauge->SetGaugeFactor(100.0f);
	m_TargetVitalGauge->SetGaugeImageDrawType( _XGAUGEIMAGEDRAWTYPE_RESIZE );
	m_TargetVitalGauge->SetViewDelayGauge( TRUE, 20 );
	m_TargetVitalGauge->SetBlinking( TRUE, 10 );
	InsertChildObject(m_TargetVitalGauge);

	return TRUE;
}
Exemple #14
0
BOOL _XWindow_ItemDropConfirm::Initialize(void)
{
    int confirmimageindex = g_MainInterfaceTextureArchive.FindResource( "MI_Trade.tga" );

    _XImageStatic* pTitleBar = new _XImageStatic;
    pTitleBar->Create( 0, 0, 208, 88, &g_MainInterfaceTextureArchive, confirmimageindex );
    pTitleBar->SetClipRect( 0, 168, 207, 255 );
    InsertChildObject( pTitleBar );

    _XImageStatic* pEditImage = new _XImageStatic;
    pEditImage->Create(29, 35, 127, 53,
                       &g_MainInterfaceTextureArchive,
                       g_MainInterfaceTextureArchive.FindResource("MI_main_back01.tga"));
    pEditImage->SetClipRect(7, 201, 104, 219);
    InsertChildObject(pEditImage);

    int buttonindex = g_MainInterfaceTextureArchive.FindResource("MI_Trade.tga");

    _XBTN_STRUCTURE allbtnstruct =
    {
        TRUE, {128, 36}, {55, 17},
        _XDEF_ITEMDROPCONFIRM_ALL,
        buttonindex, buttonindex, buttonindex,
        &g_MainInterfaceTextureArchive
    };

    m_AllButton = new _XButton;
    m_AllButton->Create(allbtnstruct);
    m_AllButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 189, 78, 244, 95);
    m_AllButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 189, 98, 240, 115);
    m_AllButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 189, 118, 240, 135);
    m_AllButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 189, 188, 175));
    m_AllButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_TRADECONFIRM_ALL);
    InsertChildObject(m_AllButton);

    _XBTN_STRUCTURE okbtnstruct =
    {
        TRUE, {52, 59}, {52, 22},
        _XDEF_ITEMDROPCONFIRM_OK,
        buttonindex, buttonindex, buttonindex,
        &g_MainInterfaceTextureArchive
    };
    m_OKButton = new _XButton;
    m_OKButton->Create(okbtnstruct);
    m_OKButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 189, 28, 240, 49);
    m_OKButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 189, 3, 240, 24);
    m_OKButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 189, 53, 240, 74);
    m_OKButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 189, 188, 175));
    m_OKButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_ITEMDROPCONFIRM_OK);
    InsertChildObject(m_OKButton);

    _XBTN_STRUCTURE cancelbtnstruct =
    {
        TRUE, {107, 59}, {52, 22},
        _XDEF_ITEMDROPCONFIRM_CLOSE,
        buttonindex, buttonindex, buttonindex,
        &g_MainInterfaceTextureArchive
    };
    m_CancelButton = new _XButton;
    m_CancelButton->Create(cancelbtnstruct);
    m_CancelButton->SetButtonImageClipRect(_XBUTTONIMAGE_NORMAL, 189, 28, 240, 49);
    m_CancelButton->SetButtonImageClipRect(_XBUTTONIMAGE_READY, 189, 3, 240, 24);
    m_CancelButton->SetButtonImageClipRect(_XBUTTONIMAGE_CLICK, 189, 53, 240, 74);
    m_CancelButton->SetButtonTextColor(D3DCOLOR_ARGB(255, 214, 15, 15));
    m_CancelButton->SetButtonTextID(_XSTRINGDB_SN_EODSTRING_XSR, ID_STRING_ITEMDROPCONFIRM_CANCEL);
    InsertChildObject(m_CancelButton);

    m_IMEControl.ResetContainer();
    m_IMEControl.MoveWindow(m_WindowPosition.x + 40, m_WindowPosition.y + 39);
    m_IMEControl.ResizeWindow(76, 12);
    m_IMEControl.ShowWindow(FALSE);
    m_IMEControl.SetMaxLength(8);
    m_IMEControl.SetFocus();
    m_IMEControl.SetAlignType( _XFONT_ALIGNTYPE_RIGHT );
    m_IMEControl.SetNumericEditMode( TRUE, TRUE );

    m_IMEControl.SetEscapeKeyCallback( _XIMECallback_ItemDropConfirmEditEscape );
    m_IMEControl.SetReturnKeyCallback( _XIMECallback_ItemDropConfirmEditReturn );

    return TRUE;
}
Exemple #15
0
BOOL _XWindow_Pocket::Initialize( void )
{
	int resourceimageindex = g_MainInterfaceTextureArchive.FindResource( "MI_Main_Back01.tga" );

	m_ItemEdgeIcon[_XITEMEDGEICONTYPE_EMPTY].Create( 0, 0, 32, 32, &g_MainInterfaceTextureArchive, resourceimageindex );
	m_ItemEdgeIcon[_XITEMEDGEICONTYPE_EMPTY].SetClipRect( 214, 65, 246, 97 );

	m_ItemEdgeIcon[_XITEMEDGEICONTYPE_NORMAL].Create( 0, 0, 32, 32, &g_MainInterfaceTextureArchive, resourceimageindex );
	m_ItemEdgeIcon[_XITEMEDGEICONTYPE_NORMAL].SetClipRect( 214, 32, 246, 64 );	
	
	_XImageStatic* pTitleBar = new _XImageStatic;
	pTitleBar->Create(0, 0, 90, 18, &g_MainInterfaceTextureArchive, resourceimageindex );
	pTitleBar->SetClipRect( 0, 125, 91, 143 );
	InsertChildObject(pTitleBar);
	_XImageStatic* pTitleBarAdd = new _XImageStatic;
	pTitleBarAdd->Create(91, 0, 167, 18, &g_MainInterfaceTextureArchive, resourceimageindex );
	pTitleBarAdd->SetClipRect( 106, 125, 183, 143 );
	InsertChildObject(pTitleBarAdd);

	int resourceimageindex1 = g_MainInterfaceTextureArchive.FindResource( "MI_System.tga" );
	_XImageStatic* pBorder = new _XImageStatic;
	pBorder->Create(0, 18, 167, 142, &g_MainInterfaceTextureArchive, resourceimageindex1 );
	pBorder->SetClipRect( 6, 83, 174, 208 );
	InsertChildObject(pBorder);

	// bottom Line
	_XImageStatic* pBottomLine = new _XImageStatic;
	pBottomLine->Create(0, 143, 87, 145, &g_MainInterfaceTextureArchive, resourceimageindex1 );
	pBottomLine->SetClipRect( 0, 208, 88, 211 );
	InsertChildObject(pBottomLine);
	_XImageStatic* pBottomLine2 = new _XImageStatic;
	pBottomLine2->Create(88, 143, 167, 145, &g_MainInterfaceTextureArchive, resourceimageindex1 );
	pBottomLine2->SetClipRect( 103, 208, 183, 211 );
	InsertChildObject(pBottomLine2);

	// Left Line
	_XImageStatic* pLeftLine = new _XImageStatic;
	pLeftLine->Create(0, 18, 2, 143, &g_MainInterfaceTextureArchive, resourceimageindex );
	pLeftLine->SetClipRect( 248, 0, 251, 126 );
	InsertChildObject(pLeftLine);
	
	// Right Line
	_XImageStatic* pRightLine = new _XImageStatic;
	pRightLine->Create(165, 18, 167, 143, &g_MainInterfaceTextureArchive, resourceimageindex );
	pRightLine->SetClipRect( 248, 0, 251, 126 );
	InsertChildObject(pRightLine);

	// close, help
	resourceimageindex = g_MainInterfaceTextureArchive.FindResource( g_MI_CharTextureName );
	_XBTN_STRUCTURE closebtnstruct = { TRUE, { 136, 2 }, { 12, 12 }, _XDEF_POCKET_CLOSE,
									  resourceimageindex,resourceimageindex,resourceimageindex, 
									  &g_MainInterfaceTextureArchive };
	_XButton* pClosebutton = new _XButton;
	pClosebutton->Create( closebtnstruct );	
		
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL,  96, 238, 108, 250 );
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  108, 238, 120, 250 );
	pClosebutton->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  120, 238, 132, 250 );
	InsertChildObject( pClosebutton );

	
	_XBTN_STRUCTURE helpstruct = { TRUE, { 150, 2 }, { 12, 12 }, _XDEF_POCKET_HELP,
		resourceimageindex,resourceimageindex,resourceimageindex, 
		&g_MainInterfaceTextureArchive };
	_XButton* pHelpbutton = new _XButton;
	pHelpbutton->Create( helpstruct );	
	
	pHelpbutton->SetButtonImageClipRect( _XBUTTONIMAGE_NORMAL, 240, 88, 252, 100 );
	pHelpbutton->SetButtonImageClipRect( _XBUTTONIMAGE_READY,  240, 100, 252, 112 );
	pHelpbutton->SetButtonImageClipRect( _XBUTTONIMAGE_CLICK,  240, 112, 252, 124 );
	InsertChildObject( pHelpbutton );

	for( int i = 0; i < _XDEF_POCKET_MAX_SLOTNUMBER; i++ )
	{
		m_SlotPosition[i].x = _XDEF_POCKETITEMPOSX + ((i%4)*33);
		m_SlotPosition[i].y = _XDEF_POCKETITEMPOSY + ((i/4)*33);
	}	
	return TRUE;
}