mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
NANCY: Reset textbox scrollbar when adding new line
This commit is contained in:
parent
3a72322d55
commit
4aa0727f95
@ -173,6 +173,9 @@ void Textbox::addTextLine(const Common::String &text, uint32 autoClearTime) {
|
||||
// Currently only used by inventory closed captions
|
||||
_autoClearTime = g_nancy->getTotalPlayTime() + autoClearTime;
|
||||
}
|
||||
|
||||
_scrollbar->resetPosition();
|
||||
onScrollbarMove();
|
||||
}
|
||||
|
||||
void Textbox::setOverrideFont(const uint fontID) {
|
||||
@ -206,6 +209,9 @@ void Textbox::onScrollbarMove() {
|
||||
}
|
||||
|
||||
uint16 Textbox::getInnerHeight() const {
|
||||
// As early as nancy3 this behavior stopped being relevant, as the original
|
||||
// engine always scrolls down to the bottom of the entire inner surface.
|
||||
// However, that makes the scrollbar almost unusable, so I'm not changing this.
|
||||
const TBOX *tbox = (const TBOX *)g_nancy->getEngineData("TBOX");
|
||||
assert(tbox);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user