[Ohrrpgce] [ohrrpgce/ohrrpgce] Hero HP values moved up 1 pixel in nightly? (Issue #1237)

Ralph Versteegen notifications at github.com
Thu Apr 14 17:43:47 PDT 2022


It used to be the case that if you enabled MP meters the HP values would shift up by one pixel; I did that to make it easier to see the MP meters. Recently James rewrote the battle UI using slices. He wrote (discussion of r12830):

> If you turn bat.test_future to toggle mode, you'll easily see that this is not a pixel perfect match for the old code.
> 
> Specifically, rather than shifting the HP text up one pixel in response to MP meter visibility, I just leave it up one pixel in the slice based ui.
> 
> The one pixel shift up is such a weird specific hack that I haven't thought of a good way to reproduce it generically with slices

I have a draft of a reply I never sent:

> One way to reproduce the one pixel shift would be to parent the HP text and MP meter to a layout slice which stacks vertically from the bottom, with a negative child padding so that the presence of the MP meter shifts the text up by a pixel.

(Currently, the HP and MP meters, HP text and icon grid area are all children of the same container.)
This is a pretty ugly solution, and when it becomes customisable people will probably be confused by the layout slice, which becomes unnecessary when you can customise slice positions. But it's definitely preferable to do slice positioning entirely using slices rather than to hardcode anything.




-- 
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1237#issuecomment-1099745645
You are receiving this because you are subscribed to this thread.

Message ID: <ohrrpgce/ohrrpgce/issues/1237/1099745645 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20220414/49d82c0e/attachment.html>


More information about the Ohrrpgce mailing list