Extract version label chrome logic to a dedicated class

This commit is contained in:
Ivaylo Draganov
2024-10-03 11:46:44 +03:00
committed by Gustas
parent fff41a44ed
commit c0839d4521
11 changed files with 32 additions and 12 deletions

View File

@@ -20,13 +20,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
widget.Get<ProgressBarWidget>("PROGRESS").GetPercentage = () => world.GameSaveLoadingPercentage;
var versionLabel = widget.GetOrNull<LabelWidget>("VERSION_LABEL");
if (versionLabel != null)
{
var versionText = modData.Manifest.Metadata.Version;
versionLabel.GetText = () => versionText;
}
var keyhandler = widget.Get<LogicKeyListenerWidget>("CANCEL_HANDLER");
keyhandler.AddHandler(e =>
{