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

Notes text in UI now the color of the note. #27709

Merged
merged 3 commits into from
Jan 22, 2019

Conversation

Treah
Copy link
Contributor

@Treah Treah commented Jan 18, 2019

Summary

SUMMARY: Interface "Changes text color to match map note color."

Purpose of change

Found it odd that notes always display text in yellow. Was a simple change to allow it to use the note color.

Describe the solution

Display UI code now pulls note data for color along with the text.

Describe alternatives you've considered

Allow this to be configurable to either use standard yellow; note color; or other.

@Treah
Copy link
Contributor Author

Treah commented Jan 18, 2019

Working on fixing the astyle problems.

@Treah
Copy link
Contributor Author

Treah commented Jan 18, 2019

Jenkins rebuild

@@ -616,7 +616,8 @@ void draw( const catacurses::window &w, const catacurses::window &wbar, const tr
if( !note_text.empty() ) {
const size_t pos = std::get<2>( get_note_display_info( note_text ) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add a const std::tuple<char, nc_color, size_t> note_info = get_note_display_info( note_text ); above pos you can calculate the info once, making affected lines:
const size_t pos = std::get<2>( note_info ) and corner_text.emplace_back( std::get<1>( note_info ), note_text.substr( pos ) );

Copy link
Contributor Author

@Treah Treah Jan 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm that would be more efficient so that the info is only grabbed once and only one object is created. Ill add that and commit 😄

@ZhilkinSerg ZhilkinSerg added Info / User Interface Game - player communication, menus, etc. [C++] Changes (can be) made in C++. Previously named `Code` labels Jan 22, 2019
@ZhilkinSerg ZhilkinSerg self-assigned this Jan 22, 2019
@ZhilkinSerg ZhilkinSerg merged commit bbb58a7 into CleverRaven:master Jan 22, 2019
@ZhilkinSerg ZhilkinSerg removed their assignment Jan 22, 2019
AMurkin pushed a commit to AMurkin/Cataclysm-DDA that referenced this pull request Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants