ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Displaying a QR code (https://www.esoui.com/forums/showthread.php?t=8674)

FrenchCroissant 07/30/19 05:31 AM

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 !

Shinni 07/30/19 05:48 AM

If you don't want to use Textures, then maybe BackdropControls. They are just colored rectangles.

FrenchCroissant 07/30/19 01:17 PM

Thanks ! That's exactly what I was looking for, got it working.

:banana::banana:


All times are GMT -6. The time now is 02:03 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI