Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3945 RFE: update Unit Display GUI to allow a tabbed and non tabbed v… #3946

Merged
merged 8 commits into from
Oct 28, 2022

Conversation

kuronekochomusuke
Copy link
Collaborator

…ersions

implements RFE #3945

  • added a button that switches the panel layout type when clicked
  • when switching to the CardLayout remove the child panels and readd so that the names are set correctly. show the tabStrip
  • when switching to the GridLayout set the columns, rows and make all the tabs visible. hide the tabStrip used by the CardLayout
  • added logic to do show panel when the layout is CardLayout

@HammerGS
Copy link
Member

Gave it a test and everything seems to work. But one suggestion.

image

Would it be possible to be able to drop and adjust the red lines? I was finding that I needed to drag the window larger to see the slot information rather than just drag the bar over.

Also wonder how the panel would work if the top left (General) has lots of information to display.

@HammerGS HammerGS added the GUI User Interface label Oct 21, 2022
@kuronekochomusuke
Copy link
Collaborator Author

i can look into adding dividers between the panels, to see how hard it would be.

some of the sub panels have issues displaying a lot of information and they probably need to be updated to correct some of the issues.

@kuronekochomusuke
Copy link
Collaborator Author

how about like this? the splitters make it a little clunky, but it allows you to adjust the sizes to fit the area you have.

image

@kuronekochomusuke
Copy link
Collaborator Author

  • updated to use split panes and adjusted the location of the panels in the non tabbed version
  • removed code in PilotPanel that was causing it to be very wide and causing issues with the split panes
  • added a preference that remembers if you were using tabbed or non tabbed, then starts up with the same version

@HammerGS
Copy link
Member

Been playing with this today and I really like it. Almost gives a control panel feel to things.

@HammerGS
Copy link
Member

On more thought. The window positions persist between switching, but could we get them to persist between games (specifically restarting a new game) like lots of our other window's options do?

Great job with this!

@kuronekochomusuke
Copy link
Collaborator Author

  • save splitter locations to preferences and use them on load

@HammerGS
Copy link
Member

Thanks for the save locations. The more I use the more I'm wondering about the Pilot panel.

image

With the exception of Command and toughness the date is duplicated on the General tab. This might be beyond the scope of what you want to do. But I wonder if the Command and Toughness got added to the General tab, then when you go to full mode. You could not show the Pilot tab, giving more space to spread the other tabs.

Or even just not show the pilot tab.

Any thoughts or opinions on that?

@codecov
Copy link

codecov bot commented Oct 22, 2022

Codecov Report

Base: 23.56% // Head: 23.06% // Decreases project coverage by -0.49% ⚠️

Coverage data is based on head (90dfbed) compared to base (eb2e0bd).
Patch coverage: 4.10% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3946      +/-   ##
============================================
- Coverage     23.56%   23.06%   -0.50%     
- Complexity     4810     4813       +3     
============================================
  Files          2212     2262      +50     
  Lines        243049   248276    +5227     
  Branches      45480    46180     +700     
============================================
+ Hits          57263    57277      +14     
- Misses       184327   189540    +5213     
  Partials       1459     1459              
Impacted Files Coverage Δ
megamek/src/megamek/client/ui/swing/ClientGUI.java 0.00% <0.00%> (ø)
...egamek/client/ui/swing/unitDisplay/PilotPanel.java 0.00% <0.00%> (ø)
...gamek/client/ui/swing/unitDisplay/UnitDisplay.java 0.00% <0.00%> (ø)
...ek/src/megamek/client/ui/swing/GUIPreferences.java 34.53% <25.00%> (-0.45%) ⬇️
...ek/src/megamek/common/weapons/missiles/ISMML3.java 77.41% <0.00%> (-22.59%) ⬇️
...ek/src/megamek/common/weapons/missiles/ISMML5.java 77.41% <0.00%> (-22.59%) ⬇️
...ek/src/megamek/common/weapons/missiles/ISMML7.java 77.41% <0.00%> (-22.59%) ⬇️
...ek/src/megamek/common/weapons/missiles/ISMML9.java 77.41% <0.00%> (-22.59%) ⬇️
...egamek/common/weapons/capitalweapons/NLWeapon.java 62.50% <0.00%> (-20.84%) ⬇️
...amek/common/weapons/capitalweapons/NPPCWeapon.java 62.50% <0.00%> (-20.84%) ⬇️
... and 234 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kuronekochomusuke
Copy link
Collaborator Author

the Pilot tab is also used switch crew around when you have more than one crew, so i don't think we can skip it

on Pilot tab there is also also a lot of hidden labels on it, that get shown when they have the attribute. i had to add a scroll pane to it in order it get it to work okay.

I was wondering about the pilot tab, if all those labels on it should be converted to display the info more like the summary tab. the way it is now does not play well with the splitter panes.

also I think i have seen an issue with the summary tab, when it has a lot if info to display. so they both could use some work.

I think updating the pilot tab and the summary tab should be new RFEs or issues, if they are going to be updated.

@gsparks3
Copy link
Collaborator

gsparks3 commented Oct 22, 2022

Yeah, doesn't the Pilot tab also display e.g. SPAs, Edge settings, etc? It's just that a lot of those are optional, and not always present even if the optional rules are active, so they don't always show up.

@pakfront
Copy link
Collaborator

pakfront commented Oct 22, 2022 via email

@kuronekochomusuke
Copy link
Collaborator Author

does the Swap roles button on the pilot panel do anything? looks like it just sets the text on a button

do you need to know the commanders or crews info while in a battle? the pilot panel looks like the only place to see the commanders or crews info.

here is the what the battlemaster looks like with the command console.
image

just trying to see if the pilot panel is adding any value or not.

what is a unit that has multiple crew, but does not have a command console? that is a case i have not looked at.

@HammerGS
Copy link
Member

HammerGS commented Oct 22, 2022

It might do something for Tripods. But I think someone would need to double check.

@kuronekochomusuke
Copy link
Collaborator Author

this is the code for the Swap roles button. would some other code be checking the text value on the button and then doing something based on it?

private void updateSwapButtonText() {
    if (btnSwapRoles.isSelected()) {
        btnSwapRoles.setText(Messages.getString("PilotMapSet.keepRoles.text"));
    } else {
        btnSwapRoles.setText(Messages.getString("PilotMapSet.swapRoles.text"));
    }        
}

@HammerGS
Copy link
Member

This was the PR that implemented the Multi-Crew units #555

I think some testing is needed to determine the impacts.

@kuronekochomusuke
Copy link
Collaborator Author

  • rearranged the panels by size,
  • moved pilot panel to first column, think the resizing works better with a 2x2x2 layout vs the 1x3x2 layout
  • turned on one touch expand, so can easily hide the pilot panel or other ones

image

@HammerGS
Copy link
Member

This latest iteration is really good. I'm going to tease it to the community to get some player feedback.

Copy link
Member

@NickAragua NickAragua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with it code-wise, just needs a little polishing.

@HammerGS
Copy link
Member

I’ve been using these and really like them. But I have 43” Widescreen. Haven’t had any major issues with the recent improve.

@kuronekochomusuke
Copy link
Collaborator Author

the only other thing i can think of adding is a Client Settings for the panel order, like the Button Order. just not sure how much it would be used.

image

yall think this would be helpful?

@SJuliez SJuliez merged commit b7efbe5 into MegaMek:master Oct 28, 2022
@HammerGS
Copy link
Member

the only other thing i can think of adding is a Client Settings for the panel order, like the Button Order. just not sure how much it would be used.

image

yall think this would be helpful?

I think this would be a good option, and if possible, include the option to not show a panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants