void ZSellCashItemConfirmDlg::Update() { if (!m_bWaitActivatingOkBtn) return; DWORD currTime = timeGetTime(); if (currTime - m_nWaitActivatingOkBtnBeginTime > 3000) { m_bWaitActivatingOkBtn = false; CCButton* pButton = (CCButton*)GetIDLResource()->FindWidget("SellCashItemConfirmFrame_Sell"); if (pButton) pButton->Enable(true); } }
void ZSellCashItemConfirmDlg::Open(const char* szItemName, CCBitmap* pIcon, int price, int count, ISellCashItemConfirmDlgDoneHandler* pHandler) { CCPicture* pPicture = (CCPicture*)GetIDLResource()->FindWidget("SellCashItemConfirmFrame_Thumbnail"); if (pPicture) pPicture->SetBitmap(pIcon); CCLabel* pLabel = (CCLabel*)GetIDLResource()->FindWidget("SellCashItemConfirmFrame_ItemName"); if (pLabel) pLabel->SetText(szItemName); char szPrice[256]; sprintf(szPrice, "%d %s", price, ZMsg(MSG_CHARINFO_BOUNTY)); pLabel = (CCLabel*)GetIDLResource()->FindWidget("SellCashItemConfirmFrame_Bounty"); if (pLabel) pLabel->SetText(szPrice); CCTextArea* pTextArea = (CCTextArea*)GetIDLResource()->FindWidget("SellCashItemConfirmFrame_Warning"); if (pTextArea) pTextArea->SetText( ZMsg(MSG_SHOPEQUIP_SELL_CASHITEM_CONFIRM)); CCFrame* pFrame = (CCFrame*)GetIDLResource()->FindWidget("SellCashItemConfirmFrame"); if (pFrame) { pFrame->Show(true, true); } m_pDoneHandler = pHandler; // 유저가 지금 팔고자 하는 캐쉬아이템을 확실히 인지할수 있는 시간을 주기 위해 OK 버튼을 몇초후 활성화시킨다 CCButton* pButton = (CCButton*)GetIDLResource()->FindWidget("SellCashItemConfirmFrame_Sell"); if (pButton) { pButton->Enable(false); m_bWaitActivatingOkBtn = true; m_nWaitActivatingOkBtnBeginTime = timeGetTime(); } }