~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/wui/encyclopedia_window.cc

  • Committer: GunChleoc
  • Date: 2017-06-12 11:07:47 UTC
  • mto: This revision was merged to the branch mainline in revision 8704.
  • Revision ID: fios@foramnagaidhlig.net-20170612110747-2eri1uy1znx63wvu
Background images and colors are now defined in data/templates/default. Added StyleManager class to load and access them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
                                       LuaInterface* const lua)
57
57
   : UI::UniqueWindow(&parent, "encyclopedia", &registry, WINDOW_WIDTH, WINDOW_HEIGHT, ""),
58
58
     lua_(lua),
59
 
     tabs_(this) {
 
59
     tabs_(this, UI::TabPanelStyle::kWuiLight) {
60
60
}
61
61
 
62
62
void EncyclopediaWindow::init(InteractiveBase& parent, std::unique_ptr<LuaTable> table) {
86
86
                           tab_name, std::unique_ptr<UI::Listselect<EncyclopediaEntry>>(
87
87
                                        new UI::Listselect<EncyclopediaEntry>(boxes_.at(tab_name).get(), 0, 0,
88
88
                                                                              contents_width, contents_height,
89
 
                                                                              UI::Panel::Style::kWui))));
 
89
                                                                              UI::PanelStyle::kWui))));
90
90
                        lists_.at(tab_name)->selected.connect(
91
91
                           boost::bind(&EncyclopediaWindow::entry_selected, this, tab_name));
92
92
 
93
93
                        contents_.insert(std::make_pair(
94
94
                           tab_name, std::unique_ptr<UI::MultilineTextarea>(
95
95
                                        new UI::MultilineTextarea(boxes_.at(tab_name).get(), 0, 0, contents_width,
96
 
                                                                  contents_height, UI::Panel::Style::kWui))));
 
96
                                                                  contents_height, UI::PanelStyle::kWui))));
97
97
 
98
98
                        boxes_.at(tab_name)->add(lists_.at(tab_name).get());
99
99
                        boxes_.at(tab_name)->add_space(kPadding);