CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.26k stars 4.11k forks source link

uilist issues from migration #74341 #75661

Open Brambor opened 4 weeks ago

Brambor commented 4 weeks ago

Describe the bug

Issues left in the code after merging #74341, see it for more info.

Attach save file

N/A

Steps to reproduce

issue 1: load a game issues 2 & 3: go into the menu

Expected behavior

  1. See load screen.
  2. The Interactible popup window is not behind the ImGui window.
  3. Clicking works only if the entry is clicked.

Screenshots

No response

Versions and configuration

Additional context

No response

GuardianDll commented 4 weeks ago

someone also posted this in discord image

PatrikLundell commented 4 weeks ago
HadeanLake commented 4 weeks ago

I play with slightly increased font size fonts

Window order is a problem - some windows are on top of others making it hard or impossible to read MA selection is not only on top of list of techniques it also wider than screen, with MA names out of screen 2024-08-14-141346_1920x1080_scrot

Selecting components for crafting screen looks like this: crafting

When examining appliances list of actions obstructs information power grid

p2

Brambor commented 4 weeks ago

someone also posted this in discord image

Yes, this menu could use an improvement. The same goes for the debug menu: image

Note: broken on smaller screens: image

Brambor commented 4 weeks ago

I might dust off the solution I proposed: get window size from uilist entries and line break all other text.

https://github.com/db48x/Cataclysm-DDA/pull/2/commits/50fa53b9c0bba1ddffd8f6fb8fc6f5c73dc21e28

Standing-Storm commented 4 weeks ago

Mentioned elsewhere but putting here: the new menus do not process color tags, they just render them as text:

Untitled

Terrorforge commented 4 weeks ago

Spell menu also no longer shows the name of the current category. This is my Favorites section but it doesn't say so anywhere: image

db48x commented 4 weeks ago

Spell menu also no longer shows the name of the current category.

Did you know that this is the only uilist menu in the entire game that has categories? I am thinking about rewriting it so that it doesn’t use a uilist at all.

I have filed this as a separate bug report.

db48x commented 4 weeks ago

[…] The same goes for the debug menu:

Yes, that big text at the top really makes it awkward. See https://github.com/CleverRaven/Cataclysm-DDA/issues/75667 for more details.

I might dust off the solution I proposed: get window size from uilist entries and line break all other text.

Try it and see how it looks. If it looks better I’ll take it. However, in this case I bet it makes the window really skinny and wraps the text to unreadability.

db48x commented 4 weeks ago

Mentioned elsewhere but putting here: the new menus do not process color tags, they just render them as text:

Please be precise when reporting bugs! :D The new menus do clearly support color tags, it’s just that the description field of the Magiclysm spell casting menu ignores them.

The real problem is that our ImGui code doesn’t yet support coloring text if we are also wrapping it into a paragraph. See https://github.com/CleverRaven/Cataclysm-DDA/issues/75669 for more details.

db48x commented 4 weeks ago

When examining appliances list of actions obstructs information

Nice. The uilist can already be offset, so the caller in this specific case just needs to calculate the correct offset.

db48x commented 4 weeks ago

Selecting components for crafting screen looks like this:

It looks like any menu with footer text or item descriptions has the same problem: color tags are shown to the user. I filed it separately as https://github.com/CleverRaven/Cataclysm-DDA/issues/75673

db48x commented 4 weeks ago

Window order is a problem - some windows are on top of others making it hard or impossible to read MA selection is not only on top of list of techniques it also wider than screen, with MA names out of screen

I’ve filed the martial arts menu problem as https://github.com/CleverRaven/Cataclysm-DDA/issues/75674.

db48x commented 4 weeks ago

I cannot see loading individual components when loading a game. It just black-screens me for a while and then the game is loaded.

Filed separately; https://github.com/CleverRaven/Cataclysm-DDA/issues/75678

The filter / is displayed behind the menu, as it is not yet written in ImGui.

Filed separately; https://github.com/CleverRaven/Cataclysm-DDA/issues/75676

I would prefer on left mouse click, don't select the selected entry, but the entry under the cursor.

Previously filed as https://github.com/CleverRaven/Cataclysm-DDA/issues/75288

Brambor commented 4 weeks ago

I might dust off the solution I proposed: get window size from uilist entries and line break all other text.

Try it and see how it looks. If it looks better I’ll take it. However, in this case I bet it makes the window really skinny and wraps the text to unreadability.

You might be right. Adding min max height to the caller might fix it, if my solution doesn't work.

I also considered a hard max to the CDDA window size, but entries cannot be broken, so it would affect only the title and description. Wrapping them to the whole width of the window would solve unreadability, but it would still look horrendous.

akrieger commented 4 weeks ago

Pocket settings menu has some weird overlaps, and the submenu renders behind everything else.

image
akrieger commented 4 weeks ago

It's like it's not completely clearing the old screen first or something. There's an afterimage until it renders another frame.

image
akrieger commented 4 weeks ago

Pockets settings left list doesn't scroll when the cursor wraps around from bottom to top (or vice versa) until another scroll event happens.

akrieger commented 4 weeks ago

Some cursed triple selection bars if you reverse directions in the middle of the list when using arrow keys.

image
db48x commented 4 weeks ago

Pocket settings menu has some weird overlaps, …

What is overlapping in that screenshot? The blue border overlaps with the text, but that’s already a known problem.

akrieger commented 4 weeks ago

That was it, the blue box.

failboat78 commented 4 weeks ago

Can't read bottom of firearm mend menu image

Examining battery not showing bottom image

db48x commented 4 weeks ago

Thanks, those are both great examples of #75698.