Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

uilist issues from migration #74341

Open Brambor opened this issue 1 year ago • 23 comments

Describe the bug

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

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

    • This shows for a frame or so
    • image
  • [ ] The filter / is displayed behind the menu, as it is not yet written in ImGui.

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

    • It's super annoying when clicking on the CDDA window to focus it and I select an entry instead. While testing a crash, this causes me to restart the game and reload the save.

    • If the mouse is somewhere completely different, it feels weird:

    • image

    • I think it works correctly in all cases except when you click outside the menu. The mouse click is just translated to the SELECT command regardless of where the user actually clicked, and we need to fix that. Probably not in this patch, however. The problem is in an entirely different part of the code.

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

  • OS: Windows
    • OS Version: 10.0.19045.4780 (22H2)
  • Game Version: 0.G-11377-g54be5797b6-dirty [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth] ]

Additional context

No response

Brambor avatar Aug 14 '24 13:08 Brambor

someone also posted this in discord image

GuardianDll avatar Aug 14 '24 13:08 GuardianDll

  • I can confirm 1. That's really bad when you're forced to use debug builds, since those take an eternity to load.
  • I can also confirm 2.
  • I don't do mouse stuff, so 3 has to be done by someone else. Since this is a multi issue report and I can't confirm all parts, I can't mark it as confirmed.

PatrikLundell avatar Aug 14 '24 13:08 PatrikLundell

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

HadeanLake avatar Aug 14 '24 13:08 HadeanLake

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 avatar Aug 14 '24 14:08 Brambor

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

Brambor avatar Aug 14 '24 14:08 Brambor

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

Untitled

Standing-Storm avatar Aug 14 '24 14:08 Standing-Storm

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

Terrorforge avatar Aug 14 '24 16:08 Terrorforge

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 avatar Aug 14 '24 17:08 db48x

[…] 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 avatar Aug 14 '24 17:08 db48x

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 avatar Aug 14 '24 17:08 db48x

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 avatar Aug 14 '24 18:08 db48x

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 avatar Aug 14 '24 18:08 db48x

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 avatar Aug 14 '24 18:08 db48x

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

db48x avatar Aug 14 '24 18:08 db48x

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.

Brambor avatar Aug 14 '24 19:08 Brambor

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

akrieger avatar Aug 15 '24 04:08 akrieger

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 avatar Aug 15 '24 04:08 akrieger

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 avatar Aug 15 '24 04:08 akrieger

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

akrieger avatar Aug 15 '24 04:08 akrieger

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.

db48x avatar Aug 15 '24 04:08 db48x

That was it, the blue box.

akrieger avatar Aug 15 '24 06:08 akrieger

Can't read bottom of firearm mend menu image

Examining battery not showing bottom image

failboat78 avatar Aug 15 '24 23:08 failboat78

Thanks, those are both great examples of #75698.

db48x avatar Aug 15 '24 23:08 db48x

Everything here is addressed or filed separately. Except for this:

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

The priority menu is rendered behind the ImGui menu. I will fix this now.

Brambor avatar Dec 09 '24 22:12 Brambor

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

I did reproduce that before, somehow, but not after #78453

Brambor avatar Dec 09 '24 23:12 Brambor

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

I can reproduce this only with PageDown not wrapping to the top. At all. But PageUp does wrap around the top. In uilist, neither wraps.

Home jumps to the last entry, as does End.

But these are for a new issue, this is too cluttered already.

Brambor avatar Dec 09 '24 23:12 Brambor