Revert previous fix which didn't work and set DisplayName properly
fixup e22c2ae11
This commit is contained in:
parent
e22c2ae115
commit
69aa909fc5
|
@ -53,11 +53,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
var buttonControl = new VirtualPadButton
|
||||
{
|
||||
Name = button.Name,
|
||||
Text = button.Icon != null
|
||||
? null
|
||||
: string.IsNullOrWhiteSpace(button.DisplayName)
|
||||
? button.Name
|
||||
: button.DisplayName,
|
||||
Text = button.Icon != null ? null : button.DisplayName,
|
||||
Location = UIHelper.Scale(button.Location),
|
||||
Image = button.Icon
|
||||
};
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// <summary>A single on/off button</summary>
|
||||
public sealed class ButtonSchema : PadSchemaControl
|
||||
{
|
||||
public string? DisplayName { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
public Bitmap? Icon { get; set; }
|
||||
|
||||
|
@ -34,7 +34,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
=> DisplayName = name;
|
||||
|
||||
public ButtonSchema(int x, int y, int controller, string name)
|
||||
: base(new Point(x, y), $"P{controller} {name}") {}
|
||||
: base(new Point(x, y), $"P{controller} {name}")
|
||||
=> DisplayName = name;
|
||||
|
||||
public static ButtonSchema Up(int x, int y, string? name = null)
|
||||
=> new ButtonSchema(x, y, name ?? "Up") { Icon = Resources.BlueUp };
|
||||
|
|
Loading…
Reference in New Issue