-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Re-writing ImTui (ImGui curses backend) #73164
Merged
Maleclypse
merged 2 commits into
CleverRaven:master
from
katemonster33:imgui_curses_issues
May 4, 2024
Merged
Re-writing ImTui (ImGui curses backend) #73164
Maleclypse
merged 2 commits into
CleverRaven:master
from
katemonster33:imgui_curses_issues
May 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
<Bugfix>
This is a fix for a bug (or closes open issue)
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Info / User Interface
Game - player communication, menus, etc.
[C++]
Changes (can be) made in C++. Previously named `Code`
json-styled
JSON lint passed, label assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
labels
Apr 21, 2024
github-actions
bot
removed
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
Apr 23, 2024
katemonster33
force-pushed
the
imgui_curses_issues
branch
from
April 24, 2024 21:00
2b879a3
to
b77f2de
Compare
github-actions
bot
added
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
labels
Apr 24, 2024
katemonster33
force-pushed
the
imgui_curses_issues
branch
from
April 25, 2024 15:04
e5fca20
to
cd09dac
Compare
github-actions
bot
removed
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
Apr 25, 2024
katemonster33
force-pushed
the
imgui_curses_issues
branch
from
April 25, 2024 16:17
cd09dac
to
01255e2
Compare
github-actions
bot
added
BasicBuildPassed
This PR builds correctly, label assigned by github actions
and removed
BasicBuildPassed
This PR builds correctly, label assigned by github actions
labels
Apr 25, 2024
katemonster33
force-pushed
the
imgui_curses_issues
branch
2 times, most recently
from
May 1, 2024 03:02
e5fca20
to
48e9351
Compare
github-actions
bot
added
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
May 1, 2024
i devised a way i can optimize this so I don't need the TWindow struct and all the calculations needed to get the window bounds. I am going to mark as draft so I can try to implement it |
github-actions
bot
added
the
ImGui
Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds
label
May 3, 2024
…orrupting the play area, and other issues
katemonster33
force-pushed
the
imgui_curses_issues
branch
from
May 3, 2024 16:58
0a6a5eb
to
f499bda
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
<Bugfix>
This is a fix for a bug (or closes open issue)
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
ImGui
Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds
Info / User Interface
Game - player communication, menus, etc.
json-styled
JSON lint passed, label assigned by github actions
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Infrastructure "refactored ImTuis drawing code to fix a black screen issue, and to improve performance"
Purpose of change
Fixes: #73031
Fixes: #73392
Describe the solution
ImTui was using a single ncurses window to draw all its data. this window encompasses the whole screen, which meant that no matter what, when that window was refreshed the first time, the screen would be blacked out.
The new and improved ImTui uses several windows based on the windows ImGui is attempting to draw. This means that ImTui can't overwrite cells on the terminal outside of where a window is meant to be drawn.
Describe alternatives you've considered
Testing
load the game, verify you are not greeted with a black screen.
also verify that any spaces where an ImTui window was drawn are overwritten, as expected, when it is closed.this part got rolled into #73426Additional context
During my testing I was working a lot with WSL, and found this weird case where, if you build CDDA from a fresh copy with no localization, every time you start the game you get the same black screen bug and you have to press a key to show the language selection. I couldn't reproduce it in Linux so I wrote it off as unrelated.-