Skip to content

Commit

Permalink
Fix #11070: [Core][Windows] More action buttons displaying backplate …
Browse files Browse the repository at this point in the history
…instead of setting this as null
  • Loading branch information
sescalada committed Jul 25, 2024
1 parent 19a9d98 commit a986de9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Collections.Specialized;
using System.Linq;
using Evergine.Framework;
using Evergine.MRTK.SDK.Features.UX.Components.Configurators;
using Evergine.Xrv.Core.Localization;
using Evergine.Xrv.Core.UI.Buttons;

Expand Down Expand Up @@ -311,6 +312,13 @@ private void CreateButtonInstanceForContainer(ButtonDescription description, boo
{
Entity buttonInstance = this.CreateButtonEntity(description, CoreResourcesIDs.Prefabs.iconTextButton_weprefab);
buttonInstance.FindComponentInChildren<ButtonCursorFeedback>().HideTextOnCursorLeave = false;

foreach (var configurator in buttonInstance.FindComponentsInChildren<StandardButtonConfigurator>())
{
configurator.AllowBackPlateNullMaterial = true;
configurator.Plate = null;
}

this.instantiatedMoreActionButtons.Add(description.Id, buttonInstance);
}

Expand Down
3 changes: 2 additions & 1 deletion src/core/Evergine.Xrv.Core/UI/Windows/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ private void ButtonReleaseHandleForMoreActionsPanelBehavior(object sender, Event
var senderEntity = (sender as Component)?.Owner;
if (senderEntity?.FindComponentInParents<ToggleButton>() is ToggleButton toggle)
{
senderEntity = toggle.Owner;
// TODO change this, not resistent to hierarchy changes
senderEntity = toggle.Owner.Parent?.Parent;
}

if (senderEntity == null)
Expand Down

0 comments on commit a986de9

Please sign in to comment.