Expose default UI labels and tooltips to yaml.
This commit is contained in:
@@ -22,10 +22,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Internal id for this option.")]
|
||||
public readonly string ID = null;
|
||||
|
||||
[Translate]
|
||||
[FieldLoader.Require]
|
||||
[Desc("Descriptive label for this option.")]
|
||||
public readonly string Label = null;
|
||||
|
||||
[Translate]
|
||||
[Desc("Tooltip description for this option.")]
|
||||
public readonly string Description = null;
|
||||
|
||||
@@ -48,10 +50,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
IEnumerable<LobbyOption> ILobbyOptions.LobbyOptions(Ruleset rules)
|
||||
{
|
||||
yield return new LobbyOption(ID, Label, Description,
|
||||
Visible, DisplayOrder,
|
||||
new ReadOnlyDictionary<string, string>(Values),
|
||||
Default, Locked);
|
||||
yield return new LobbyOption(ID, Label, Description, Visible, DisplayOrder,
|
||||
new ReadOnlyDictionary<string, string>(Values), Default, Locked);
|
||||
}
|
||||
|
||||
public object Create(ActorInitializer init) { return new ScriptLobbyDropdown(this); }
|
||||
|
||||
Reference in New Issue
Block a user