X Tutup
Skip to content

Add "jettison all" buttons to cargo sidebar menu#5867

Merged
sturnclaw merged 1 commit intopioneerspacesim:masterfrom
impaktor:jettison-all
Jul 18, 2024
Merged

Add "jettison all" buttons to cargo sidebar menu#5867
sturnclaw merged 1 commit intopioneerspacesim:masterfrom
impaktor:jettison-all

Conversation

@impaktor
Copy link
Member

@impaktor impaktor commented Jul 17, 2024

Closes #5860 feature request by @syonfox (I was going to close it anyway, as we don't do feature requests on the issue tracker, but figured I might as well implement it, low hanging fruit).

2024-07-17-165854_1536x960_scrot

Note: just appending "all" to the tooltip hardcoded. Dunno if we keep it, and put it in ui-core, or remove. Not obvious to me why the tooltips are passed as arguments to this function?

transfer_buttons(amount, min, max, tooltip_reduce, tooltip_increase)

@impaktor
Copy link
Member Author

impaktor commented Jul 17, 2024

OK, forced pushed to use same tooltip as other buttons.
Good to go.
(I've tested using this with hydrogen, and hydrogen and battle weapons in the cargo hold)

@syonfox
Copy link

syonfox commented Jul 17, 2024

why the tooltips are passed as arguments to this function?

I am not sure why the original tooltips were passed in but makes sense a bit for re-usability.

mt purpose of adding the new tooltips was so that people could disable these buttons.

ie

slider(0 100, "down", "up") would be as it is now

slider(0 100, "down", "up", "min", "max") would show both and you could do

slider(0 100, "down", "up", nil, "max") this to only show the one button

@sturnclaw
Copy link
Member

Not obvious to me why the tooltips are passed as arguments to this function?

Because it leaves open the possibility for more specific tooltips like "increase scan frequency" or "shrink garbage compactor". Anything that's not passed as an argument is hardcoded to a specific value.
Another side-benefit is the transfer_buttons function can be copy-pasted into another file with less work.

@sturnclaw sturnclaw merged commit 2d41b37 into pioneerspacesim:master Jul 18, 2024
@impaktor impaktor deleted the jettison-all branch July 18, 2024 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature improvments Dumpin menu needs buttons for quikly geting rid of mass on hot entery.

3 participants

X Tutup