summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-15 00:50:47 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-15 00:50:47 +0300
commit255b1c29f47ef3b1e7a9b058c56ef72bfa10c5e3 (patch)
tree1849456d254f60d20b60e54e51df4f354106aa1a /src/gui/widgets
parentb6dae23ca33ee0032260080819a59ec6363f72f6 (diff)
downloadmanaverse-255b1c29f47ef3b1e7a9b058c56ef72bfa10c5e3.tar.gz
manaverse-255b1c29f47ef3b1e7a9b058c56ef72bfa10c5e3.tar.bz2
manaverse-255b1c29f47ef3b1e7a9b058c56ef72bfa10c5e3.tar.xz
manaverse-255b1c29f47ef3b1e7a9b058c56ef72bfa10c5e3.zip
Add buttons Themes, Video, Perfomance in select server screen.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/tabbedarea.cpp13
-rw-r--r--src/gui/widgets/tabbedarea.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 940dad12a..47b02c925 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -241,6 +241,19 @@ void TabbedArea::setSelectedTab(gcn::Tab *tab)
widgetResized(NULL);
}
+void TabbedArea::setSelectedTab(const std::string &name)
+{
+ for (TabContainer::const_iterator itr = mTabs.begin(),
+ itr_end = mTabs.end(); itr != itr_end; ++itr)
+ {
+ if ((*itr).first && (*itr).first->getCaption() == name)
+ {
+ setSelectedTab((*itr).first);
+ return;
+ }
+ }
+}
+
void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED)
{
int width = getWidth() - 2 * getFrameSize()
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index a91b4c199..3ad113b4c 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -122,6 +122,8 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
void setSelectedTab(gcn::Tab *tab);
+ void setSelectedTab(const std::string &name);
+
void widgetResized(const gcn::Event &event);
/*