Remove custom tooltip timings (#19604)
This commit is contained in:
@@ -41,7 +41,6 @@ public sealed class ExamineButton : ContainerButton
|
|||||||
}
|
}
|
||||||
|
|
||||||
ToolTip = verb.Message ?? verb.Text;
|
ToolTip = verb.Message ?? verb.Text;
|
||||||
TooltipDelay = 0.3f; // if you're hovering over these icons, you probably want to know what they do.
|
|
||||||
|
|
||||||
Icon = new TextureRect
|
Icon = new TextureRect
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<Button
|
<Button
|
||||||
Name="Button"
|
Name="Button"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
TooltipDelay="0.5"
|
|
||||||
Margin="0"
|
Margin="0"
|
||||||
StyleClasses="ButtonSquare">
|
StyleClasses="ButtonSquare">
|
||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
|
|||||||
@@ -1239,7 +1239,6 @@ namespace Content.Client.Preferences.UI
|
|||||||
{
|
{
|
||||||
Visible = false,
|
Visible = false,
|
||||||
HorizontalExpand = true,
|
HorizontalExpand = true,
|
||||||
TooltipDelay = 0.2f,
|
|
||||||
MouseFilter = MouseFilterMode.Stop,
|
MouseFilter = MouseFilterMode.Stop,
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
@@ -1258,7 +1257,6 @@ namespace Content.Client.Preferences.UI
|
|||||||
if (job.LocalizedDescription != null)
|
if (job.LocalizedDescription != null)
|
||||||
{
|
{
|
||||||
_jobTitle.ToolTip = job.LocalizedDescription;
|
_jobTitle.ToolTip = job.LocalizedDescription;
|
||||||
_jobTitle.TooltipDelay = 0.2f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddChild(new BoxContainer
|
AddChild(new BoxContainer
|
||||||
@@ -1345,7 +1343,6 @@ namespace Content.Client.Preferences.UI
|
|||||||
if (antag.Description != null)
|
if (antag.Description != null)
|
||||||
{
|
{
|
||||||
_checkBox.ToolTip = Loc.GetString(antag.Description);
|
_checkBox.ToolTip = Loc.GetString(antag.Description);
|
||||||
_checkBox.TooltipDelay = 0.2f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddChild(new BoxContainer
|
AddChild(new BoxContainer
|
||||||
@@ -1387,7 +1384,6 @@ namespace Content.Client.Preferences.UI
|
|||||||
if (trait.Description is { } desc)
|
if (trait.Description is { } desc)
|
||||||
{
|
{
|
||||||
_checkBox.ToolTip = Loc.GetString(desc);
|
_checkBox.ToolTip = Loc.GetString(desc);
|
||||||
_checkBox.TooltipDelay = 0.2f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddChild(new BoxContainer
|
AddChild(new BoxContainer
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
VerticalExpand="False"
|
VerticalExpand="False"
|
||||||
StyleClasses="ButtonSquare"
|
StyleClasses="ButtonSquare"
|
||||||
Margin="0"
|
Margin="0"
|
||||||
ToolTip="foobar"
|
ToolTip="foobar">
|
||||||
TooltipDelay="0.25">
|
|
||||||
<BoxContainer Orientation="Horizontal" Margin="0">
|
<BoxContainer Orientation="Horizontal" Margin="0">
|
||||||
<TextureRect Name="Texture"
|
<TextureRect Name="Texture"
|
||||||
HorizontalExpand="False"
|
HorizontalExpand="False"
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ public sealed class MenuButton : ContainerButton
|
|||||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||||
public const string StyleClassLabelTopButton = "topButtonLabel";
|
public const string StyleClassLabelTopButton = "topButtonLabel";
|
||||||
public const string StyleClassRedTopButton = "topButtonLabel";
|
public const string StyleClassRedTopButton = "topButtonLabel";
|
||||||
private const float CustomTooltipDelay = 0.4f;
|
|
||||||
|
|
||||||
private static readonly Color ColorNormal = Color.FromHex("#7b7e9e");
|
private static readonly Color ColorNormal = Color.FromHex("#7b7e9e");
|
||||||
private static readonly Color ColorRedNormal = Color.FromHex("#FEFEFE");
|
private static readonly Color ColorRedNormal = Color.FromHex("#FEFEFE");
|
||||||
@@ -48,7 +47,6 @@ public sealed class MenuButton : ContainerButton
|
|||||||
public MenuButton()
|
public MenuButton()
|
||||||
{
|
{
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
TooltipDelay = CustomTooltipDelay;
|
|
||||||
_buttonIcon = new TextureRect()
|
_buttonIcon = new TextureRect()
|
||||||
{
|
{
|
||||||
TextureScale = new Vector2(0.5f, 0.5f),
|
TextureScale = new Vector2(0.5f, 0.5f),
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ public sealed class ActionButton : Control
|
|||||||
OnUnpressed(args);
|
OnUnpressed(args);
|
||||||
};
|
};
|
||||||
|
|
||||||
TooltipDelay = 0.5f;
|
|
||||||
TooltipSupplier = SupplyTooltip;
|
TooltipSupplier = SupplyTooltip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ namespace Content.Client.UserInterface.Systems.Alerts.Controls
|
|||||||
{
|
{
|
||||||
public sealed class AlertControl : BaseButton
|
public sealed class AlertControl : BaseButton
|
||||||
{
|
{
|
||||||
// shorter than default tooltip delay so user can more easily
|
|
||||||
// see what alerts they have
|
|
||||||
private const float CustomTooltipDelay = 0.5f;
|
|
||||||
|
|
||||||
public AlertPrototype Alert { get; }
|
public AlertPrototype Alert { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -48,7 +44,6 @@ namespace Content.Client.UserInterface.Systems.Alerts.Controls
|
|||||||
public AlertControl(AlertPrototype alert, short? severity)
|
public AlertControl(AlertPrototype alert, short? severity)
|
||||||
{
|
{
|
||||||
_gameTiming = IoCManager.Resolve<IGameTiming>();
|
_gameTiming = IoCManager.Resolve<IGameTiming>();
|
||||||
TooltipDelay = CustomTooltipDelay;
|
|
||||||
TooltipSupplier = SupplyTooltip;
|
TooltipSupplier = SupplyTooltip;
|
||||||
Alert = alert;
|
Alert = alert;
|
||||||
_severity = severity;
|
_severity = severity;
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ namespace Content.Client.Verbs.UI
|
|||||||
{
|
{
|
||||||
public const string StyleClassVerbMenuConfirmationTexture = "verbMenuConfirmationTexture";
|
public const string StyleClassVerbMenuConfirmationTexture = "verbMenuConfirmationTexture";
|
||||||
|
|
||||||
public const float VerbTooltipDelay = 0.5f;
|
|
||||||
|
|
||||||
// Setters to provide access to children generated by XAML.
|
// Setters to provide access to children generated by XAML.
|
||||||
public bool IconVisible { set => Icon.Visible = value; }
|
public bool IconVisible { set => Icon.Visible = value; }
|
||||||
public bool TextVisible { set => Label.Visible = value; }
|
public bool TextVisible { set => Label.Visible = value; }
|
||||||
@@ -30,7 +28,6 @@ namespace Content.Client.Verbs.UI
|
|||||||
public VerbMenuElement(Verb verb) : base(verb.Text)
|
public VerbMenuElement(Verb verb) : base(verb.Text)
|
||||||
{
|
{
|
||||||
ToolTip = verb.Message;
|
ToolTip = verb.Message;
|
||||||
TooltipDelay = VerbTooltipDelay;
|
|
||||||
Disabled = verb.Disabled;
|
Disabled = verb.Disabled;
|
||||||
Verb = verb;
|
Verb = verb;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user