yairm210 / Unciv

Open-source Android/Desktop remake of Civ V

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Button to disband units in overview

Luke-Kitti opened this issue · comments

Before creating

  • This is NOT a gameplay feature from Civ VI, BNW, or outside - see Roadmap
  • This is NOT a gameplay feature from Vanilla Civ V or from G&K - If so, it should be a comment in #4697

Problem Description

I often needed to disband units to decrease the upkeep and earn more. But removing them one by one was a hassle, taking up extra time and requiring too many button clicks. I got to choose a unit on map, then click show more, then click disband, then click confirm.

Related Issue Links

No response

Desired Solution

I want to have a disband button in overview page for units tab.

Alternative Approaches

The disband button can be located after the unit name in that units tab

Additional Context

No response

I got to choose a unit on map, then click show more, then click disband, then click confirm.

Choose unit, "Del" key, "Enter" key. With that one PR... Unit actions dynamic paging #11002 - you no longer need to see the action to use the keyboard shortcut. Now don't say "but! mobile!" - you didn't specify. Still possible on Android with.... Anyway, no overview button, but way faster.

Still possible on Android with...

Uhhh... Bad copy-paste?

Now don't say "but! mobile!" - you didn't specify. Still possible on Android with.... Anyway, no overview button, but way faster.

thanks for letting me know that I need to specify. Yes, it is on mobile. I checked out the link provided. As I understood, the solution is that I need to buy usb-c hub to connect to a keyboard to access those shortcut keys (del + enter), right?

I think there is enough space to add a removal button, and I can definitely see the use case 🤔

One of these days I gotta learn people won't get when I'm joking - or half-joking which is most of the time. Of course I know mobile users won't simply go and buy a keaboard for a game... Though sitting in a Café with your fone+ bt-kbd + chinese micro-mouse ($6) and then do full remote desktop server maintenance on a rack box thousands of kilometres away is cool...

Thing is, I get it and it wouldn't be much of a hassle. BUT - That entire screen page was due an overhaul to get automatic interactive sorting like CityOverviewTab has, which would make such a disband button even more useful - but that got stalled on some minor hitch a while ago (was it selection as cities have a guid to find them but MapUnits don't??). Reducing the drive to go and do it. Also, which other unit actions might merit a button? Automate/Unauto/Wake up sleepers...?

Now that I've tried it - I wouldn't remove the confirmation popup, so it may not save as much time as you expect.

Code challenges (only on top of #11521) - refactoring the confirmation popup to reusable, as the UnitAction isn't (it does too much to the WorldScreen). Then moving UnitRenamePopup into the package where it belongs. The actual meat - new column - is trivial.

Then... The existing popup doesn't name the unit to disband, so that might confuse from the unit overview:

image

... which button did I click? We don't have a "selection highlight" in our grid - so - icon + name into the popup - or - (major) teach that grid to highlight a selection... Or hack the first column button into the mouse-over or down visual state while the popup is open? Nah.

which button did I click?

Why not try to have the popup use similar logic to what's already there for upgrading units?

Or making the WorldScreen disband confirmation Popup prettier too by reiterating who-you-wanna-fry, but the test branch is already too far from master having unmerged dependencies, See how that goes first.

We could also add the right click menu to the unit button on the units tab. This menu could then have a disband unit button so we aren't adding another column and can add more things to the menu later.