yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
8.04k stars 1.51k forks source link

Feature request: Buildings UI and disabled UI #11719

Open hackedpassword opened 4 weeks ago

hackedpassword commented 4 weeks ago

Before creating

Problem Description

What city is that nuclear plant in eating up my uranium?

click scroll x30

OH some conquered city had one, wish some oppressed city counsel member let me know. Now where's that inquisitor to find out what else they forgot...

OH that's where my workers went, disabled? Didn't need this city anyway. BURN!

Related Issue Links

none

Desired Solution

How I envision a building UI: All buildings that have been built, including wonders. Buildings that have not been built, nor being built or partially built, would be relevant to this menu.

Would work like the Resources menu, located in the Overview screen. The cross intersection showing the building is present could be the BuildingIcon. Column/rows could transpose.

A menu found in dev options could list all disabled items. Toggle the item, gone from disabled.

Alternative Approaches

Seems optimal, fairly straightforward.

Additional Context

No response

hackedpassword commented 3 weeks ago

I made this mockup with some random unicode symbols for building icons to visualize:

image

hackedpassword commented 3 weeks ago

I know nobody has responded but the idea continues to resonate.

Those icons could be white circle/black icon, while a building being built (has production or is top in queue) could be a yellow icon only. For example.

Additional noise: a selector button toggles build-able's as grey icons, clicking that icon queues the building. Passed to the city queue, no jump to the city screen, icon changes grey to yellow if at top of queue. Resource and global availability is checked, screen updates to reflect buildable status (wonders can only be built in one city). Competing builds would both show yellow in this instance. Clicking a yellow icon ejects the build from that city queue.

Definitely sounds like a good idea, not a big deal if you devs decide the design doesn't fit.

SomeTroglodyte commented 3 weeks ago

nobody has responded

In part because sometimes your language is hard to understand. No - that doesn't trigger "let's ignore what I don't get", more like "let's sleep over this, maybe I'll get it tomorrow"[^1]. That mockup explains much. Could be a new Overview page.

[^1]: or next century

hackedpassword commented 3 weeks ago

hard to understand

I kinda wish people (in general) would be more forthcoming when these communications aren't understood, makes sense to me but seems to frizzle others inducing awkwardness. np clarifying. Total :100: @SomeTroglodyte for your explanation here. My Vision-ization to written language api might be using uncommonly abstract protocols...

SomeTroglodyte commented 3 weeks ago

I am very prone to the temptation to use too flowery language, so I understand. But here it's better to consciously try to keep it simple. Not too simple - omitting verbs and similar stuff won't help either....

And you're a bit unlucky - I had a prototype at least compile some six hours ago (but has an init order bug - still not bad for maybe an hour of writing), but then weekend priorities stopped it for now. Interesting experiment, though. I built the SortableGrid/ColumnProvider widget for slightly different usecases, and so far the column provider was static - as enum. But doing all that dynamically proved pretty straightforward - that was really a morale booster, seeing that my topdown design is robust enough for entirely new uses...

The sortability feature isn't the reason to use that framework, but might even work - the cell "values" are buildable/built levels - impossible, possible, queued and built - and by those we should be able to sort once it runs - for free. The one thing in your mockup that is a bit harder is rotated labels - could prove to be anywhere from trivially easy to "rewrite the library" with Gdx scene2d. But for the first draft those labels will go into tooltips instead.

hackedpassword commented 3 weeks ago

Yea since you and the other devs got me straightened out on code feasibility, like a quick hello world, could result in a refactor. How, why, I don't get it. Maybe it's quantum cpu logic - hard things are easy, easy are OMG ABORT.

Simpler, hmm. I'll see what I can do. btw I played your pixel dungeon game, fun but frustrating lol

SomeTroglodyte commented 2 weeks ago

This is live code:

![image](https://github.com/yairm210/Unciv/assets/63000004/86543179-d5c1-4d41-a2e8-040807d278bf) ![image](https://github.com/yairm210/Unciv/assets/63000004/8bfbdaf7-6001-4633-9728-1595a08cb570)

... but I can't get a certain glitch out: The wider-than-screen view has misaligned columns until you click any column to resort, afterwards it's fine. The "why" so far completely escapes me. Yes, this is only 4 lines changed vs. the code that took 2h max on thursday/friday (4 lines because the Portrait class ignores setColor), but no, the misalign resists 2h of debugging.

Also - all the Wonders: One might want to have a filter, but I have no idea where to place that without breaking the Widget hierarchy in a hard-to-reconcile way. Floating will get in the way sooner or later. Have it eat vertical space like unit supply? Not tasty either.

hackedpassword commented 2 weeks ago

Isn't the wonders screen fulfilling the purpose? I'd say such a filter is unnecessary.

Screenshot_20240617_112853

SomeTroglodyte commented 2 weeks ago

Not sure when I can (or want to) continue tweaking this. Anybody wish to see the code -> https://github.com/yairm210/Unciv/compare/master...SomeTroglodyte:BuildingOverview?expand=1 Debug APK (usual disclaimer): https://drop.picasoft.net/r/DkqbLjzz#EVLEB90z9pSkxpcx4NjG3b7Ejh9XKQg0YiGldCUTeI0= Debug JAR: https://drop.picasoft.net/r/nQZUXkTG#TDaD1jCHDzra/gEB7mWfo17Ec+itAZqPytfmNeeV0Wg=

hackedpassword commented 2 weeks ago

Super appreciate you spending your time trying to make this work @SomeTroglodyte

Thank you!

=)