Skip to content

Commit

Permalink
New GUI for Reown Connection Provider (#1213)
Browse files Browse the repository at this point in the history
* Disabling Local Wallet section for Reown where there is no wallets available now

* Validating Reown config in ReownHttpClient now

* MUD Sample formatting changes

* Introduced OperationTracker
Replaced Reown connection screen GUI with a new one
Added "Appear" animations for secondary screens (needs to be enabled for W3A)

* Bugfix for OperationTracker

* Reown GUI update

* Sample Project Connection Providers update

* Added functionality to load wallet icons to Reown integration

* Automatic default font update

* Commiting DLLs that were built manually as automation is broken

* Build DLLs
  • Loading branch information
creeppak authored Nov 11, 2024
1 parent 4ba53ee commit a7ae1d2
Show file tree
Hide file tree
Showing 64 changed files with 4,970 additions and 2,168 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ public class HyperPlayConnectionProvider : ConnectionProvider, IHyperPlayConfig
public override Sprite ButtonIcon { get; protected set; }

[field: SerializeField] public override string ButtonText { get; protected set; } = "HyperPlay";

public override bool DisplayLoadingOnConnection => true;

public string SignMessageRpcMethodName => "personal_sign";

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ private async void Awake()
"Follow the link to get started: https://mud.dev/quickstart");

// 1. Initialize Web3 client.
web3 = await new Web3Builder(ProjectConfigUtilities.Load(), ProjectConfigUtilities.BuildLocalhostConfig())
web3 = await new Web3Builder(
ProjectConfigUtilities.Load(),
ProjectConfigUtilities.BuildLocalhostConfig())
.Configure(services =>
{
// Enable basic components
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public class Web3AuthConnectionProvider : ConnectionProvider, ILogoutHandler, IW
[NonSerialized] private bool _rememberMe;

public override bool IsAvailable => true;

public override bool DisplayLoadingOnConnection => false;

#if UNITY_WEBGL && !UNITY_EDITOR

Expand Down Expand Up @@ -105,8 +103,8 @@ private void OnValidate()
{
if (!modalScreenFactory.LandscapePrefab && !modalScreenFactory.PortraitPrefab)
{
modalScreenFactory.LandscapePrefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GuiScreen>("Packages/io.chainsafe.web3-unity.web3auth/Runtime/Prefabs/W3AConnectionScreen_L.prefab");
modalScreenFactory.PortraitPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GuiScreen>("Packages/io.chainsafe.web3-unity.web3auth/Runtime/Prefabs/W3AConnectionScreen_P.prefab");
modalScreenFactory.LandscapePrefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GuiScreen>(UnityEditor.AssetDatabase.GUIDToAssetPath("9e5f859444d8b4a448e79b28a6033fd7"));
modalScreenFactory.PortraitPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GuiScreen>(UnityEditor.AssetDatabase.GUIDToAssetPath("5ed2d6739dc24144cb021a0cb4bd8178"));
}
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ private void UpdateStackVisibility()
? opaqueScreenLayers.Max(l => l.SortOrder)
: int.MinValue;

if (newVisibleSortOrder == currentVisibleSortOrder) return;

currentVisibleSortOrder = newVisibleSortOrder;

foreach (var activeScreen in activeScreens)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public void Initialize(int id, GuiOverlayType type, string message, bool closeOn
Message.text = message;
}

public void UpdateMessage(string message)
{
Message.text = message;
}

private void OnScreenClick()
{
if (!closeOnClick)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public void Hide(int overlayId)
activeOverlays.Remove(overlay);
}

public void UpdateOverlay(int overlayId, string message)
{
var overlay = activeOverlays.Find(o => o.Id == overlayId);
overlay.UpdateMessage(message);
}

private GuiInfoOverlay CreateOverlay()
{
var overlay = screenFactory.Build<GuiInfoOverlay>();
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a7ae1d2

Please sign in to comment.