}
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
{
<Button
Name="Button"
HorizontalExpand="True"
- TooltipDelay="0.5"
Margin="0"
StyleClasses="ButtonSquare">
<BoxContainer Orientation="Horizontal">
{
Visible = false,
HorizontalExpand = true,
- TooltipDelay = 0.2f,
MouseFilter = MouseFilterMode.Stop,
Children =
{
if (job.LocalizedDescription != null)
{
_jobTitle.ToolTip = job.LocalizedDescription;
- _jobTitle.TooltipDelay = 0.2f;
}
AddChild(new BoxContainer
if (antag.Description != null)
{
_checkBox.ToolTip = Loc.GetString(antag.Description);
- _checkBox.TooltipDelay = 0.2f;
}
AddChild(new BoxContainer
if (trait.Description is { } desc)
{
_checkBox.ToolTip = Loc.GetString(desc);
- _checkBox.TooltipDelay = 0.2f;
}
AddChild(new BoxContainer
VerticalExpand="False"
StyleClasses="ButtonSquare"
Margin="0"
- ToolTip="foobar"
- TooltipDelay="0.25">
+ ToolTip="foobar">
<BoxContainer Orientation="Horizontal" Margin="0">
<TextureRect Name="Texture"
HorizontalExpand="False"
[Dependency] private readonly IInputManager _inputManager = default!;
public const string StyleClassLabelTopButton = "topButtonLabel";
public const string StyleClassRedTopButton = "topButtonLabel";
- private const float CustomTooltipDelay = 0.4f;
private static readonly Color ColorNormal = Color.FromHex("#7b7e9e");
private static readonly Color ColorRedNormal = Color.FromHex("#FEFEFE");
public MenuButton()
{
IoCManager.InjectDependencies(this);
- TooltipDelay = CustomTooltipDelay;
_buttonIcon = new TextureRect()
{
TextureScale = new Vector2(0.5f, 0.5f),
OnUnpressed(args);
};
- TooltipDelay = 0.5f;
TooltipSupplier = SupplyTooltip;
}
{
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; }
/// <summary>
public AlertControl(AlertPrototype alert, short? severity)
{
_gameTiming = IoCManager.Resolve<IGameTiming>();
- TooltipDelay = CustomTooltipDelay;
TooltipSupplier = SupplyTooltip;
Alert = alert;
_severity = severity;
{
public const string StyleClassVerbMenuConfirmationTexture = "verbMenuConfirmationTexture";
- public const float VerbTooltipDelay = 0.5f;
-
// Setters to provide access to children generated by XAML.
public bool IconVisible { set => Icon.Visible = value; }
public bool TextVisible { set => Label.Visible = value; }
public VerbMenuElement(Verb verb) : base(verb.Text)
{
ToolTip = verb.Message;
- TooltipDelay = VerbTooltipDelay;
Disabled = verb.Disabled;
Verb = verb;