Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Massive cleanup of GUI2 display/show and execute functions implementa…
…tions and related CVideo arguments This a two part commit. First: ---------------------------------------------------------------------------------------------------- Added and deployed two new helper macros for the standard implementations of the static execute and display functions. I also made use of a variadic template in order greatly simplify code maintenance. Now, even if the dialog's ctor parameters change, no one has to worry about updating the associated execute/display functions (though of course, this only applies if the helper macros are used). \o/ I did not deploy the macro in cases where there were multiple overloads or the functions did more than just show their dialogs. I might add an additional __VA_ARGS_ parameter to the macros later. Do note for the end_credits dialog I moved the default empty-string parameter from the display function to the ctor. Second: ---------------------------------------------------------------------------------------------------- Another change is that modal_dialog::show and modeless_dialog::show no longer take CVideo arguments. Since the video argument couldn't be included in the parameter pack (maintaining the argument would have meant making it the first one, which would be just as much work), and using CVideo::get_singleton in the macros would require adding video.hpp includes in a whole bunch of files, I simply removed the argument. I had been intending to do this for a while anyway. This therefor also removes the CVideo argument from: * All dialog display/execute functions. * modal_dialog::show * modal_dialog::build_window * modeless_dialog::show * modeless_dialog::build_window * wml_exception::show * gui2::show_message * gui2::show_error_message * gui2::show_transient_message * gui2::show_transient_error_message * gui2::show_wml_message * gui2::build * gui2::window::window * gui2::dialogs::tip::show * Various GUI2-related Lua functions. The video_dispatch helper was also removed. * Any functions that took a CVideo argument for the sole purpose of passing it to one of the above. Ya know, all these damn CVideo arguments didn't actually do anything, besides an occasional check to CVideo::faked. At the end of the pipeline, they just got assigned to the video_ member of gui2::window. Huge code bloat for nothing.
- Loading branch information
1 parent
8bfbc79
commit 46e3e15
Showing
121 changed files
with
556 additions
and
744 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
Oops, something went wrong.