diff --git a/Source/UI/Window/UIControl.cpp b/Source/UI/Window/UIControl.cpp index 17f37934..311fa599 100644 --- a/Source/UI/Window/UIControl.cpp +++ b/Source/UI/Window/UIControl.cpp @@ -1278,8 +1278,33 @@ void CUIVScrollBar::SetHidden(int) { // OFFSET: 0x009EE1B0 // OFFSET: 0x009EE270 +// FUNCTION: fn_14603 +void CUIHScrollBar::Slot35(int value) { + if (value > 0) { + this->PageDown(); + } else { + this->PageUp(); + } +} // OFFSET: 0x009EE290 +// FUNCTION: fn_14604 +void CUIHScrollBar::Slot54() { + CUIThumb* bar = this->thumb; + float offset; + if (bar->resizable) { + const int length = static_cast((static_cast(this->visible) / static_cast(this->total)) * static_cast(this->trackLength)); + bar->Resize(length > 1 ? length : 1, this->geometry.height); + offset = (static_cast(this->trackLength) / static_cast(this->total)) * static_cast(this->position); + } else { + if (this->total - this->visible <= 0) { + bar->Move(this->upButton->geometry.width, 0); + return; + } + offset = static_cast((this->trackLength - bar->geometry.width) * this->position) / static_cast(this->total - this->visible); + } + this->thumb->Move(static_cast(offset + static_cast(this->upButton->geometry.width)), 0); +} // OFFSET: 0x009EE380