raduprv / Eternal-Lands

http://www.eternal-lands.com
Other
155 stars 56 forks source link

"letter box" (S H P M R A) unwantedly moves in certain conditions #187

Closed feeltheburn closed 2 years ago

feeltheburn commented 2 years ago

https://www.youtube.com/watch?v=WzbDCEwbae0

The scenario: Client is shrunk to its smallest possible option. I've removed all the letters except S and M (giggity). I moved the box to the top right of the window, just below where FPS gets shown.

0:03 in video, I click the chat button to go to chat view, then directly back to the normal view. On going back to normal view, the S and M move down to the very bottom center of the screen, over the buttons.

0:12 I repeat with it being in non-moveable mode. It still moves.

EDIT: It's the reduced number of LETTERS combined with being close to the right side of the window causing it.

If you reduce the letters to one or two, place the letter box in the middle of the client, you'll see when clicking into chat and back to normal view quickly repeatedly that the letter box between chat and main view briefly expands to the size it would be with all letters.

If this happens when it's positioned too close to the right side of the client window, it pops down to the bottom of the client.

Size of the client window doesn't matter, it's reproducable putting the letter box over the right-side bar with only a couple letters in view.

pjbroad commented 2 years ago

Looks like its the "keep visible" code using the wrong width. I'll commit a fix tomorrow.

pjbroad commented 2 years ago

Hopefully fixed. I might change the code further to use the move window proportionally function for when the window is not in the default location. I keep the widow position in the default location so @feeltheburn, would that be useful?

feeltheburn commented 2 years ago

Thanks... This appears to be working fine, the only movement now is if it's partly out of the window view, it'll move just enough to be in view, staying in the same expected place. Which is not an issue since there's no reason to have it partly out of window view.