Skip to content

Commit

Permalink
ability to paste qr code
Browse files Browse the repository at this point in the history
  • Loading branch information
noescape00 committed Aug 5, 2022
1 parent b8ba70a commit b806e08
Show file tree
Hide file tree
Showing 2 changed files with 597 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Src/NFTWallet/Assets/Code/NFTWallet/Windows/MarketplaceWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Cysharp.Threading.Tasks;
using Newtonsoft.Json;
using UnityEngine;
Expand All @@ -11,12 +10,14 @@

public class MarketplaceWindow : WindowBase
{
public Button ScanQRButton;
public Button ScanQRButton, ProcessQRTextButton;

public Text ScanQrButtonText;

public RawImage Image;

public InputField PasteQRCodeInputField;

private WebCamTexture webcamTexture;

private string QrCode = string.Empty;
Expand Down Expand Up @@ -50,6 +51,13 @@ async void Awake()
Image.gameObject.SetActive(false);
}
});

ProcessQRTextButton.onClick.AddListener(async () =>
{
string qrCode = PasteQRCodeInputField.text;
PasteQRCodeInputField.text = string.Empty;
await QRCodeScannedAsync(qrCode);
});
}

private IEnumerator GetQRCode()
Expand Down
Loading

0 comments on commit b806e08

Please sign in to comment.