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

show game board in all the game phases #4030

Merged
merged 52 commits into from
Jan 13, 2023

Conversation

kuronekochomusuke
Copy link
Collaborator

@kuronekochomusuke kuronekochomusuke commented Dec 9, 2022

show game board in all the game phases

#2193

  • convert the report display to be based off of the StatusBarPhaseDisplay to show the game board in all of the phases.
  • remove the report display from the main gui and use the mini report dialog to view the phase reports.
  • add buttons to the report phases to show the mini report dialog and the player list dialog.
  • when entering the report phases maybe show the mini report dialog and player list dialog.

image

@codecov
Copy link

codecov bot commented Dec 9, 2022

Codecov Report

Base: 22.99% // Head: 22.95% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (da5523a) compared to base (68b8350).
Patch coverage: 2.43% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4030      +/-   ##
============================================
- Coverage     22.99%   22.95%   -0.04%     
  Complexity     4816     4816              
============================================
  Files          2275     2276       +1     
  Lines        249834   250296     +462     
  Branches      46340    46374      +34     
============================================
+ Hits          57446    57463      +17     
- Misses       190936   191381     +445     
  Partials       1452     1452              
Impacted Files Coverage Δ
megamek/src/megamek/client/bot/BotClient.java 1.57% <0.00%> (ø)
...mek/client/ui/dialogs/MiniReportDisplayDialog.java 0.00% <0.00%> (ø)
...c/megamek/client/ui/dialogs/UnitDisplayDialog.java 0.00% <0.00%> (ø)
.../megamek/client/ui/swing/AbstractPhaseDisplay.java 0.00% <0.00%> (ø)
...egamek/src/megamek/client/ui/swing/ChatterBox.java 0.00% <0.00%> (ø)
megamek/src/megamek/client/ui/swing/ClientGUI.java 0.00% <0.00%> (ø)
...mek/src/megamek/client/ui/swing/CommonMenuBar.java 0.00% <0.00%> (ø)
.../megamek/client/ui/swing/CommonSettingsDialog.java 0.00% <0.00%> (ø)
...src/megamek/client/ui/swing/DeploymentDisplay.java 0.00% <0.00%> (ø)
...mek/src/megamek/client/ui/swing/FiringDisplay.java 0.00% <0.00%> (ø)
... and 24 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.

@HammerGS
Copy link
Member

Just starting to play around and look at this. I'll let you know anything I find, but very cool so far.

@HammerGS
Copy link
Member

Played a longish game today. It the more I used it the more I found myself constantly moving windows around. Is this something that could be dockable?

@kuronekochomusuke
Copy link
Collaborator Author

which windows were an issue?

do you know if there is some library that implements docking panels?

@kuronekochomusuke
Copy link
Collaborator Author

could probably do something like what is done in Lounge -> Team Overview. where you just move panels between prearranged locations.

but that is not what i usually think of when "docking". it is probably better to start with some simpler like that, than a more involved "docking". and that would not have the issues with using a 3rd party library.

the JSplitPane does not work that well with dynamically changing the number of panels you want to show. but it would be nice to use them, so that you can resize how much space the docked panel uses.

what were the issues, when docking was tried before?

@HammerGS
Copy link
Member

Sorry for the delay. I found the Player list in particular always seemed to be in the way and I found I closed it everytime it appeared. Only to have it reopen depending on the phase. I'm prone to changing the size of the main window depending on the turn which I think is part of the issue.

I seem to recall testing this when mjog was developing it and the docking part worked in conjunction with #3125. Which had great player feedback other than then bug of it constantly growing in size.

I really love the report being available and for me, is a game changer in how the program is played. Which as led me to some thoughts on your report filter (which I'll open as a separate RFE).

I feel like if it remembered positions and what was opened and closed it would be perfect, or the dream dock able.

@kuronekochomusuke
Copy link
Collaborator Author

you can turn off the player list or report auto popup by unchecking them in the menu. they currently auto popup on the reporting phases if checked. the unit display and mini map auto popup on non-report phases if checked.

was thinking it maybe good to have a setting for the auto popups by phase, instead of using the check marks. so you could set to show, hide, or manual for each phase for the unit display, mini map, report display, and the player list. that way you could set them to display or hide how you liked. the check mark system does not give you much flexibly in how it works.

I think some of the unit display growing in size may have been fixed in the tab and non-tabbed unit display pull request. I was running it to some of that with it. I fixed some things in the pilot and armor tab then.

would yall like to try to make it dock with this pull request or in a new one? was think to make make the report display and the unit display dockable, or just one to start to see if it works. would try to do it like the Lounge -> Team Overview

@kuronekochomusuke
Copy link
Collaborator Author

added Auto Display setting to control when the Unit Display, Minimap, Round Report, and Player List are automatically shown. Can set them to be shown, hidden, or controlled manually on Report Phases and Non-Report Phases.

Allowing it to be set for every phase makes it too complicated, so i went with just Report Phases and Non-Report Phases.

image

@kuronekochomusuke kuronekochomusuke added the For New Dev Cycle This PR should be merged at the beginning of a dev cycle label Dec 16, 2022
@kuronekochomusuke kuronekochomusuke removed the For New Dev Cycle This PR should be merged at the beginning of a dev cycle label Dec 27, 2022
@kuronekochomusuke kuronekochomusuke marked this pull request as ready for review December 27, 2022 19:53
@kuronekochomusuke
Copy link
Collaborator Author

this is ready for review now

@HammerGS
Copy link
Member

I was playing with this morning and so far it's really cool. It struck me with the changes that I kept going to View to look for the round report. Would it make sense more the round report from the Game menu to the View menu? Maybe in the same area as the unit display?

@kuronekochomusuke
Copy link
Collaborator Author

can move it over there. move the player list also? it fits with those also

@HammerGS
Copy link
Member

can move it over there. move the player list also? it fits with those also

yeah, I think that makes sense, to me when you close it you want to "view" it again.

@kuronekochomusuke
Copy link
Collaborator Author

grouped the dialogs and overlays together in the view menu and moved them up some.

image

@HammerGS
Copy link
Member

grouped the dialogs and overlays together in the view menu and moved them up some.

image

I think that flow makes much more sense.

@kuronekochomusuke
Copy link
Collaborator Author

add a divider between dialogs and overlays

image

Copy link
Member

@SJuliez SJuliez left a comment

Choose a reason for hiding this comment

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

Tested it and liked it a lot. I have a few comments on the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI User Interface (RFE) Enhancement Requests for Enhancement, new features or implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants