chrxh / alien

ALIEN is a CUDA-powered artificial life simulation program.
https://alien-project.org
BSD 3-Clause "New" or "Revised" License
4.69k stars 141 forks source link

[Bug] Resizing & Camera Reset #76

Closed TheBarret closed 9 months ago

TheBarret commented 1 year ago

When you change the resolution or change the windowed mode, it can happen that the titlebar now resides over the visible edge of the monitor/screen resolution, and now you can not move nor access the menu anymore and have to resort to Alt-F4 to close the window.

There is also an instance where if you zoom out and zoom back in, you basically lost the map, I don't know if its a scaling issue, it does seems like the scale factor doesn't get changed, would be maybe useful to have a menu function that auto-centers/resets the view/camera instance.

image

I obtained this problem several times, I deemed it to be my mistake because I thought It was me screwing too much with the resolutions and window mode, but happened now second time when I did a full screen to windowed switch to see if that fixed the map or camera view, it did not.

chrxh commented 1 year ago

What I had observed was: when switching from full screen to windowed mode, the title bar disappears. A workaround is to change the window size the mouse (one can still click and drag on the pixel border of the window). After that the window appears normally. The problem might be related to a wrong usage of the GLFW API, which is used for creating the window, but I haven't dealt with it yet.

TheBarret commented 1 year ago

What I had observed was: when switching from full screen to windowed mode, the title bar disappears. A workaround is to change the window size the mouse (one can still click and drag on the pixel border of the window). After that the window appears normally. The problem might be related to a wrong usage of the GLFW API, which is used for creating the window, but I haven't dealt with it yet.

It doesn't happen often, has no priority i rekon.

TheBarret commented 12 months ago

I found out where the "Scroll" issue comes from, when you scroll whilst moving your cursor from active desktop (or browser) and the mouse crosses over the simulator window, it zooms out and disappears completely and this process can not be reversed by zooming back as far I have tried.

chrxh commented 11 months ago

I think two different problems are addressed here:

  1. When switching to windowed mode, the window is sometimes badly positioned and the boundaries and scrollbar are hard to locate. The issue is still open.
  2. If focus is lost during zooming, it continues zooming out/in endlessly until everything ultimately disappears. This problem should be at least partially eliminated with v4.4, because it then stops zooming after a certain factor and one can then zoom in the reverse direction again.