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

Fixing position of morale and power on skinny sidebar #27956

Conversation

MetroidHunter
Copy link
Contributor

@MetroidHunter MetroidHunter commented Jan 29, 2019

Summary

SUMMARY: Bugfixes "Fix alignment of power and morale on narrow sidebar"

Purpose of change

Fixes #27878
Fixes #27927
I recognize that #27878 is fixed in #27809 but that seems to have quite a debate going on around it. For now, I figured we can just align power where its meant to be and change when that issue is resolved.

Describe the solution

For the mood, on the narrow sidebar when horizontal, increase the offset from 2 to 3 to show the extra 3 characters.
For the power, use the getmaxx of the window and apply the already calculated offset for the digits to right justify.

Describe alternatives you've considered

I considered leaving power alone but we might as well fix it.

Showing fixed morale and power issue
power
Showing fixed power issues < 1k
power2
Showing fixed power issue > 1k
power3

src/sidebar.cpp Outdated Show resolved Hide resolved
@SirPendrak
Copy link
Contributor

Why your int changed to 60?

@MetroidHunter
Copy link
Contributor Author

Why your int changed to 60?

I debugged it to 60 cause I dont mess with bionics much and I had no idea you could debug add power to yourself. So i debugged first aid to 20 and int to 60, wished for some power CBMs and added 4 of them to myself. Then used the arm power generator CBM to generate power by running back and forth until i got it up to 1k.

Im still learning the debug menu :D

@nsklaus
Copy link
Contributor

nsklaus commented Jan 29, 2019

apologies, this one slipped me by unnoticed.
i use vertical smiley, and was busy on other PR.
i should check the issues tab more often.
otoh, this is probably already fixed in the sidebar_info3 waiting for the merge.
but i would have provided interim fix as for the power value placement one.

@MetroidHunter
Copy link
Contributor Author

apologies, this one slipped me by unnoticed.
i use vertical smiley, and was busy on other PR.
i should check the issues tab more often.
otoh, this is probably already fixed in the sidebar_info3 waiting for the merge.
but i would have provided interim fix in the same time as for the power value placement one.

Its np. I called out your fix in #27809 in the summary up top but figured it was good to go ahead and fix this before 0.D in case the discussion on your PR lasts a bit

@Night-Pryanik Night-Pryanik changed the title Fixing position of morale and power on skinny siderbar Fixing position of morale and power on skinny sidebar Jan 29, 2019
…ithub.com:MetroidHunter/Cataclysm-DDA into bugfix/CDDA-27927_fix_morale_horizontal_interface
@nsklaus
Copy link
Contributor

nsklaus commented Jan 29, 2019

apologies, this one slipped me by unnoticed.
i use vertical smiley, and was busy on other PR.
i should check the issues tab more often.
otoh, this is probably already fixed in the sidebar_info3 waiting for the merge.
but i would have provided interim fix in the same time as for the power value placement one.

Its np. I called out your fix in #27809 in the summary up top but figured it was good to go ahead and fix this before 0.D in case the discussion on your PR lasts a bit

i'll let the maintainer decide but maybe it would be better that i clean my own problems.
especially considering,
power value placement was fixed and merged in an interm PR #27907.
half of this PR is now trying to fix something that was already fixed.

i must admit the horizontal smiley went unnoticed to me though.

in any case, thanks for the help @MetroidHunter

@MetroidHunter
Copy link
Contributor Author

MetroidHunter commented Jan 29, 2019

Thats true. Ive merged your change from #27907 which was already in master and applied the change on top of it. I believe this solution is still more effective since I am using the max x of the window instead of the 24 magic number

No worries on fixing your own problems. Its a community effort

@nsklaus
Copy link
Contributor

nsklaus commented Jan 29, 2019

Thats true. Ive merged your change from #27907 which was already in master and applied the change on top of it. I believe this solution is still more effective since I am using the max x of the window instead of the 24 magic number

why not .. while my sidebar_info3 is waiting, and i can't tell if it's going to be accepted or not, there's no harm in providing this. i must admit i don't like when error slip through me. i must recognize there's a need to fix the smiley offset too. if asked i'll gladly provide a fix for it, if this is chosen instead then thanks again for cleaning after me. i just wish i had seen this problem sooner.

@MetroidHunter
Copy link
Contributor Author

These things happen all the time, dont feel bad about missing a detail here and there. Half the companies ive worked for have a team dedicated to fixing bugs like these so that development can keep rolling forward without having to switch gears for bugs. Were all in this together :)

@nsklaus
Copy link
Contributor

nsklaus commented Jan 29, 2019

These things happen all the time, dont feel bad about missing a detail here and there. Half the companies ive worked for have a team dedicated to fixing bugs like these so that development can keep rolling forward without having to switch gears for bugs. Were all in this together :)

:)

@kevingranade kevingranade added this to the 0.D milestone Jan 29, 2019
@Rivet-the-Zombie Rivet-the-Zombie merged commit 046b8c0 into CleverRaven:master Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants