-
Notifications
You must be signed in to change notification settings - Fork 288
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
feat(UI): add Simple
and Compact
compasses for small screens
#6037
base: main
Are you sure you want to change the base?
Conversation
the simple version is not too important for me to implement. The compact version is more what I want to keep. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple
and Compact
compasses for smaller screens
Simple
and Compact
compasses for smaller screensSimple
and Compact
compasses for small screens
Lol, I didn't think about that. |
Using |
Please be so kind to show me exactly how I have to do it. I am not that code savvy. 😔 Sorry |
Should be just replacing the contents of |
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
I don't know why it throws me an error here, AI doesn't help either this time. lol |
Co-authored-by: scarf <[email protected]>
src/panels.cpp
Outdated
@@ -1806,9 +1810,10 @@ std::string direction_to_enemy_improved( const tripoint &enemy_pos, const tripoi | |||
return "--"; | |||
} | |||
|
|||
// Corrected check function | |||
void check( const char *msg, std::function<std::string( const tripoint &, const tripoint & )> fn ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the check
function entirely. What I suggested was to only replace the contents of your direction_to_enemy
function with the contents of direction_to_enemy_improved
. All other code was for testing that the output is reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should have said that... 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah looking back I didn't communicate as effectively as I should have what I was suggesting. We got it fixed in the end, though, so the PR process works. "Team work makes the dream work" 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully now it all works, will leave to the others to merge in case some code issue hasn't been addressed that I overlooked.
@scarf005 all changes are done and I still need your approval. After that you don't have to deal with me again probably. The thumb down emojis show me that I am still not welcomed. |
Purpose of change (The Why)
While the old Compass was good and informative, smaller screens (phones, tablets) had their problems of using it.
Describe the solution (The How)
Add the comp. Compass which is just a shorter regular compass. And the simple Compass, which is just one line of where Creatures are in any direction of the player.
Describe alternatives you've considered
Testing
Works as intended, code may be wonky, but that is the best effort I could muster yet.
Additional context
Checklist
Just the Compact version
Simple version
in action
Mandatory
closes #1234
in Summary of the PR so it can be closed automatically.main
so it won't cause conflict when updatingmain
branch later.