I would like to ask. Is it possible to make its individual elements colored in one text? If this cannot be done through Solar, then can you use some other method or not?
There is no built option yet but here are some alternative methods:
I decided to do write a quick and dirty code for my rich text code needs despite the availability of some very interesting packages out there. It only covers colors, bold/regular, and font size options and is dependent on this package for color retrieval: https://github.com/andrewyavors/Lua-Color-Converter
Tweak it and improve it if you need to.
[Untitled]
-- textStyler.lua
local color = require("convertcolor") --A very nice package for accessing hex colors https://github.com/andrewyavors/Lu…
A pure-Lua text rendering module for Corona SDK which can handle basic HTML, fonts, font-styles, and even basic font metrics. (Takes over from corona-styled-textwrap)
Another workaround:
Unfortunately, we can’t make promises that WebViews will be implemented on Windows in the near future.
The only other solution that I can think of is to use a native.newTextBox(), but it doesn’t support rich text. But it does support a large amount of scrollabe text if that’s what you are partly after.
system
Closed
February 15, 2024, 8:55am
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.