Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix - mouse input only valid for first column in inventory, wrong unit of a value in json #42799

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/inventory_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,6 @@ void inventory_column::draw( const catacurses::window &win, const point &p,
};

// Do the actual drawing
rect_entry_map.clear();
for( size_t index = page_offset, line = 0; index < entries.size() &&
line < entries_per_page; ++index, ++line ) {
inventory_entry &entry = entries[index];
Expand Down Expand Up @@ -1761,17 +1760,16 @@ void inventory_selector::draw_columns( const catacurses::window &w )
size_t y = get_header_height() + border + 1;
size_t active_x = 0;

rect_entry_map.clear();
for( const auto &elem : columns ) {
if( &elem == &columns.back() ) {
x += gap_rounding_error;
}

if( !is_active_column( *elem ) ) {
elem->draw( w, point( x, y ), rect_entry_map );
} else {
active_x = x;
}

x += elem->get_width() + gap;
}

Expand Down