In most cases, it is not useful to hold priority after doing something,
since the spell or ability added to the stack can just be performed
beforehand.
Hence, automatically passing priority is the only comfortable setting.
However, in some cases it is useful (chiefly for Infernal Tutor +
Lion's Eye Diamond and similar interaction), and currently players
have to open Preferences, change the option and then change it back
whenever they need to hold priority, which is very annoying.
This change allows to temporarily hold priority by simply holding
Control while performing an action, which solves the issue in a
manner similar to other clients.
A "Hold" indicator next to the spells cast indicator is displayed so
that the user knows his Control key holding was registered.
The code works by adding a new HOLD_PRIORITY player action that causes
the automatic priority pass options to be ignored until the player is
given priority again.
The client sends the message whenever it's not already holding priority
and Ctrl+click/space/enter happens anywhere.
This is somewhat "loose" as it means that Ctrl+click on the background
also holds priority, but this might actually be desirable and it greatly
simplifies the code, since only a global AWT event listener is required,
and there is no need to change every place in the code that could add
something to the stack.
It is also possible to hold priority and stop holding priority using
the context menu.
Skips everything until next turn, except for declare attackers and blockers.
F11 and F9 are a better design, but F6 is provided for compatibility with
established conventions.
There is currently no GUI button for it.
All the current behavior of ScaledImagePanel seems to be useless, since the source
images are static, so we can just use the highest quality scaling possible and
cache the result using TransformedImageCache.
RotatedResizedImageCache and MultiRotatedResizedImageCache contain the caching
machinery.
A cache of rotated and resized images is added to ImageCache, and is used by
the resizing functions there.
All the resizing and rotation functions in ImageHelper are redirected to the
ones in ImageCache.
This is slightly inefficient because it will cache some calls that are never
repeated, but it prevents developers from mistakenly using uncached functions
when calls are repeated, seriously impacting performance.
Also resizing functions that only take a width or an height have been removed,
and their calls fixed to provide the other dimension. It's still possible to
specify -1 as width or height to ignore constraints in that dimension, though.
Greatly speeds up UI performance.
Audio threads are busy while the sound plays, which could be several seconds,
potentially stalling other tasks competing for the thread pool.
So use a dedicated thread pool, which also allows to have it sized based
on the number of the audio lines.
The current code is broken, can't touch the UI in a thread pool thread,
UI.invokeLater must be used to get back on the UI thread.
Also, it must check whether the card has been changed again before setting
the image and do nothing in that case.
This commit makes passworded a first class property of
TableView as well as adds filtering capabilities
of open and passworded games. Useful for hiding
passworded games when looking for open play and
useful for hiding open games when playing vs
a friend on a busy server.
Currently they are not recognized, because getClickCount() will be
higher than 2 since Java interprets them as quadruple, sextuple, etc. clicks.
So, instead of checking for getClickCount() == 2, check for getClickCount()
being an even number.
This allows to quickly remove or add many cards to a deck.
This allows people to float mana more easily and to not have to get the popup forcing them to select which mana ability they would like to activate.
There's a new option in the menu system under the Mana Payment section which is set via pressing 'Alt' and the number '1' key (aka Alt+1) (and is unset by releasing Alt+1).
Or they can set it from the right click menu as well.
It's set to true as the default checkbox state but to false as the
default cached value. Because of that if preferences are never saved
images are stored to directories though the checkbox will be set in
preferences.