devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Floating Info Box

Open kphoenix137 opened this issue 1 year ago • 19 comments

https://github.com/diasurgical/devilutionX/assets/68359262/6cbf710b-653a-4131-9abc-a95d7ee2de6e

Adds toggle option for a floating info box (only for inventory currently). Features both moving the control panel item info to a floating box near the item, as well as expanded information since it's no longer limited to the space confinements of the control panel.

kphoenix137 avatar Jun 28 '23 02:06 kphoenix137

Then the question becomes what do we do with that disgusting black void at the bottom of the screen?

kphoenix137 avatar Jun 28 '23 03:06 kphoenix137

Get that new ui on there and get rid of the wasted space

Trihedraf avatar Jun 28 '23 03:06 Trihedraf

Get that new ui on there and get rid of the wasted space

that's a whole nother ball game and that will DEFINITELY get some massive pushback. Ideally the new control panel I designed would go hand in hand with floating boxes. The entire reason I designed floating info boxes was a result of wanting a more compact control panel. It warranted having them. Having floating info boxes isn't as impactful of a QoL addition if it doesn't result in the UI obscuring less space. In fact using it with the default panel could be seen as detrimental, as now you're obscuring other parts of the screen with information that could be moved to the empty space in the default control panel instead.

However, this PR must come first before a new control panel. So if this gets completed and merged, then that opens the door to a potential next step.

kphoenix137 avatar Jun 28 '23 03:06 kphoenix137

Nice, been waiting a long time for this. I don't think it should be an option, but whatever. Make town map the option, that thing is getting annoying since I know where everything is.

FitzRoyX avatar Jun 28 '23 04:06 FitzRoyX

Make town map the option, that thing is getting annoying since I know where everything is.

At lest don't make off topic complaints

AJenbo avatar Jun 28 '23 11:06 AJenbo

Then the question becomes what do we do with that disgusting black void at the bottom of the screen?

I thought that this black area is also needed for other descriptions, for example for the Monster type or when there are items on the ground. But if this is no longer the case, then this area could be made transparent. Or we could use AI to paint over the surface with a suitable motif. But I would rather vote that we would create a larger battlefield.

Chance4us avatar Jun 28 '23 19:06 Chance4us

The monster HP bar can show most of the other relevant informations. In combination they could provide for a more minimal main panel:

image

AJenbo avatar Jun 28 '23 19:06 AJenbo

Nice! It's really very compact.

Chance4us avatar Jun 28 '23 20:06 Chance4us

The monster HP bar can show most of the other relevant informations. In combination they could provide for a more minimal main panel:

image

Needs spell select

kphoenix137 avatar Jun 28 '23 22:06 kphoenix137

Bug: New player default gear doesn't show durability

Edit: Fixed

kphoenix137 avatar Jun 30 '23 00:06 kphoenix137

Bug: Bottom half inventory item boxes display an inventory slot height too high

Edit: Fixed

kphoenix137 avatar Jun 30 '23 00:06 kphoenix137

First post indicates it is working for stash items, but I can't get it to. Known?

FitzRoyX avatar Jun 30 '23 02:06 FitzRoyX

First post indicates it is working for stash items, but I can't get it to. Known?

Not implemented yet

kphoenix137 avatar Jun 30 '23 04:06 kphoenix137

This looks really nice!

FishGaming avatar Jun 30 '23 13:06 FishGaming

Currently broken. Can't figure out how to format these strings correctly (for damage range and durability range), and I can't figure out how to grab the item power string from PrintItemPower(). It bugs out hard when trying to display the strings.

kphoenix137 avatar Jul 01 '23 03:07 kphoenix137

Okay so at the moment, everything is functional and floating info boxes appear for both stash and inventory items (belt too). Next step would probably be to add floating boxes for anything else UI related. Anything not related to the UI should probably expand on the code used to display ground items.

@AJenbo if you have any suggestions going forward from here, let me know. All the major changes are done and I'll let this settle for a bit. (Although I just gotta add some minor touches in like displaying the amount for a gold pile, as well as changing durability text color based on affix)

kphoenix137 avatar Jul 04 '23 03:07 kphoenix137

Ah, we have a bug with displaying correct magical weapon damage

EDIT: Fixed

kphoenix137 avatar Jul 04 '23 03:07 kphoenix137

@kphoenix137 while you are actively working on the change (finding bugs, sending commits, etc), please consider always marking the PRs as "draft". Then, once you are good to go, remove it.

Otherwise each new comment here triggers a notification for people listening on issues.

julealgon avatar Jul 04 '23 15:07 julealgon

Altered the base AC of quest items that have unique data that manually sets the AC. Therefore there shouldn't be any compatibility issues, and the end-user won't notice. This change was made to improve the colored numbers displayed for these items for AC.

kphoenix137 avatar Jul 05 '23 01:07 kphoenix137