diff options
Diffstat (limited to 'gui/widgets')
-rw-r--r-- | gui/widgets/tab.cpp | 10 | ||||
-rw-r--r-- | gui/widgets/tab.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp index cf9dd5d962..8e8c6b48a1 100644 --- a/gui/widgets/tab.cpp +++ b/gui/widgets/tab.cpp @@ -277,6 +277,16 @@ void TabWidget::adjustTabs(int value) { setActiveTab(tabID); } +int TabWidget::getFirstVisible() { + return _firstVisibleTab; +} + +void TabWidget::setFirstVisible(int tabID) { + assert(0 <= tabID && tabID < (int)_tabs.size()); + _firstVisibleTab = tabID; + _boss->draw(); +} + void TabWidget::reflowLayout() { Widget::reflowLayout(); diff --git a/gui/widgets/tab.h b/gui/widgets/tab.h index 17b85986b5..4516c3c831 100644 --- a/gui/widgets/tab.h +++ b/gui/widgets/tab.h @@ -101,6 +101,8 @@ public: virtual void handleMouseDown(int x, int y, int button, int clickCount); virtual bool handleKeyDown(Common::KeyState state); virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); + virtual int getFirstVisible(); + virtual void setFirstVisible(int tabID); virtual void reflowLayout(); |