Open SadPencil opened 1 year ago
Nightly build for this pull request:
Ready for review now. Prerequisite #367.
I'm not a fan of the design where the Battle.ini is constantly re-read and re-parsed here.
I'd rather read Battle.ini only once, have all the missions in the Missions
list, and filter what is actually displayed in the list.
Actually wouldn't it be better to have one INI per window? So separate screens would have different Battle.ini
alternatives.
I think the single file gives more control when it comes to the "Show All" view.
I'm not a fan of the design where the Battle.ini is constantly re-read and re-parsed here.
I'd rather read Battle.ini only once, have all the missions in the
Missions
list, and filter what is actually displayed in the list.
Thanks for the suggestion. Code updated.
This PR is backward compatible as by default the option is off. Modders can enable the
CampaignTagSelectorEnabled
option to use this feature.This feature enables modders to make a "choose your side" interface before the campaign selector. Choosing among "Act 1/Act 2/..." or any other tags is also possible.
The screenshot below shows the feature. (I am not an expert in beautifying user interfaces so it is only a working example. Fully configurable through ini files.)
The modders define tags for missions in
battle.ini
and customize the selector window inCampaignTagSelector.ini
using the new INItializableWindow ini format.I use TSC v6 client as an example. The corresponding files are attached here.
TSC.v6.example.zip
Prerequisite of this PR: #364 (merged now) and #367 (requesting merge).