Thread Tools Display Modes
07/30/19, 05:31 AM   #1
FrenchCroissant
Join Date: Jul 2019
Posts: 2
Question Displaying a QR code

Hello !

I'm a mobile developer (iOS/Android) and I had an idea earlier this week.
I'd like to use LibResearch to get the current researches and their remaining times, then serialize those as a JSON, before finally creating a QR code from the JSON string. The code could then be scanned from a mobile app that would deserialize the JSON and create reminders for each ongoing research.

I have played around with AddOn development tutorials a bit, and all of this seems feasible to me. I would create the QR code with the "Luaqrcode" lib, which outputs a 2-dimensional array of ones and zeroes.

The only part I can't figure out how to implement is displaying the QR code.

Here are the things I've thought about :

• Generating a XML on-the-go before displaying it : might not be ideal since it may need a /reloadui before usage
• Using Unicode characters "Black square" and "White square" : as per my testing, these don't render correctly in-game, and I'm not sure if we even have a way to reduce inter-character / inter-line spacing
• Using standard textures (surely there are a black and white square as textures in-game?), and programmatically placing them on the canvas

I'd love any input - how would you guys go about implementing this ?

Thanks !
  Reply With Quote
07/30/19, 05:48 AM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
If you don't want to use Textures, then maybe BackdropControls. They are just colored rectangles.
  Reply With Quote
07/30/19, 01:17 PM   #3
FrenchCroissant
Join Date: Jul 2019
Posts: 2
Thanks ! That's exactly what I was looking for, got it working.

  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Displaying a QR code

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off