fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

Vertical position of text in windows

Open LeHerosInconnu opened this issue 5 years ago • 4 comments

For all windows where text appears, I suggest applying simple rules inspired by the original game.

  • The top of the start of the text should always be at the same vertical position relative to the window. For this, the same distance between the top edge of the window and the beginning of the text as that of the original game could be used. Or a slightly greater distance, I always found this distance a little too narrow, I find that the text is too close to the shadows of the window decorations.
  • The distance between the end of the text and the bottom edge of the window should always be at least as large as the distance between the start of the text and the top edge of the window. For this, the length of the window must be adjusted accordingly.

In the original game, the lower text space relative to the window is larger than the upper text space relative to the window:

Scenario selection 23

In fheroes2 this is not the case and it visually unbalances the window, and the top of the start of the text is also a little too far from the top edge of the window:

Scenario selection 24

In the original game, the lower text space relative to the window is larger than the upper text space relative to the window:

Scenario selection 25

In fheroes2 this is not the case and it visually unbalances the window, and the top of the start of the text is also a little too far from the top edge of the window:

Scenario selection 26

LeHerosInconnu avatar Aug 17 '20 11:08 LeHerosInconnu

Hi @LeHerosInconnu , is this issue still valid? I am asking because we recently changed all dialogs to use new code. Most likely your original checks might be invalid.

ihhub avatar Oct 19 '23 15:10 ihhub

Hello @ihhub,

Hi @LeHerosInconnu , is this issue still valid? I am asking because we recently changed all dialogs to use new code. Most likely your original checks might be invalid.

Currently, the vertical distance between the inside of the frame (including the black line) and the text base line of the yellow title is 32 pixels. This seems to be applied to all windows of the same type. It can stay that way. Indicated by the white dotted line frame: Window text position big 001

The distance between the text base line of two lines of text is 17 pixels, i.e. 34 pixels for two lines. Indicated by the white dotted line frame: Window text position big 002

The distance between the text base line of the yellow title and the text base line of the first line of text is 27 pixels. This means that there isn't actually an empty line between the yellow title and the first line of text, as the distance would also be 34 pixels if this was the case. This could be adjusted. Indicated by the white dotted line frame: Window text position big 003

There is also the problem of defect in the frame to consider when improving these windows: https://github.com/ihhub/fheroes2/issues/5086, https://github.com/ihhub/fheroes2/issues/1926. There is also this problem with the window used as example above.

If you agree with my proposal for spacing between the yellow title and the text (same spacing as for an empty line), I could change the original post to indicate this.

LeHerosInconnu avatar Oct 20 '23 11:10 LeHerosInconnu

I’ve made adjustments based on your suggestions. How do these look to you? @LeHerosInconnu

Image

Image

onurcanyasar avatar Jun 03 '25 21:06 onurcanyasar

Hello @onurcanyasar,

I’ve made adjustments based on your suggestions. How do these look to you? @LeHerosInconnu

Sorry for my late reply. I'll look into it when I have some time. It may take a while.

LeHerosInconnu avatar Jun 09 '25 07:06 LeHerosInconnu

Hello @onurcanyasar,

Hello @onurcanyasar,

I’ve made adjustments based on your suggestions. How do these look to you? @LeHerosInconnu

Sorry for my late reply. I'll look into it when I have some time. It may take a while.

I have posted my observations here: https://github.com/ihhub/fheroes2/issues/9886#issuecomment-3044711755.

LeHerosInconnu avatar Jul 07 '25 12:07 LeHerosInconnu