Skip to content

Commit

Permalink
Fix display positioning for other characters when resizing window
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed May 3, 2023
1 parent 6475bb7 commit 18e9bb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EndlessClient/Rendering/Character/CharacterRenderer.cs
Expand Up @@ -326,8 +326,8 @@ private Color GetAlphaColor()

private void SetGridCoordinatePosition()
{
var centerX = _clientWindowSizeRepository.Resizable ? _clientWindowSizeRepository.Width / 2 - 8 : 310;
var centerY = _clientWindowSizeRepository.Resizable ? _clientWindowSizeRepository.Height * 45 / 100 + 16 : 104;
var centerX = _clientWindowSizeRepository.Resizable ? (_clientWindowSizeRepository.Width - DrawArea.Width) / 2 : 310;
var centerY = _clientWindowSizeRepository.Resizable ? (_clientWindowSizeRepository.Height - DrawArea.Height) / 2 - 8 : 104;

var screenX = _renderOffsetCalculator.CalculateOffsetX(_character.RenderProperties) + centerX - GetMainCharacterOffsetX();
var screenY = _renderOffsetCalculator.CalculateOffsetY(_character.RenderProperties) + centerY - GetMainCharacterOffsetY();
Expand Down

0 comments on commit 18e9bb9

Please sign in to comment.