diff --git a/Source/UI/EntryQueue/UIEntryQueueWnd.cpp b/Source/UI/EntryQueue/UIEntryQueueWnd.cpp index 2392a29e..d7b29b19 100644 --- a/Source/UI/EntryQueue/UIEntryQueueWnd.cpp +++ b/Source/UI/EntryQueue/UIEntryQueueWnd.cpp @@ -65,10 +65,83 @@ void UIEntryQueueRequestWnd::Paint() { } // OFFSET: 0x00BA5460 +// FUNCTION: fn_19694 +void UIEntryQueueRequestWnd::Slot19() { + const DWORD now = GetTickCount(); + const unsigned delta = now - this->m_lastTick; + this->m_delta = delta; + if (delta > this->m_interval) { + this->m_elapsed += this->m_interval; + this->m_lastTick = now; + this->Invalidate(); + } +} // OFFSET: 0x00BA54A0 +// FUNCTION: fn_19695 +int UIEntryQueueRequestWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { + if (message == 6) { + const int response = static_cast(a); + this->m_entryQueue->recorder.Record(this->geometry.id, response, b, c, d); + + if (response == 0) { + g_entryQueueMgr->SendAdmissionReply(1); + this->m_frameContext->windows.CloseWindow(209); + this->m_frameContext->windows.CloseWindow(210); + g_windowMgr.SendNotice(1, reinterpret_cast(LookupMessage(2132)), 0x64FFFF, 0, 0, 0); + } else if (response == 1) { + g_entryQueueMgr->SendAdmissionReply(2); + this->m_frameContext->windows.CloseWindow(209); + this->m_frameContext->windows.CloseWindow(210); + return 0; + } + } + + return 0; +} // OFFSET: 0x00BA5700 +// FUNCTION: fn_19698 +bool UIEntryQueueStandByWnd::Create() { + auto& text = this->m_entryQueue->text; + auto& controls = text.buttons; + + this->Resize(280, 120); + this->AddBaseButton(controls); + this->SetSize(280, 120); + this->Slot15(280, 120); + this->Slot22(280, 120); + this->Move((g_renderer->viewport.width - 640) / 2 + 185, (g_renderer->viewport.height - 480) / 2 + 180); + + this->m_viewer = new UITextViewer(*this->m_context, text); + this->m_viewer->Configure(10, 22, 260, 65, 0); + unsigned red, green, blue; + SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); + this->m_viewer->backgroundColor = 0xFF000000u | (blue << 16) | (green << 8) | red; + this->m_viewer->Invalidate(); + this->AddChild(this->m_viewer); + + const std::string path = "유저인터페이스\\"; + + this->m_cancel = new UIBitmapButton(*this->m_context, controls); + this->m_cancel->SetBitmap((path + "cancel_waiting" + ".bmp").c_str(), 0, 0); + this->m_cancel->SetBitmap((path + "cancel_waiting_a" + ".bmp").c_str(), 1, 0); + this->m_cancel->SetBitmap((path + "cancel_waiting_b" + ".bmp").c_str(), 2, 0); + this->m_cancel->SetSize(this->m_cancel->BitmapWidth(), this->m_cancel->BitmapHeight()); + this->m_cancel->Move(159, 96); + this->m_cancel->SetId(0); + this->AddChild(this->m_cancel); + + this->m_close = new UIBitmapButton(*this->m_context, controls); + this->m_close->SetBitmap((path + "btn_close" + ".bmp").c_str(), 0, 0); + this->m_close->SetBitmap((path + "btn_close_a" + ".bmp").c_str(), 1, 0); + this->m_close->SetBitmap((path + "btn_close_b" + ".bmp").c_str(), 2, 0); + this->m_close->SetSize(this->m_close->BitmapWidth(), this->m_close->BitmapHeight()); + this->m_close->Move(234, 96); + this->m_close->SetId(1); + this->AddChild(this->m_close); + return true; +} // OFFSET: 0x00BA5E50 // FUNCTION: fn_19699 @@ -76,6 +149,12 @@ void UIEntryQueueStandByWnd::Slot18() { } // OFFSET: 0x00BA5E60 +// FUNCTION: fn_19700 +void UIEntryQueueStandByWnd::Paint() { + auto& controls = this->m_entryQueue->text.buttons; + this->DrawTitleBar(controls.fonts, controls.locale, true, LookupMessage(2135), 0); + this->DrawPanelBackground(17, 0, ""); +} // OFFSET: 0x00BA5E90 // FUNCTION: fn_19701 @@ -83,10 +162,46 @@ void UIEntryQueueStandByWnd::Slot19() { } // OFFSET: 0x00BA5EA0 +// FUNCTION: fn_19702 +int UIEntryQueueStandByWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { + if (message == 6) { + const int response = static_cast(a); + this->m_entryQueue->recorder.Record(this->geometry.id, response, b, c, d); + + if (response == 0) { + g_entryQueueMgr->SendCancel(); + } else if (response == 1) { + this->m_frameContext->windows.CloseWindow(209); + return 0; + } + } + + return 0; +} // OFFSET: 0x00BA5EF0 +// FUNCTION: fn_19703 +void UIEntryQueueStandByWnd::SetInfo(const char* queueName, int waiting, int ranking) { + this->m_queueName = queueName; + this->m_waiting = waiting; + this->m_ranking = ranking; + sprintf_s(this->m_queueText, sizeof(this->m_queueText), LookupMessage(2136), queueName); + sprintf_s(this->m_waitingText, sizeof(this->m_waitingText), LookupMessage(2137), waiting); + sprintf_s(this->m_rankingText, sizeof(this->m_rankingText), LookupMessage(2138), ranking); + + if (this->m_viewer) { + this->m_viewer->Clear(); + this->m_viewer->SendMsg(nullptr, 29, reinterpret_cast(this->m_queueText), 38, 0, 0); + this->m_viewer->SendMsg(nullptr, 29, reinterpret_cast(this->m_waitingText), 38, 0, 0); + this->m_viewer->SendMsg(nullptr, 29, reinterpret_cast(this->m_rankingText), 38, 0, 0); + } +} // OFFSET: 0x00BA6410 +// FUNCTION: fn_19706 +int UIEntryQueueWnd::SelectedIndex() { + return this->m_list->selected; +} // OFFSET: 0x00BA7B90 // FUNCTION: fn_19713