void CJTable::Update( POINT ptMouse ) { if( !IsVision() ) return; std::vector< CWinCtrl* >::iterator iter; for( iter = m_ViewItems.begin(); iter != m_ViewItems.end();++iter) (*iter)->Update( ptMouse ); }
void CTListItemParty::Draw(){ if(!IsVision()) return; POINT pt = GetPosition(); ResetTransform((float)pt.x, (float)pt.y); tagRECT pos; SetRect(&pos, 4, 0, 174, 20); unsigned int colour = 0xFF0000FF; if(!IsSelected()) colour = (mParty.mMemberCount < MaxMembers(mParty.mPartyLevel)) ? 0xFF000000 : 0xFFFF0000; drawFont(GameDATA->m_hFONT[FONT_SMALL], 1, &pos, colour, FONT_POS_LEFT, mParty.mLeaderName); drawFont(GameDATA->m_hFONT[FONT_SMALL], 1, &pos, colour, FONT_POS_RIGHT, String("Lev: %1").arg(mParty.mPartyLevel)); if(IsInside(mMouse.x, mMouse.y)){ if(!gPartyToolTip) gPartyToolTip = new Tooltip(); gPartyToolTip->Clear(); gPartyToolTip->AddString(String("Leader: %1").arg(mParty.mLeaderName)); gPartyToolTip->AddString(String("Party Level: %1").arg(mParty.mPartyLevel)); gPartyToolTip->AddString(String("Players: %1/%2").arg(mParty.mMemberCount).arg(MaxMembers(mParty.mPartyLevel))); gPartyToolTip->AddString(String("Average Level: %1").arg(mParty.mAverageLevel)); gPartyToolTip->AddString(String("Zone: %1").arg(StringManager::Instance()->GetZoneName(mParty.mZoneNO))); mMouse.x += 20; gPartyToolTip->SetPosition(mMouse); gDrawToolTip = true; } }
/// CWinCtrl void CJTable::Draw() { if( !IsVision() ) return; std::vector< CWinCtrl* >::iterator iter; for( iter = m_ViewItems.begin(); iter != m_ViewItems.end();++iter) (*iter)->Draw(); }
void CTDefaultTreeNodeRenderer::Draw( POINT ptDraw ) { m_pFontImpl = CTControlMgr::GetInstance()->GetFontMgr(); if( !IsVision() ) return; if( m_pNodeImage ) { if( m_pImage ) { m_pImage->Draw( ptDraw ); m_pNodeImage->SetPosition( ptDraw.x + m_pImage->GetWidth(), ptDraw.y ); } else { m_pNodeImage->SetPosition( ptDraw.x + m_sizeImage.cx, ptDraw.y ); } m_pNodeImage->Draw(); m_pFontImpl->Draw( 0, true, m_pNodeImage->GetWidth(), 0, m_color, m_strText.c_str()); } else { m_pFontImpl->SetTransformSprite( (float)ptDraw.x, (float)ptDraw.y ); m_pFontImpl->Draw( 0, true, 9, 0, m_color, m_strText.c_str()); } }
unsigned CMemoViewDlg::Process( unsigned uiMsg, WPARAM wParam, LPARAM lParam ) { if(!IsVision() ) return 0; if( unsigned uiProcID = CTDialog::Process( uiMsg, wParam, lParam )) { if( uiMsg == WM_LBUTTONUP ) { switch( uiProcID ) { case IID_BTN_DELETE: CSqliteDB::GetInstance().DeleteMemo( m_iID ); /// 클라이언트 DB에서 삭제 if( CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_COMMUNITY ) ) { CCommDlg* pCommDlg = (CCommDlg*)pDlg; pCommDlg->DeleteMemo( m_iID ); } Hide(); break; case IID_BTN_CLOSE: case IID_BTN_OK: Hide(); break; default: break; } } return uiMsg; } return 0; }
unsigned CClanOrganizeDlg::Process( unsigned uiMsg, WPARAM wParam, LPARAM lParam ) { if( !IsVision() ) return 0; if( unsigned uiProcID = CTDialog::Process( uiMsg, wParam,lParam )) { switch( uiMsg ) { case WM_LBUTTONUP: { switch( uiProcID ) { case IID_BTN_CONFIRM: OrganizeClan(); break; case IID_BTN_CLOSE: case IID_BTN_CANCEL: Hide(); break; default: break; } } case WM_LBUTTONDOWN: OnLButtonDown( uiProcID, wParam, lParam ); break; default: break; } return uiMsg; } return 0; }
unsigned int CTargetMenu::Process(UINT uiMsg,WPARAM wParam,LPARAM lParam) { if(!IsVision()) return 0; unsigned iProcID = 0; if( iProcID = CTDialog::Process(uiMsg,wParam,lParam)) { switch(uiMsg) { case WM_LBUTTONUP: { if( OnLButtonUp( iProcID ) ) return uiMsg; break; } case WM_RBUTTONDOWN: Hide(); break; default: break; } return uiMsg; } else { if( uiMsg == WM_RBUTTONDOWN ) { Hide(); return uiMsg; } } return 0; }
unsigned int CTListItemParty::Process(UINT uiMsg, WPARAM wParam, LPARAM lParam){ if(!IsVision()) return 0; CMousePos pos; pos.mousePos = (long)lParam; if(IsInside(pos.x, pos.y)){ if(uiMsg == WM_LBUTTONUP){ ((CZListBox*)GetParent())->DeselectAll(); SetSelected(); return 1; } else if(uiMsg == WM_LBUTTONDBLCLK){ if(CTDialog* dlgChat = IT_MGR::Instance()->FindDlg(DLG_TYPE_CHAT)){ if(CTEditBox* editBox = (CTEditBox*)dlgChat->Find(15)){ editBox->clear_text(); editBox->AppendText(String("@%1 ").arg(mParty.mLeaderName)); } } return 1; } } return 0; }
void CSkillDLG::Draw() { if( !IsVision() ) return ; CTDialog::Draw(); DrawTexts(); }
void CClanOrganizeDlg::Draw() { if( !IsVision() ) return; CTDialog::Draw(); g_DrawImpl.Draw( (int)m_sPosition.x + m_ptPreViewMark.x, (int)m_sPosition.y + m_ptPreViewMark.y, IMAGE_RES_CLANBACK, m_iSelectedClanBack ); g_DrawImpl.Draw( (int)m_sPosition.x + m_ptPreViewMark.x, (int)m_sPosition.y + m_ptPreViewMark.y, IMAGE_RES_CLANCENTER, m_iSelectedClanCenter ); }
unsigned CTPane::Process( unsigned uiMsg, WPARAM wParam, LPARAM lParam ) { if( !IsVision() ) return 0; if( unsigned uiProcID = m_Children.Process( uiMsg, wParam,lParam ) ) return uiProcID; return 0; }
void CTComboBox::OwnerDraw() { if( !IsVision() ) return; DrawDropBoxImage(); if( m_pListBox ) m_pListBox->Draw(); }
void CTree::Draw() { if( !IsVision() ) return; if( m_pTreeModel == NULL ) return; if( m_pTreeNodeRenderer == NULL ) return; int iSelectRow = ((CTDefaultTreeModel*)m_pTreeModel )->getSelectRow(); int iExtent = m_iExtent; int iStart = m_iValue; DrawTree( (ITreeNode*)m_pTreeModel->getRoot(), m_sPosition, iSelectRow ,iExtent ,iStart ); }
void CJComboBox::Draw() { if( !IsVision() ) return; DrawSelectedItem(); if( m_pDropButton ) m_pDropButton->Draw(); if( !m_bOwnerDraw ) OwnerDraw(); }
void CJComboBox::Update( POINT ptMouse ) { if( !IsVision() ) return; if( m_pListBox ) m_pListBox->Update( ptMouse ); if( m_pDropButton ) m_pDropButton->Update( ptMouse ); return; }
void CChatRoomDlg::Draw() { if( !IsVision() ) return; CTDialog::Draw(); D3DXMATRIX mat; D3DXMatrixTranslation( &mat, (float)m_sPosition.x, (float)m_sPosition.y,0.0f); ::setTransformSprite( mat ); //멤버 아이디 그리기 const char* pszTitle = NULL; if(CChatRoom::GetInstance().GetTitle()) { pszTitle = CChatRoom::GetInstance().GetTitle(); if( pszTitle ) ::drawFont( g_GameDATA.m_hFONT[ FONT_NORMAL ], true, 30, 6, g_dwWHITE, pszTitle ); } if( m_iTab == TAB_MEMBER && !m_bMinimize) { std::list< CChatMember >::iterator iter; int i = 0; for( iter = m_Members.begin(); iter != m_Members.end(); ++iter,++i ) { ::drawFont( g_GameDATA.m_hFONT[ FONT_NORMAL ], true, c_ptDrawMemberName[i].x, c_ptDrawMemberName[i].y, g_dwWHITE, iter->GetName() ); } } #ifdef __PRIVATECHAT2 if( strlen(CChatRoom::GetInstance().GetTitle()) && CChatRoom::GetInstance().GetPassword() ) { SIZE size = getFontTextExtent( g_GameDATA.m_hFONT[ FONT_NORMAL ], pszTitle ); int iImageID = CResourceMgr::GetInstance()->GetImageNID( UI_IMAGE_RES_ID, "CHATROOM_LOCK" ); g_DrawImpl.Draw( m_sPosition.x+size.cx+4+30, m_sPosition.y+6, UI_IMAGE_RES_ID, iImageID ); } #endif }
unsigned CJTable::Process( unsigned uiMsg, WPARAM wParam, LPARAM lParam ) { if( !IsVision() ) return 0; unsigned uiProcID; std::vector< CWinCtrl* >::iterator iter; for( iter = m_ViewItems.begin(); iter != m_ViewItems.end();++iter ) { uiProcID = (*iter)->Process(uiMsg, wParam, lParam ); if( uiProcID ) { m_iSelectedItemID = uiProcID; return GetControlID(); } } return 0; }
///*---------------------------------------------------------------------------------------- /// CWinCtrl unsigned int CTree::Process( UINT uiMsg,WPARAM wParam,LPARAM lParam ) { if(!IsVision() ) return 0; POINT ptMouse = { LOWORD(lParam), HIWORD(lParam ) }; //영역안에 있는지 체크 if(!IsInside( ptMouse.x, ptMouse.y )) { //m_iButtonState = BS_NORMAL; return 0; } ptMouse.x -= m_sPosition.x; ptMouse.y -= m_sPosition.y; RECT rc = { 0,0,m_iWidth,m_iRowHeight }; int iRow = 0; switch( uiMsg ) { case WM_LBUTTONDOWN: { for( ; rc.bottom < m_iHeight; rc.top += m_iRowHeight, rc.bottom += m_iRowHeight, ++iRow ) { if( PtInRect( &rc, ptMouse ) ) { OnLButtonDown( iRow ); return m_iControlID; } } break; } case WM_LBUTTONDBLCLK: { for( ; rc.bottom < m_iHeight; rc.top += m_iRowHeight, rc.bottom += m_iRowHeight, ++iRow ) { if( PtInRect( &rc, ptMouse ) ) { OnLButtonDblClk( iRow ); return m_iControlID; } } break; } } return m_iControlID; }
void CMemoViewDlg::Draw() { if(!IsVision() ) return; CTDialog::Draw(); #ifdef __PRIVATECHAT2 #else D3DXMATRIX mat; D3DXMatrixTranslation( &mat, (float)m_sPosition.x, (float)m_sPosition.y,0.0f); ::setTransformSprite( mat ); drawFont( g_GameDATA.m_hFONT[ FONT_NORMAL_BOLD ], true, 40, 8, g_dwORANGE, CStr::Printf("From:%s", m_strName.c_str() ) ); RECT rcDraw ={ 10, 30, 200, 100 }; drawFont( g_GameDATA.m_hFONT[ FONT_NORMAL], true, &rcDraw, g_dwWHITE, DT_WORDBREAK ,m_strContent.c_str() ); #endif }
unsigned int CTListBox::Process( UINT uiMsg,WPARAM wParam,LPARAM lParam ) { if( !IsVision() ) return 0; POINT ptMouse = { LOWORD(lParam), HIWORD(lParam ) }; if( uiMsg == WM_LBUTTONDOWN ) int mm = 0; if( IsSelectable() && ProcessSelectable( uiMsg , wParam, lParam ) ) return m_iControlID; if( (uiMsg == WM_LBUTTONDOWN || uiMsg == WM_LBUTTONDBLCLK ) && IsInside( ptMouse.x, ptMouse.y ) && IsSelectable() ) { int iExtent = m_nMaxLnCnt; int iCount = 0; RECT rcHitTest = {0,0,0,0}; if( m_nPutLnNum + m_nMaxLnCnt >= (int)m_ITM.size() )///리스트의 최대범위밖으로 안나가도록 수정 iExtent = (int)m_ITM.size() - m_nPutLnNum; for( int i = m_nPutLnNum; i < m_nPutLnNum + iExtent ; ++i , ++iCount) { rcHitTest.left = m_sPosition.x ; rcHitTest.top = m_sPosition.y + iCount * ( m_iLineSpace + m_iCharHeight ); rcHitTest.right = rcHitTest.left + m_iWidth; rcHitTest.bottom = rcHitTest.top + m_iCharHeight; if( PtInRect( &rcHitTest, ptMouse )) { m_iSelectedItem = i; return GetControlID(); } } // m_iSelectedItem = -1; } return 0; }
UINT CCreateAvata::Process( UINT uiMsg, WPARAM wParam, LPARAM lParam ) { if( !IsVision() ) return 0; unsigned iProcID; if( iProcID = CTDialog::Process( uiMsg, wParam, lParam ) ) { switch( uiMsg ) { case WM_LBUTTONUP: { OnLButtonUp( iProcID ); break; } default: break; } return uiMsg; } return 0; }
void CCreateAvata::Draw() { if( !IsVision() ) return; CTDialog::Draw(); CWinCtrl * pCtrl = NULL; if( pCtrl = Find("SEX_TXT") ) { ((CTImage*)pCtrl)->SetAlign( DT_CENTER | DT_VCENTER ); ((CTImage*)pCtrl)->SetText(m_mapSex[m_iSelectedSex].m_strIdentify.c_str()); } if( pCtrl = Find("FACE_TXT") ) { ((CTImage*)pCtrl)->SetAlign( DT_CENTER | DT_VCENTER ); ((CTImage*)pCtrl)->SetText(m_mapFace[m_iSelectedFace].m_strIdentify.c_str()); } if( pCtrl = Find("HAIR_TXT") ) { ((CTImage*)pCtrl)->SetAlign( DT_CENTER | DT_VCENTER ); ((CTImage*)pCtrl)->SetText(m_mapHair[m_iSelectedHair].m_strIdentify.c_str()); } }
void CTListBox::Draw() { if(!IsVision() || m_pFontMgr == NULL || m_bOwnerDraw ) return ; int iValue = GetValue();///첫번째 찍을 라인 int iExtent = GetExtent();///화면에 보여줄수 있는 최대 라인수 if( iValue + iExtent >= (int)m_ITM.size() )///리스트의 최대범위밖으로 안나가도록 수정 iExtent = (int)m_ITM.size() - iValue; m_pFontMgr->SetTransformSprite( (float)m_sPosition.x, (float)m_sPosition.y ); D3DCOLOR dwColor ; int iPosY = 0 ; for( int i = iValue; i < iValue + iExtent ; ++i ) { if( i >= (int)m_ITM.size() || i < 0 ) break; if( m_iSelectedItem == i ) dwColor = D3DCOLOR_ARGB( 255, 255, 128, 0); else dwColor = m_ITM[i].m_dwColor; if( m_ITM[i].m_szTxt ) { m_ITM[i].m_bDrawn = true; if( strlen( m_ITM[i].m_szTxt ) > 0 ) m_pFontMgr->Draw( m_iFont, true, 0, iPosY, dwColor, m_ITM[i].m_szTxt ); else m_pFontMgr->Draw( m_iFont, true, 0, iPosY, dwColor, " " ); iPosY += m_iCharHeight + m_iLineSpace; } } }
unsigned int CTDuelInvite::Process(UINT uiMsg, WPARAM wParam, LPARAM lParam){ if (!IsVision()) return 0; unsigned int controlID = CTDialog::Process(uiMsg, wParam, lParam); if(uiMsg == WM_LBUTTONUP){ switch(controlID){ case IID_BTN_OK: // OK { CUserInputState* inputState = CUserInputState::Instance(); CGameOBJ* self = CObjMGR::GetSelf(); if(!inputState || !self) break; int duelZulie = GetNumber(); if(duelZulie > 1000000){ Hide(); IT_MGR::Instance()->OpenMsgBox("You can only bet up to 1,000,000 zulie.", MsgBox::BT_OK, false, 0, NULL, NULL, 0); break; } int zulie = self->GetStat(40); if(zulie < duelZulie){ Hide(); IT_MGR::Instance()->OpenMsgBox("You do not have enough zulie.", MsgBox::BT_OK, false, 0, NULL, NULL, 0); break; } int zoneNO = CTERRAIN::Instance()->m_nZoneNO; if(zoneNO >= 70 || ((zoneNO != 6 && zoneNO != 29) && CGameDATA::Instance()->m_iPvPState != PVP_CANT)){ Hide(); IT_MGR::Instance()->OpenMsgBox("You cannot duel in this PVP Zone.", MsgBox::BT_OK, false, 0, NULL, NULL, 0); break; } short mode = 1; if(CTComboBox* comboBox = (CTComboBox*)Find(IID_BTN_COMBOMODE)){ mode = comboBox->GetSelectedItemID(); } int target = inputState->m_iCurrentTarget; if(!target){ Hide(); IT_MGR::Instance()->OpenMsgBox("Select a player.", MsgBox::BT_OK, false, 0, NULL, NULL, 0); break; } int serverIndex = CObjMGR::Instance()->Get_ServerObjectIndex(inputState->m_iCurrentTarget); Packet* pak = new Packet(PAK_DUEL); pak->Add<byte>(0); // Request pak->Add<int>(serverIndex); pak->Add<int>(duelZulie); pak->Add<int>(mode); SendPacket::Instance()->Send(pak); if(CObjCHAR* object = CObjMGR::Instance()->Get_ClientCharOBJ(serverIndex, false)) IT_MGR::Instance()->AppendChatMsg(String("Sent duel invite to %1.").arg(object->GetName()), CHAT_TYPE_SYSTEM); delete pak; Hide(); } break; case IID_BTN_CANCEL: Hide(); break; } }else if(uiMsg == WM_LBUTTONUP){ if(CTEditBox* editBox = ((CTEditBox*)Find(IID_BTN_EDITBOX))) editBox->SetFocus( true ); } return controlID; }
void CTPane::Draw() { if( !IsVision() ) return; m_Children.Draw(); }
unsigned CChatFilterDlg::Process( unsigned uiMsg, WPARAM wParam , LPARAM lParam ) { if( !IsVision() ) return 0; if( unsigned uiProcID = CTDialog::Process( uiMsg, wParam, lParam ) ) { if( uiMsg == WM_LBUTTONDOWN ) { switch( uiProcID ) { case CHECKBOX_ALL: { if( m_filter.Filters[1] != 2 ) { if( CWinCtrl* pCtrl = Find( CHECKBOX_SYSTEM ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; pBox->SetCheck(); } m_filter.Filters[1] = 1; } if( m_filter.Filters[2] != 2 ) { if( CWinCtrl* pCtrl = Find( CHECKBOX_TRADE ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; pBox->SetCheck(); } m_filter.Filters[2] = 1; } if( m_filter.Filters[3] != 2 ) { if( CWinCtrl* pCtrl = Find( CHECKBOX_PARTY ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; pBox->SetCheck(); } m_filter.Filters[3] = 1; } if( m_filter.Filters[4] != 2 ) { if( CWinCtrl* pCtrl = Find( CHECKBOX_CLAN ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; pBox->SetCheck(); } m_filter.Filters[4] = 1; } if( m_filter.Filters[5] != 2 ) { if( CWinCtrl* pCtrl = Find( CHECKBOX_ALLIED ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; pBox->SetCheck(); } m_filter.Filters[5] = 1; } if( m_filter.Filters[6] != 2 ) { if( CWinCtrl* pCtrl = Find( CHECKBOX_SHOUT ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; pBox->SetCheck(); } m_filter.Filters[6] = 1; } if( CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_CHAT ) ) { CChatDLG* pChatDlg = (CChatDLG*)pDlg; pChatDlg->SetCurrentTabFilter( m_filter ); } } break; case CHECKBOX_SYSTEM: { if( CWinCtrl* pCtrl = Find( CHECKBOX_SYSTEM ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; if( pBox->IsCheck() ) m_filter.Filters[1] = 1; else m_filter.Filters[1] = 0; if( CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_CHAT ) ) { CChatDLG* pChatDlg = (CChatDLG*)pDlg; pChatDlg->SetCurrentTabFilter( m_filter ); } } } break; case CHECKBOX_TRADE: { if( CWinCtrl* pCtrl = Find( CHECKBOX_TRADE ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; if( pBox->IsCheck() ) m_filter.Filters[2] = 1; else m_filter.Filters[2] = 0; if( CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_CHAT ) ) { CChatDLG* pChatDlg = (CChatDLG*)pDlg; pChatDlg->SetCurrentTabFilter( m_filter ); } } } break; case CHECKBOX_PARTY: { if( CWinCtrl* pCtrl = Find( CHECKBOX_PARTY ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; if( pBox->IsCheck() ) m_filter.Filters[3] = 1; else m_filter.Filters[3] = 0; if( CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_CHAT ) ) { CChatDLG* pChatDlg = (CChatDLG*)pDlg; pChatDlg->SetCurrentTabFilter( m_filter ); } } } break; case CHECKBOX_CLAN: { if( CWinCtrl* pCtrl = Find( CHECKBOX_CLAN ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; if( pBox->IsCheck() ) m_filter.Filters[4] = 1; else m_filter.Filters[4] = 0; if( CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_CHAT ) ) { CChatDLG* pChatDlg = (CChatDLG*)pDlg; pChatDlg->SetCurrentTabFilter( m_filter ); } } } case CHECKBOX_WHISPER: { if( CWinCtrl* pCtrl = Find( CHECKBOX_WHISPER ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; if( pBox->IsCheck() ) m_filter.Filters[5] = 1; else m_filter.Filters[5] = 0; if( CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_CHAT ) ) { CChatDLG* pChatDlg = (CChatDLG*)pDlg; pChatDlg->SetCurrentTabFilter( m_filter ); } } } break; case CHECKBOX_SHOUT: { if( CWinCtrl* pCtrl = Find( CHECKBOX_SHOUT ) ) { CTCheckBox* pBox = (CTCheckBox*)pCtrl; if( pBox->IsCheck() ) m_filter.Filters[6] = 1; else m_filter.Filters[6] = 0; if( CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_CHAT ) ) { CChatDLG* pChatDlg = (CChatDLG*)pDlg; pChatDlg->SetCurrentTabFilter( m_filter ); } } } break; default: break; } } return uiMsg; } return 0; }
void CSeparateDlg::Draw() { if( !IsVision() ) return; CTDialog::Draw(); m_pCurrState->Draw(); m_MaterialItemSlot.Draw(); CIcon* pIcon = NULL; CWinCtrl * pCtrl = NULL; CWinCtrl * pCtrl2 = NULL; RECT rcDraw, rcDrawCount; int iGapY = 0; ///필요 MP or 줄리 D3DXMATRIX mat; D3DXMatrixTranslation( &mat, (float)m_sPosition.x, (float)m_sPosition.y,0.0f); ::setTransformSprite( mat ); if( pIcon = m_MaterialItemSlot.GetIcon() ) { if( pCtrl = Find("DEST_ITEM_NAME") ) { ((CTImage*)pCtrl)->SetAlign(DT_CENTER | DT_VCENTER); ((CTImage*)pCtrl)->SetText(pIcon->GetName());//대상 아이템 } } //05. 12. 23 - 김주현 : 분해가.. 기본스킬에 등록됨에 따라 기존에 뺏어오던 돈이랑 mp는 삭제되었다 //하지만 UI 작업이 아직 안된 관계로 찍는 부분만 삭제하고 나중에 UI 수정 작업을 해줘야 한다. /* if(pCtrl = Find("REQ_MP_NUM")) { SetRect( &rcDraw, pCtrl->GetOffset().x, pCtrl->GetOffset().y, pCtrl->GetOffset().x+pCtrl->GetWidth(), pCtrl->GetOffset().y+pCtrl->GetHeight() ); CSeparate& Separate = CSeparate::GetInstance(); switch( Separate.GetType() ) { case CSeparate::TYPE_SKILL: drawFontf( g_GameDATA.m_hFONT[ FONT_NORMAL ], true, &rcDraw ,g_dwWHITE,DT_RIGHT,"%d", Separate.GetRequireMp() ); break; case CSeparate::TYPE_NPC: drawFontf( g_GameDATA.m_hFONT[ FONT_NORMAL ], true, &rcDraw ,g_dwWHITE,DT_RIGHT,"%d", Separate.GetRequireMoney() ); break; default: break; } } */ if(pCtrl = Find( "MATERIAL_00" )) { SetRect( &rcDraw, pCtrl->GetOffset().x, pCtrl->GetOffset().y + 2, pCtrl->GetOffset().x + pCtrl->GetWidth(), pCtrl->GetOffset().y + pCtrl->GetHeight() + 2); if( pCtrl2 = Find( "MATERIAL_01" ) ) { iGapY = pCtrl2->GetPosition().y - pCtrl->GetPosition().y; } } if(pCtrl = Find( "MATERIAL_NUM_00" )) { SetRect( &rcDrawCount, pCtrl->GetOffset().x, pCtrl->GetOffset().y, pCtrl->GetOffset().x + pCtrl->GetWidth(), pCtrl->GetOffset().y + pCtrl->GetHeight() ); } int j= 0; m_ResultItemSet = CSeparate::GetInstance().GetResultItemSet(); std::vector< CSlot >::iterator iter; CSeparateDlgStateResult* pSeparateStateResult = CSeparateDlgStateResult::GetInstance(); if(!pSeparateStateResult->GetStartSeparateState()) { m_vecSingleString.clear(); } else { if( pSeparateStateResult == NULL) return; if(pSeparateStateResult->GetViewNum() > 4) { iViewItem = -1; } else { iViewItem = pSeparateStateResult->GetViewNum(); } for( int i = 0; i < CSeparate::GetInstance().GetResultCnt() - 1 && i <= iViewItem; i++) { m_OutputItemSlots[i].Draw(); D3DXMatrixTranslation( &mat, (float)m_sPosition.x, (float)m_sPosition.y,0.0f); ::setTransformSprite( mat ); if( pIcon = m_OutputItemSlots[i].GetIcon() ) { CSinglelineString sStrBuf; sStrBuf.set_color(g_dwBLACK); sStrBuf.set_format(DT_CENTER | DT_VCENTER); sStrBuf.set_string( pIcon->GetName() , rcDraw ); sStrBuf.draw(); if( sStrBuf.is_ellipsis() ) { m_vecSingleString.push_back( sStrBuf ); } char Temp[125] = ""; sprintf( Temp, "%d",CSeparate::GetInstance().GetOutputItemQuantity(i) ); drawFont( g_GameDATA.m_hFONT[ FONT_NORMAL ], true, &rcDrawCount, g_dwWHITE, DT_CENTER , Temp ); } rcDraw.top += iGapY; rcDraw.bottom += iGapY; rcDrawCount.top += iGapY; rcDrawCount.bottom += iGapY; } } }
unsigned CSeparateDlg::Process( unsigned uiMsg, WPARAM wParam, LPARAM lParam ) { if( !IsVision() ) return 0; return m_pCurrState->Process( uiMsg, wParam, lParam ); }
void CSeparateDlg::Update( POINT ptMouse ) { if( !IsVision() ) return; CTDialog::Update( ptMouse ); RECT rcDrawName = { 27, 189, 27 + 88, 189 + 18 }; if( CSeparate::GetInstance().GetType() == CSeparate::TYPE_NPC ) { WORD wNpcSvrIdx = CSeparate::GetInstance().GetNpcSvrIdx(); CObjCHAR* pNpc = g_pObjMGR->Get_ClientCharOBJ( wNpcSvrIdx, false ); if( !( pNpc && g_pAVATAR->IsInRANGE( pNpc, AVT_CLICK_EVENT_RANGE )) ) { Hide(); CSeparate::GetInstance().RemoveItem(); } } m_pCurrState->Update( ptMouse ); m_MaterialItemSlot.Update( ptMouse ); CSeparateDlgStateResult* pSeparateStateResult = CSeparateDlgStateResult::GetInstance(); m_ResultItemSet = CSeparate::GetInstance().GetResultItemSet(); if(!pSeparateStateResult->GetStartSeparateState()) { } else { if( pSeparateStateResult == NULL) return; if(pSeparateStateResult->GetViewNum() > 4 || pSeparateStateResult->GetViewNum() == NULL) { iViewItem = 0; } else { iViewItem = pSeparateStateResult->GetViewNum(); } for( int i = 0, j = 0 ; i < CSeparate::GetInstance().GetResultCnt() - 1 && j <= iViewItem; i++, j++) { if(!pSeparateStateResult->GetCheckUpdate()) m_OutputItemSlots[i].Update( ptMouse ); } } //긴 아이템 이름 툴팁. vector<CSinglelineString>::iterator itor = m_vecSingleString.begin(); while( itor != m_vecSingleString.end() ) { CSinglelineString & sStrBuf = (*itor); if( sStrBuf.is_ellipsis() ) { POINT ptPoint = { ptMouse.x - m_sPosition.x , ptMouse.y - m_sPosition.y }; const RECT& rect_name = rcDrawName; if( PtInRect( &rect_name, ptPoint ) ) { sStrBuf.get_rect().left; sStrBuf.get_rect().top; CToolTipMgr::GetInstance().RegToolTip( rcDrawName.left + m_sPosition.x - 20, rcDrawName.top + m_sPosition.y - 20, sStrBuf.get_string() ); return; } } itor++; } }
void CTDuelInvite::Draw(){ if(!IsVision()) return; CTDialog::Draw(); }