Add tooltips to some map generator settings
Adds tooltip descriptions for a few map generator settings. The tooltips are limited to dropdown choices. No tooltips are added for the options containing the choices or any non-dropdown settings. - Terrain type - Bounds shape - Buildings The "Square" bounds shape is rephrased as "Rectangle" for consistency with the added description. This is UI-only change.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
85999d7a40
commit
39a7e477c6
@@ -187,10 +187,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
void OnClick() => choices[option] = choice;
|
||||
var item = ScrollItemWidget.Setup(template, IsSelected, OnClick);
|
||||
item.Get<LabelWidget>("LABEL").GetText = () => choice.Label;
|
||||
item.GetTooltipText =
|
||||
choice.Description != null
|
||||
? () => choice.Description
|
||||
: null;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
dropDown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", option.Choices.Count * 30, option.Choices, SetupItem);
|
||||
dropDown.ShowDropDown("LABEL_DROPDOWN_WITH_TOOLTIP_TEMPLATE", option.Choices.Count * 30, option.Choices, SetupItem);
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user