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

Dialogues on curses are messed up #73030

Open
NetSysFire opened this issue Apr 14, 2024 · 8 comments
Open

Dialogues on curses are messed up #73030

NetSysFire opened this issue Apr 14, 2024 · 8 comments
Labels
curses Things specific to the curses variant of the game Info / User Interface Game - player communication, menus, etc. (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@NetSysFire
Copy link
Member

Describe the bug

image

image

Attach save file

n/a

Steps to reproduce

  1. Launch any game in curses.
  2. Make any dialogue appear. E.g by quitting.

Expected behavior

It looks correct.
I am confirming this because someone else on IRC can also reproduce.

Screenshots

No response

Versions and configuration

  • OS: Linux
    • OS Version: LSB Version: n/a; Distributor ID: Arch; Description: Arch Linux; Release: rolling; Codename: n/a;
  • Game Version: cdda-experimental-2024-04-14-2000 2716469 [64-bit]
  • Graphics Version: Curses
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Slowdown Fungal Growth [no_fungal_growth],
    Bionic Professions [package_bionic_professions]
    ]

Additional context

No response

@NetSysFire NetSysFire added Info / User Interface Game - player communication, menus, etc. (S2 - Confirmed) Bug that's been confirmed to exist curses Things specific to the curses variant of the game labels Apr 14, 2024
@katemonster33
Copy link
Contributor

what exactly is the issue here? "looks incorrect"?

@NetSysFire
Copy link
Member Author

image

image

For reference, both popups in 0.G.

@kevingranade
Copy link
Member

Your issue is, "it is not drawing a border"?

@katemonster33
Copy link
Contributor

katemonster33 commented Apr 21, 2024

I had a think on this, we definitely could do better with the spacing around each window. The issue is that ImGui has several variables for things like the number of pixels to leave before and after a window's border before the content can draw. ImTui sets all of these to 0 to save space. In a bigger window like the keybindings UI i think it makes sense, but maybe in the popup it's too tiny.

I think there's two ways we could deal with this that wouldn't be too bad.

In the popup code, we could add ImGui::Text fields before and after the popup's content. This would add an extra pixel of size above and below the text. BUT this would have to be done with preprocessor directives so it only happens on ImTui which is sort of gross.

The other fix would be to play with the item spacing variables set in imtui_impl_text.cpp and set them to values that make more sense for us. It just means that windows like the keybindings UI will always have a pixel on all sides of the content reserved for the grey blank space 'border'. Maybe this is ok. I guess it's for others to decide :)

Edit: I forgot one. We could set a special ImTui-specific variable to always draw ASCII borders around windows. This would bring back the lines around the windows. I find the current look more aesthetically pleasing personally, but I also don't play the curses build so I'm happy with what everyone else wants

@katemonster33
Copy link
Contributor

katemonster33 commented Apr 21, 2024

Also worth mentioning. I'm very busy fixing more important issues. If anyone else could look into this it would be a huge help

@IdleSol
Copy link

IdleSol commented Apr 21, 2024

Your issue is, "it is not drawing a border"?

And where's the question mark gone?

@katemonster33
Copy link
Contributor

And where's the question mark gone?

I see it now. This sort of stuff needs to be put in the issue description.

@katemonster33
Copy link
Contributor

repeating my findings here.

so ImTui has an option for drawing ASCII borders around windows, which i turned on with some test code. unfortunately, though, this does not leave extra space around a window for the border, so it just tramples the contents of your window with the border characters. and it's not smart enough to draw the border above the window (when there's no titlebar).

We will need to revisit the ImTui examples and figure out what's going on here, either this never worked, or something broke in the ImTui code somewhere along the way as I back-ported its patches to the latest ImGui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
curses Things specific to the curses variant of the game Info / User Interface Game - player communication, menus, etc. (S2 - Confirmed) Bug that's been confirmed to exist
Projects
Status: Todo
Development

No branches or pull requests

4 participants