Skip to content

Commit

Permalink
Build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rds1983 committed Nov 8, 2023
1 parent a16bfb6 commit 45ee8b0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions samples/Myra.Samples.Silk.NET/AllWidgets.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ private void BuildUI()
_buttonOpenFile = new ImageTextButton();
_buttonOpenFile.Text = "Open File";
_buttonOpenFile.Padding = new Thickness(8, 0);
_buttonOpenFile.Tooltip = "Tooltip 1";
Grid.SetColumn(_buttonOpenFile, 1);
Grid.SetRow(_buttonOpenFile, 1);
_buttonOpenFile.Id = "_buttonOpenFile";
Expand Down
2 changes: 1 addition & 1 deletion src/Myra/Graphics2D/UI/Desktop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public void ShowContextMenu(Widget menu, Point position) =>
ShowOverWidget(menu, OverWidgetType.ContextMenu, position);


public void ShowTooltip(Widget widget, string text, Point position)
public void ShowTooltip(Widget widget, Point position)
{
if (string.IsNullOrEmpty(widget.Tooltip))
{
Expand Down
6 changes: 4 additions & 2 deletions src/Myra/Graphics2D/UI/Widget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,12 @@ public void Render(RenderContext context)
(Desktop.OverWidget == null || Desktop.OverWidget.Tag != this) &&
_lastMouseMovement != null && (DateTime.Now - _lastMouseMovement.Value).TotalMilliseconds > MyraEnvironment.TooltipDelayInMs)
{
Desktop.ShowTooltip(this, Tooltip, Desktop.MousePosition + MyraEnvironment.TooltipOffset);
var pos = Desktop.MousePosition;
pos.X += MyraEnvironment.TooltipOffset.X;
pos.Y += MyraEnvironment.TooltipOffset.Y;
Desktop.ShowTooltip(this, pos);
}


UpdateArrange();

var oldTransform = context.Transform;
Expand Down
2 changes: 1 addition & 1 deletion src/Myra/Myra.PlatformAgnostic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<DefineConstants>$(DefineConstants);PLATFORM_AGNOSTIC</DefineConstants>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Myra.PlatformAgnostic</AssemblyName>
<AssemblyName>Myra</AssemblyName>
<PackageId>Myra.PlatformAgnostic</PackageId>
<OutputPath>bin\PlatformAgnostic\$(Configuration)</OutputPath>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Myra/Myra.Stride.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<DefineConstants>$(DefineConstants);STRIDE</DefineConstants>
<TargetFramework>net6.0</TargetFramework>
<PackageId>Myra.Stride</PackageId>
<AssemblyName>Myra.Stride</AssemblyName>
<AssemblyName>Myra</AssemblyName>
<OutputPath>bin\Stride\$(Configuration)</OutputPath>
</PropertyGroup>

Expand Down
2 changes: 2 additions & 0 deletions src/Myra/MyraEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#elif STRIDE
using Stride.Engine;
using Stride.Graphics;
using Stride.Core.Mathematics;
#else
using Myra.Platform;
using System.Drawing;
#endif

namespace Myra
Expand Down

0 comments on commit 45ee8b0

Please sign in to comment.