~widelands-dev/widelands/bug-1732765-economy-refactoring

« back to all changes in this revision

Viewing changes to src/ui_basic/table.cc

merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
        column.btn->set_title(title);
135
135
}
136
136
 
 
137
void Table<void*>::set_column_tooltip(uint8_t col, const std::string& text) {
 
138
        assert(col < columns_.size());
 
139
        Column& column = columns_.at(col);
 
140
        assert(column.btn);
 
141
        column.btn->set_tooltip(text);
 
142
}
 
143
 
137
144
/**
138
145
 * Set a custom comparison function for sorting of the given column.
139
146
 */
452
459
        selected(selection_);
453
460
}
454
461
 
455
 
void Table<void*>::multiselect(uint32_t row) {
 
462
/**
 
463
 * If 'force' is true, adds the given 'row' to the selection, ignoring everything else.
 
464
 */
 
465
void Table<void*>::multiselect(uint32_t row, bool force) {
 
466
        if (force) {
 
467
                select(row);
 
468
                return;
 
469
        }
456
470
        if (is_multiselect_) {
457
471
                // Ranged selection with Shift
458
472
                if (SDL_GetModState() & KMOD_SHIFT) {