csgoverview icon indicating copy to clipboard operation
csgoverview copied to clipboard

Get display resolution at start

Open eriknikulski opened this issue 4 years ago • 2 comments

Fetches the screen resolution at the beginning and calculates all other needed variables dependend on the display resolution.

Unfortunately I wasn't able to test it on Windows, maybe you could give it a try.

eriknikulski avatar Aug 18 '20 12:08 eriknikulski

Hey Erik,

This would only work as long as height < width, and only takes the primary display into account. To be fair, i have no idea on how to check on which display the application is currently visible :^)

https://github.com/eriknikulski/csgoverview/blob/cf13fb6d69b25e2560a2fdc923d84a78d597f220/app.go#L67-L68

As you basically want to launch it using the whole screen it might be feasible to just maximize it or launch as fullscreen with sdl.WINDOW_FULLSCREEN_DESKTOP

https://github.com/eriknikulski/csgoverview/blob/cf13fb6d69b25e2560a2fdc923d84a78d597f220/app.go#L115-L116

xXxhaxmeister42xXx avatar Aug 27 '20 13:08 xXxhaxmeister42xXx

Hi @eriknikulski , thank you for your work on this! I have a few remarks regarding changes to the PR that need to be made:

In order to avoid additional dependencies (screenshot, etc) we should use sdl's type DisplayMode to get the screen size instead.

I compiled the app with your PR on my development machine, but it seems as though a few problems persist. csgoverview_pr_1

  • the gaps between players on the infobars is too small
  • if you look at T player 4, you can see the circle isn't a very nice circle
  • some fonts look a bit messed up (Warmup on the left infobar)
  • the scaling probably has to be done in relation to the current window size instead of the screen size

If this works for you, that's great and I'll use this PR as a basis for when I get around to fixing this issue. :)

Linus4 avatar Aug 27 '20 13:08 Linus4