Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImGui Keybindings window. Leaves an image artifact #72065

Closed
IdleSol opened this issue Feb 29, 2024 · 9 comments · Fixed by #72833
Closed

ImGui Keybindings window. Leaves an image artifact #72065

IdleSol opened this issue Feb 29, 2024 · 9 comments · Fixed by #72833
Labels
ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds (S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@IdleSol
Copy link
Contributor

IdleSol commented Feb 29, 2024

Describe the bug

If you open the keybindings menu window. After closing it, a line remains at the bottom of the screen.

1

The interface must be enabled. Use imGui UI: true

Attach save file

N/A

Steps to reproduce

  1. Default settings
  2. Enable imGui (settings / options / interface / Use imGui UI: true)
  3. Open the keybindings menu
  4. Close the keybindings menu
  5. Look at the bottom of the screen

A similar line appears on any invocation of the keybindings menu. For example:

  1. Start creating a new world
  2. In the difficulty selection menu, press ?

or

  1. setting /safemode
  2. press a (start creating a new rule )
  3. press enter (set rule name)
  4. press F1 (calling the keybindings menu)

Expected behavior

No "new" lines after closing the key binding menu window.

Screenshots

2

Versions and configuration

cdda-windows-tiles-x64-2024-02-28-2115

Additional context

If Use imGui UI: false, there's no problem.

I'm assuming the problem is the size of the keybindings menu. It's longer than it should be.

@IdleSol IdleSol added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Feb 29, 2024
@IdleSol IdleSol changed the title Imgui Keybindings window. Leaves an image artifact ImGui Keybindings window. Leaves an image artifact Feb 29, 2024
@db48x
Copy link
Contributor

db48x commented Feb 29, 2024

I don’t really think that this is a bug. It’s just that your game window is not an even multiple of the tile size, so no tiles are drawn at the very bottom of the window. The correct fix is to draw that last row of tiles, even though they are partially clipped by the game window boundaries.

@velddrinn
Copy link

velddrinn commented Mar 1, 2024

In ASCII mode (no tileset) it looks like this.
image
So it is not just menu, all ASCII is broken right now.

@Brambor
Copy link
Contributor

Brambor commented Mar 1, 2024

Can confirm.

When the window size is right, you can see the edges

  1. Launch the game
  2. Set the game size right*
  3. Open and close keybinding menu
  4. You can see the artifacts.

image

*Right size:

  1. set is as small as possible
  2. open keybindings menu
  3. close it and increase the width a tiny bit
  4. open keybindings menu, if it is wider than before, you are done, otherwise back to step 3
  5. You can see artifacts around the ASCII art

Note: When you resize the game window, the artifacts disapear

@velddrinn
Copy link

velddrinn commented Mar 4, 2024

When you resize the game window, the artifacts disapear.

Confirm.

Still looks like redraw issue. This happens only on unseen (or menu background) tiles:
image
It redraws when forced by window resize.

@katemonster33
Copy link
Contributor

I haven't been able to reproduce this with latest Cataclysm, @IdleSol can you re-test?

@IdleSol
Copy link
Contributor Author

IdleSol commented Apr 2, 2024

cdda-windows-tiles-x64-2024-04-02-1742

The problem remains. And also the problem with resizing the window
test

Steps to reproduce

  1. Default options
  2. Enable ImGui
  3. Options / Graphics / Graphical display options / fullscreen = no
  4. Save changes, close the game and load again
  5. Change the size of the window, to an arbitrary size
  6. Open the keybindings window
  7. Close the keybindings window
  8. Look at the artifacts
  9. Resize the window again
  10. Image artifacts disappear

test 2

P.S. I can record a video.

@IdleSol
Copy link
Contributor Author

IdleSol commented Apr 2, 2024

Did some additional testing.

This problem is most serious in the main menu. In the game itself (after loading the world), resizing the window leaves almost no artifacts. Except for that line at the bottom of the screen (see the first post). Which is not critical.

I don't know the correct terminology. Oh, and it's also in translation. I would pay attention to the size of the window in which the game draws its elements. For the main menu, it's obviously smaller than for the game itself. And in both cases smaller than the window the system allocates. The artifacts occur in the gap between these two windows.

Or some (?) windows with ImGui ignore the window frames set in the game and focus on the frames set in the system.

test 3
test 4

@katemonster33
Copy link
Contributor

katemonster33 commented Apr 4, 2024

This is interesting, so the issue is present when the window is small, very similar to a screen freeze issue we fixed previously with #72501 . Maybe the root cause was not fixed, still a ImGui window size reporting issue perhaps

@IdleSol
Copy link
Contributor Author

IdleSol commented Apr 5, 2024

dda-windows-tiles-x64-2024-04-05-0445
@I-am-Erk, @katemonster33

test

@NetSysFire NetSysFire added the ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds (S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants