diff --git a/Source/UI/Enchant/UIEnchantUI.cpp b/Source/UI/Enchant/UIEnchantUI.cpp index f7459a40..16fa8896 100644 --- a/Source/UI/Enchant/UIEnchantUI.cpp +++ b/Source/UI/Enchant/UIEnchantUI.cpp @@ -463,6 +463,137 @@ void CUINormal::Slot15(int width, int height) { } // OFFSET: 0x009FF700 +// FUNCTION: fn_14827 +void CUISlot::Slot15(int width, int height) { + this->radioButton = new CUIRadioButton(*this->m_context); + this->radioButton->SetSize(44, 44); + this->radioButton->Move(59, 1); + this->radioButton->SetOnSelect([this](CUIRadioButton* button) { this->SelectSlot(button); }); + this->radioButton->disabled = 0; + this->radioButton->Invalidate(); + { + const std::uint8_t disabledSource[] = { + 0xF7, 0xE8, 0x6D, 0xC3, 0x7F, 0x2B, 0x6C, 0xDA, 0xF1, 0xA3, 0x6D, 0xF5, 0x02, 0x5F, 0xF5, 0x52, + 0x59, 0x24, 0xC5, 0x58, 0xD1, 0x91, 0xFC, 0x5E, 0x6B, 0x25, 0xD9, 0x57, 0xE0, 0x96, 0xC6, 0x74, + 0x5C, 0x22, 0xD9, 0x66, 0xD0, 0x90, 0xDD, 0x39, 0x55, 0x2A, 0xDD, 0x39 + }; + // GLOBAL: gl_25189 + thread_local EncryptedName disabledName(disabledSource); + const std::string disabled(disabledName.Text()); + const std::uint8_t pressedSource[] = { + 0x65, 0x32, 0xAD, 0x03, 0xA3, 0xE9, 0xB2, 0xCE, 0x63, 0x79, 0xAD, 0x35, 0xDE, 0x9D, 0x2B, 0x46, + 0xCB, 0xFE, 0x05, 0x98, 0x0D, 0x53, 0x22, 0x4A, 0xF9, 0xFF, 0x19, 0x97, 0x3C, 0x54, 0x18, 0x60, + 0xCE, 0xF8, 0x19, 0xA6, 0x0C, 0x51, 0x12, 0x71, 0x8B, 0xFF, 0x00, 0x89, 0x63 + }; + // GLOBAL: gl_25190 + thread_local EncryptedName pressedName(pressedSource); + const std::string pressed(pressedName.Text()); + const std::uint8_t hoverSource[] = { + 0x47, 0xBC, 0xAB, 0x85, 0xF9, 0xC7, 0xB4, 0xC6, 0x41, 0xF7, 0xAB, 0xB3, 0x84, 0xB3, 0x2D, 0x4E, + 0xE9, 0x70, 0x03, 0x1E, 0x57, 0x7D, 0x24, 0x42, 0xDB, 0x71, 0x1F, 0x11, 0x66, 0x7A, 0x1E, 0x68, + 0xEC, 0x76, 0x1F, 0x20, 0x4A, 0x6C, 0x1D, 0x6E, 0xE4, 0x67, 0x45, 0x1D, 0x54, 0x79, 0x71 + }; + // GLOBAL: gl_25191 + thread_local EncryptedName hoverName(hoverSource); + const std::string hover(hoverName.Text()); + const std::uint8_t normalSource[] = { + 0x09, 0x5A, 0x9F, 0x71, 0x4F, 0x1B, 0x7E, 0xEE, 0x0F, 0x11, 0x9F, 0x47, 0x32, 0x6F, 0xE7, 0x66, + 0xA7, 0x96, 0x37, 0xEA, 0xE1, 0xA1, 0xEE, 0x6A, 0x95, 0x97, 0x2B, 0xE5, 0xD0, 0xA6, 0xD4, 0x40, + 0xA2, 0x90, 0x2B, 0xD4, 0xE0, 0xA0, 0xCF, 0x0D, 0xAB, 0x98, 0x2F, 0x8B + }; + // GLOBAL: gl_25192 + thread_local EncryptedName normalName(normalSource); + const std::string normal(normalName.Text()); + this->radioButton->SetImages(normal, hover, pressed, disabled); + } + this->radioButton->checked = false; + this->radioButton->Invalidate(); + this->AddChild(this->radioButton); + + this->itemIcon = new CUIGameItem(*this->m_context); + this->itemIcon->SetMode(0); + this->itemIcon->SetScale(100); + this->itemIcon->Move(69, 11); + this->itemIcon->unknown_0084 = 1; + this->itemIcon->unknown_0085 = 1; + this->AddChild(this->itemIcon); + + this->description = new CUITextViewer(*this->m_context); + this->description->SetSize(96, 39); + this->description->Move(0, 44); + this->description->SetTextOffset(2, 0); + { + const std::uint8_t fontSource[] = {0x20, 0xDE, 0xFD, 0xCC, 0xCC, 0x3F}; + // GLOBAL: gl_25193 + thread_local EncryptedName fontName(fontSource); + const std::string font(fontName.Text()); + this->description->SetFont(font); + } + this->description->SetFontHeight(12); + this->description->SetBold(true); + this->description->SetTextColor(0x965532); + this->description->SetOutline(false, 0xFFFFFF); + this->description->SetLineSpacing(1); + this->description->SetBackgroundColor(0xFFFF00FF); + this->description->SetPadding(0, 0, 0, 0); + this->description->SetScrollBarSize(13, 39); + this->description->SetScrollStep(13); + { + const std::uint8_t downSource[] = { + 0x83, 0x86, 0x93, 0xDD, 0x15, 0x71, 0x8C, 0x54, 0x85, 0xCD, 0x93, 0xEB, 0x68, 0x05, 0x15, 0xEA, + 0x20, 0x5B, 0x3C, 0x4B, 0xB9, 0x8F, 0x2D, 0xF6, 0x34, 0x47, 0x7D, 0x45, 0xB8, 0xCF, 0x49 + }; + // GLOBAL: gl_25194 + thread_local EncryptedName downName(downSource); + const std::string down(downName.Text()); + const std::uint8_t upSource[] = { + 0xAF, 0xD2, 0x3B, 0xD9, 0xB1, 0xC9, 0x4A, 0x00, 0xA9, 0x99, 0x3B, 0xEF, 0xCC, 0xBD, 0xD3, 0xBE, + 0x0C, 0x0F, 0x94, 0x4F, 0x1D, 0x37, 0xFA, 0xBD, 0x41, 0x1F, 0x96, 0x53, 0x71 + }; + // GLOBAL: gl_25195 + thread_local EncryptedName upName(upSource); + const std::string up(upName.Text()); + this->description->SetScrollBarButtonImages(up, down); + } + { + const std::uint8_t backgroundSource[] = { + 0xBF, 0xBC, 0x1F, 0x2B, 0x45, 0xA9, 0xBC, 0x20, 0xB9, 0xF7, 0x1F, 0x1D, 0x38, 0xDD, 0x25, 0x9E, + 0x1C, 0x61, 0xB0, 0xBD, 0xE9, 0x57, 0x14, 0x84, 0x1B, 0x3D, 0xBD, 0xBC, 0xF5, 0x67 + }; + // GLOBAL: gl_25196 + thread_local EncryptedName backgroundName(backgroundSource); + const std::string background(backgroundName.Text()); + this->description->SetScrollBarBackground(background); + } + { + const std::uint8_t thumbBottomSource[] = { + 0x31, 0x68, 0xF9, 0xF3, 0xD7, 0xB7, 0x8A, 0x3C, 0x37, 0x23, 0xF9, 0xC5, 0xAA, 0xC3, 0x13, 0x82, + 0x92, 0xB5, 0x56, 0x65, 0x7B, 0x49, 0x2D, 0x90, 0x83, 0x98, 0x5D, 0x66, 0x60, 0x17, 0x61, 0x93, + 0x9C, 0xB7, 0x39 + }; + // GLOBAL: gl_25197 + thread_local EncryptedName thumbBottomName(thumbBottomSource); + const std::string thumbBottom(thumbBottomName.Text()); + const std::uint8_t thumbMiddleSource[] = { + 0x5F, 0x6A, 0xAD, 0x51, 0x17, 0xE7, 0x38, 0x68, 0x59, 0x21, 0xAD, 0x67, 0x6A, 0x93, 0xA1, 0xD6, + 0xFC, 0xB7, 0x02, 0xC7, 0xBB, 0x19, 0x9F, 0xC4, 0xED, 0x9A, 0x00, 0xC2, 0xB3, 0x07, 0x9F, 0xC8, + 0xEF, 0xC5 + }; + // GLOBAL: gl_25198 + thread_local EncryptedName thumbMiddleName(thumbMiddleSource); + const std::string thumbMiddle(thumbMiddleName.Text()); + const std::uint8_t thumbTopSource[] = { + 0xC9, 0x88, 0xEF, 0x41, 0x7D, 0x93, 0xB8, 0x14, 0xCF, 0xC3, 0xEF, 0x77, 0x00, 0xE7, 0x21, 0xAA, + 0x6A, 0x55, 0x40, 0xD7, 0xD1, 0x6D, 0x1F, 0xB8, 0x7B, 0x78, 0x5A, 0xCB, 0x93, 0x3F, 0x10, 0xA9, + 0x09 + }; + // GLOBAL: gl_25199 + thread_local EncryptedName thumbTopName(thumbTopSource); + const std::string thumbTop(thumbTopName.Text()); + this->description->SetScrollBarThumbImages(thumbTop, thumbMiddle, thumbBottom); + } + this->AddChild(this->description); +} } // OFFSET: 0x00A021D0