Usage example:
[advanced_preference]
field=test_combo
name= _ "Combo test"
type=combo
default=option1
[option]
id=option1
name= _ "Option #1"
[/option]
[option]
id=option2
name= _ "Option #2"
[/option]
[option]
id=option3
name= _ "Option #3"
[/option]
[/advanced_preference]
NOTE:
Now that there are more than two types of advanced preferences entries,
a problem with the saving and restoring of the previous screen surface
contents with the three GUI1 widgets involved (the checkbox, the combo,
and the slider) has appeared, resulting in the advanced preferences
slider glitching into view under certain conditions. This is apparently
related to the widget hiding/unhiding order; for example,
hiding/unhiding the advanced preferences combobox after the slider and
its label results in the combobox glitching into view when switching the
advanced preferences list selection instead.
"current_tod" and "current_time" served the same purpose, one at
scenario toplevel, the other inside of [time_area].
For the sake of consistency and for enabling the usage of the same
schedule macros in both cases, they are now both called "current_time".
This incidentally would allow displaying overlays for other preview
panes in the future (e.g. the main sidebar) since most of the required
functionality was implemented on the unit_preview_pane base class.
The previous logic assumed that the markup itself could possibly be
broken ONLY when it included unescaped ampersands (thus changing the
length of the ampersand fix test string). This is obviously not always
the case. As a result, markup was not disabled for strings like "this is
obviously <a>invalid</b> markup".
This logic is implemented in a single conditional statement. The new
condition is that if no ampersands had to be escaped, then _obviously_
markup was found to be broken first for some other reason, so we
immediately disable markup in that case. Alternatively, we test the
"fixed" test string immediately if we escaped ampersands.
Fixes bug #20996, although the specific manifestation of the bug
(confirmed) didn't make any sense in the first place.
NOTE: The overall logic continues to be bogus. Finding a & in the
original string isn't sufficient to find an unescaped ampersand; e.g.
"Foo & < bar" will be "fixed" as "Foo & &lt; bar". Then
again, there's only so much that can be done to work with text written
by people who don't know Pango markup or HTML.
If attribute is set to "no" and campaign with it is selected, eras menu will be
hidden and text to indicate this will be displayed.
Attribute defaults to "yes" and has been added to LoW.
N.B. since current MP code is tighly coupled with eras, the default era will
still be used by the engine to properly initialize stuff. Later on, code should be
improved by making it more modular and independant of eras.
This overwrites an existing flag animation for a side with a rebuilt
one, intended for use after changing a side's flag animation.
It does pretty much the same thing init_flags() does sans vector
allocation and TC configuration, which are supposed to have been done
already.
In order to implement functionality to change a side's flag imageset
after display initialization has taken place, we need to rerun this code
under different conditions.
The refactored code default-initializes the set of flag animations prior
to building them for individual sides; before this change, only the
memory allocation for the set was reserved in advance. Since the first
time init_flags() runs is during display initialization,
default-initializing the set shouldn't really make a noticeable
difference.
Now, we assign the flag animations later over the default-constructed
animations. Hopefully this shouldn't introduce any new interesting bugs.
It's not like there's any code accessing the animations at this point.
* Stacked most widgets vertically since GUI2 textboxes and sliders
demand a lot of horizontal space (especially sliders, for some
reason).
* Rearranged various options grouping them according to the
functionality they target.
* Reworded some option labels to make them look nice or have their
purpose made more evident.
* Added a side number label near the top of the dialog as a reminder
for the user.
For these ends:
* The whole grid layout has been extensively rearranged.
* Some unused or redundant code has been removed.
* A radio button macro was renamed, and made sure it is undefined at
the end of the file.
* Another macro along with its inclusion sites were removed