Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix visual bug in the announces system.
Follow up 'ceba081542a4'. It is nice to remove the previously announced message when announces are being delivered very quickly, but maybe movement feedback announces should be exempt of that. Before this rev, Whenever an 'Enemy unit sighted' message was being ordered coupled with a subsequent 'press $HOTKEY to keep moving', the 'Enemy unit sighted' message was getting discarded. src/actions/move.cpp: Movement feedback is important, do not remove previous messaging when announcing. src/display.cpp: Do not remove previously announced label when so requested. src/display.hpp: Add a `struct` device meant to pass optional arguments to `void announce(const std::string&, const color_t&, ...)` instead of primitive typed optional arguments (one, `int`, was being in use, I would have needed to add a second one, `bool`, but when trying to do that, the `bool` value would be received by the function as the `int` argument when not providing an explicit value for the `int` argument (see `src/actions/move.cpp`). Given C++11, for optional arguments, does not (to the extent of my understanding) allow specifying the argument name on the calling place, I was forced into adding this struct in order to jail all primitive typed optional arguments. src/synced_commands.cpp: Adapt to new public API in `class display`.
- Loading branch information
1 parent
78ffabd
commit d98d7aa
Showing
5 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters