diff --git a/Source/UI/Item/UIMerchantItemLogWnd.cpp b/Source/UI/Item/UIMerchantItemLogWnd.cpp index e8361b893..05ebd8148 100644 --- a/Source/UI/Item/UIMerchantItemLogWnd.cpp +++ b/Source/UI/Item/UIMerchantItemLogWnd.cpp @@ -49,29 +49,26 @@ void UIMerchantItemLogWnd::OnCreate(int width, int height) { title->shadow = 1; this->AddChild(title); - UIResizer* resizer = new UIResizer(); - this->resizer = resizer; - resizer->SetSize(16, 16); - resizer->SetDirection(3); - resizer->SetBitmapName("유저인터페이스\\btn_resize.bmp"); - resizer->Move(this->geometry.width - 15, this->geometry.height - 15); - resizer->SetColors(0xFFFF00FF, 0xFFFF00FF); - this->AddChild(resizer); + this->resizer = new UIResizer(); + this->resizer->SetSize(16, 16); + static_cast(this->resizer)->SetDirection(3); + static_cast(this->resizer)->SetBitmapName("유저인터페이스\\btn_resize.bmp"); + this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15); + static_cast(this->resizer)->SetColors(0xFFFF00FF, 0xFFFF00FF); + this->AddChild(this->resizer); - UIScrollBar* scrollBar = new UIScrollBar(); - this->scrollBar = scrollBar; - scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - 38); - this->AddChild(scrollBar); + this->scrollBar = new UIScrollBar(); + static_cast(this->scrollBar)->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - 38); + this->AddChild(this->scrollBar); - UIBitmapButton* button = new UIBitmapButton(); - this->buttons[0] = button; - button->SetBitmap("유저인터페이스\\btn_close.bmp", 0, 0); - button->SetBitmap("유저인터페이스\\btn_close_a.bmp", 1, 0); - button->SetBitmap("유저인터페이스\\btn_close_b.bmp", 2, 0); - button->SetSize(button->BitmapWidth(), button->BitmapHeight()); - button->Move(this->geometry.width - 61, this->geometry.height - 24); - button->SetId(201); - this->AddChild(button); + this->buttons[0] = new UIBitmapButton(); + static_cast(this->buttons[0])->SetBitmap("유저인터페이스\\btn_close.bmp", 0, 0); + static_cast(this->buttons[0])->SetBitmap("유저인터페이스\\btn_close_a.bmp", 1, 0); + static_cast(this->buttons[0])->SetBitmap("유저인터페이스\\btn_close_b.bmp", 2, 0); + this->buttons[0]->SetSize(static_cast(this->buttons[0])->BitmapWidth(), static_cast(this->buttons[0])->BitmapHeight()); + this->buttons[0]->Move(this->geometry.width - 61, this->geometry.height - 24); + this->buttons[0]->SetId(201); + this->AddChild(this->buttons[0]); this->columns = 1; this->visibleRows = (height - 38) / 32; @@ -217,7 +214,11 @@ int UIMerchantItemLogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a switch (message) { case UM_COMMAND: if (a == 201) { - g_windowMgr.CloseWindow(this->mode != 0 ? 258 : 257); + if (this->mode != 0) { + g_windowMgr.CloseWindow(WID_MERCHANTITEMLOGWND_MODE_1); + } else { + g_windowMgr.CloseWindow(WID_MERCHANTITEMLOGWND_MODE_0); + } } break; case UM_RESIZE: @@ -248,8 +249,8 @@ int UIMerchantItemLogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a lcData data; data.name = LookupPlayerName(b); - data.itemName = item.DisplayName(0); data.time = c; + data.itemName = item.DisplayName(0); data.characterId = b; this->logs.push_back(data); this->Invalidate();