~widelands-dev/widelands/localizeable_shipnames

« back to all changes in this revision

Viewing changes to src/editor/ui_menus/categorized_item_selection_menu.h

  • Committer: GunChleoc
  • Date: 2017-04-22 08:40:21 UTC
  • mfrom: (8298.1.40 trunk)
  • Revision ID: fios@foramnagaidhlig.net-20170422084021-4u3vp59d9jkdfx63
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
     tool_(tool) {
97
97
        current_selection_names_.set_background(
98
98
           g_gr->images().get("images/wui/window_background_dark.png"));
99
 
        add(&tab_panel_, UI::Align::kCenter);
 
99
        add(&tab_panel_);
100
100
 
101
101
        for (uint32_t category_index = 0; category_index < categories.size(); ++category_index) {
102
102
                const Widelands::EditorCategory& category = categories.get(category_index);
120
120
                                horizontal = new UI::Box(vertical, 0, 0, UI::Box::Horizontal);
121
121
                                horizontal->add_space(kSpacing);
122
122
 
123
 
                                vertical->add(horizontal, UI::Align::kLeft);
 
123
                                vertical->add(horizontal);
124
124
                                vertical->add_space(kSpacing);
125
125
                        }
126
126
                        assert(horizontal != nullptr);
129
129
                        cb->set_state(tool_->is_enabled(i));
130
130
                        cb->changedto.connect(boost::bind(&CategorizedItemSelectionMenu::selected, this, i, _1));
131
131
                        checkboxes_[i] = cb;
132
 
                        horizontal->add(cb, UI::Align::kLeft);
 
132
                        horizontal->add(cb);
133
133
                        horizontal->add_space(kSpacing);
134
134
                        ++nitems_handled;
135
135
                }
136
136
                tab_panel_.add(category.name(), category.picture(), vertical, category.descname());
137
137
        }
138
 
        add(&current_selection_names_, UI::Align::kCenter, true);
 
138
        add(&current_selection_names_, UI::Box::Resizing::kFullSize);
139
139
        tab_panel_.sigclicked.connect(boost::bind(&CategorizedItemSelectionMenu::update_label, this));
140
140
        update_label();
141
141
}