excessive / DOMy

A DOM-like GUI framework for the *awesome* LÖVE framework
Other
32 stars 2 forks source link

Hypertext #14

Open karai17 opened 9 years ago

karai17 commented 9 years ago

How are we going to pull off hypertext? The ability to use multiple colours, fonts, throw in some emoji, etc in a single line or paragraph of text is probably going to be important, especially for online games with chat boxes.

shakesoda commented 9 years ago

that makes it totally useless for the chat box case.

karai17 commented 9 years ago

I think the most obvious route would be to create an inline container for a bunch of data. Would that be ideal, though?

{ "inline",
    { "text", "This is a chat message and it contains an ", class="white" },
    { "text", "Item Link", class={ "common_item", "item_link" } },
    { "text", ".", class="white" }
}
karai17 commented 9 years ago

End user hypertext is also important, as brought up in IRC.

> Hello, my name is {red}Karai{red} and I am totally {b}{i}AWESOME{i}{b}!     [ Send ]
karai17 commented 9 years ago

Some end user codes could be as follows:

{red}, {green}, {blue}, {cyan}, {pink}, {yellow}, {purple}, etc -- named color codes
{#12345678}, { 255, 255, 255, 255 } -- hex/dec color codes
{b}, {i}, {s} -- formatting codes such as bold, italics, strike through.
{url} -- external websites
adrix89 commented 9 years ago

Aren't there libraries for that? Also why can't you support it by default for all text?

karai17 commented 9 years ago

I do want to support all text, that is why I opened this issue... If you have an idea that will help, feel free to comment.

pablomayobre commented 9 years ago

Richtext Popo text.lua

Bobbyjoness commented 9 years ago

Emojis should be added lol. If emojis are added I think it should be done the same way android and iphone does them. For example on PC a train emoji is just typing out the :train: short code.

Bobbyjoness commented 9 years ago

Oops the train short code is : train :

Bobbyjoness commented 9 years ago

But with out spaces

karai17 commented 9 years ago

Emoji are a unicode standard so if DOMy ever does support them, it would use the standard unicode glyphs.

Bobbyjoness commented 9 years ago

Does Unicode standards have all the ones from my android keyboard?

karai17 commented 9 years ago

Google's emoji specifically use the unicode standards, yes.


Landon Manning lmanning17@gmail.com

On 2 May 2015 at 10:55, Bobbyjoness notifications@github.com wrote:

Does Unicode standards have all the ones from my android keyboard?

— Reply to this email directly or view it on GitHub https://github.com/excessive/DOMy/issues/14#issuecomment-98361178.

shakesoda commented 9 years ago

Emoji totally depends on Love getting font fallbacks or you using a font that has the glyphs, it'll just work if you have a font that can do it.

karai17 commented 9 years ago

While native emoji will work, rendering cute graphics instead of glyphs would be much more difficult.


Landon Manning lmanning17@gmail.com

On 2 May 2015 at 11:30, Colby Klein notifications@github.com wrote:

Emoji totally depends on Love getting font fallbacks or you using a font that has the glyphs, it'll just work if you have a font that can do it.

— Reply to this email directly or view it on GitHub https://github.com/excessive/DOMy/issues/14#issuecomment-98365280.

s-ol commented 9 years ago

I wouldn't define a hypertext markup language, your Lua syntax is one already. An inline block is fine, end-user end points are wrong IMO, their use is very very application specific and might cause security risks and inconvenience in some applicstions. Also there is no reason to introduce a new layer.

Your new syntax is essentially a markup language that could be compiled into regular DOMy. That could be a seperate, optional and very configurable library or module.