Decompile fn_11525 (UITextButton::ResizeToTextClipped)
Batch #8150 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_11525 UITextButton::ResizeToTextClipped: logic confirmed by peer review Peer-reviewed-by: Yommy, alisonrag, gordaoprogramas Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
4a457c0002
commit
ca0fd2020e
2 changed files with 15 additions and 0 deletions
|
|
@ -808,6 +808,20 @@ void UITextButton::ResizeToText() {
|
|||
UIWindow::Resize(width + 2, this->m_height + 2);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00897230
|
||||
// FUNCTION: fn_11525
|
||||
void UITextButton::ResizeToTextClipped(int width, int height) {
|
||||
if (std::strcmp(this->label.c_str(), "") == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->ResizeToText();
|
||||
if (this->geometry.width > width) {
|
||||
this->m_text = this->ClipTextToWidth(this->label.c_str(), width, this->m_family, this->m_height, this->m_outline);
|
||||
UIWindow::Resize(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00897A50
|
||||
// FUNCTION: fn_11539
|
||||
void UITabControl::FitToTabs() {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ public:
|
|||
void Slot35(int value) override;
|
||||
void Configure(const char* text, std::uint32_t color, int family, int height, unsigned char outline, unsigned char underline);
|
||||
void ResizeToText();
|
||||
void ResizeToTextClipped(int width, int height);
|
||||
void CenterIn(int width, int height);
|
||||
const std::string& GetLine(std::size_t index) const;
|
||||
int GetLinesCount() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue