League-of-Foundry-Developers / fvtt-module-theatre

GNU General Public License v3.0
30 stars 39 forks source link

Place game pause indicator on the bottom while no theatre is active & smoothly fade out bottom controls when creating a theatre #91

Closed manuelVo closed 2 years ago

manuelVo commented 2 years ago

This PR does two separate things. I've combined them into a single PR because they would cause merge conflicts if I created dedicated PRs. If you prefer having separate PRs I can still split them up, just let me know :)

1. Place game pause indicator on the bottom while no theatre is active

The first commit causes the Game Pause indicator to be placed at the bottom of the screen - where it is in vanilla foundry - while no theatre is active. If a theatre is being activated, the pause indicator will be smoothly animated to the center of the screen. Once the theatre is being closed, the pause indicator will be animated back to its original position.

2. Smoothly fade out the bottom controls

The second commit makes the bottom controls fade away with an animation instead of being abruptly removed.

As a nice effect this also fixes a bug where the scene controls would overlap the foundry icon while a theatre is active: grafik

That bug would happen because .hide() completely removes an element from rendering. As a result, the width of the "players"-control will no longer push the scene control to the right (yes, foundry's layout works like that), which causes the scene control to jump to the left, where it overlaps the foundry icon.

Since the fading no longer uses .hide(), but instead reduces the opacity to 0, the elements become invisible, but don't lose their width. As a result the scene controls stay at the spot where they belong.

megahead11 commented 2 years ago

Would it be possible on your end to test this patch for any possible conflicts with MyTab or MinimalUI? I know both of these mess quite a bit with the layout and have had some minor issues in prior.

manuelVo commented 2 years ago

Indeed, there are a few issues with those modules. I'll report back once they are fixed.

manuelVo commented 2 years ago

Done. This now works nicely with both MyTab and Minimal UI

megahead11 commented 2 years ago

I'll push the release for this MR once the other MR (#92 ) goes through

manuelVo commented 2 years ago

I've got a few more PRs planned/in the making, and got no hurry to get this released. So feel free to hold up on the releases for now :)