-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Info panel fixes and adding scrollbars #50892
Info panel fixes and adding scrollbars #50892
Conversation
d3e091f
to
558163e
Compare
My first c++ change in CDDA + first proper pull request. |
To fix the border bug, change the x position and width of the border at ui_bionics.on_screen_resize( [&]( ui_adaptor & ui_bionics ) {
bionics_win_size_y = calculate_trait_and_bionic_height().second;
bionics_win_size_y = trait_and_bionic_height.second;
w_bionics = catacurses::newwin( bionics_win_size_y, grid_width,
point( grid_width + 1,
infooffsetybottom + trait_win_size_y + 1 ) );
- w_bionics_border = catacurses::newwin( bionics_win_size_y + 1, grid_width + 1,
- point( grid_width + 1,
+ w_bionics_border = catacurses::newwin( bionics_win_size_y + 1, grid_width + 2,
+ point( grid_width,
infooffsetybottom + trait_win_size_y + 1 ) );
border_bionics.set( point( grid_width, infooffsetybottom + trait_win_size_y ),
point( grid_width + 2, bionics_win_size_y + 2 ) );
ui_bionics.position_from_window( w_bionics_border );
} ); And I think a similar change should also be made for the traits tab, in case the traits tab is longer than the skills tab. |
This is a really silly question, but is there any left-border bug on the third column? Of was that never an issue? |
The third column already draws the left border according to the code. |
the fix: If you scrolled other window, like effects, proficiency window would scroll too
51df41e
to
b790807
Compare
f7a34e7
to
8e21424
Compare
90d56ef
to
a6f47c0
Compare
a6f47c0
to
378d154
Compare
Edit: fixed that the scrollbar on encumbrance wasn't displaying. Is that all @Qrox ? |
Yeah, thanks for addressing the comments. |
Summary
None
Purpose of change
Fixes #50851,
While fixing this issue I found (and fixed) other issues:
| Abc
instead of|Abc
) - EFFECTS & PROFICIENCIESDescribe the solution
I might have overdone it in the case of.static void draw_scrollbar
Describe alternatives you've considered
Since the scrollbar was only on one tab, remove it. But the scrollbar is useful, so I fixed it there and added it elsewhere.
Testing
Made save with lots of effects, bionic traits, mutations & proficiencies. Scrolling works, scrollbars too, everything is accounted for (nothing is under the screen as was in #50851). Resizing works.
Additional context
Before:
After: