Page 1 of 1

[Feature Request] Colors in descriptions and item names

PostPosted: Fri Dec 25, 2015 13:38
by lisacvuk
I've got a Christmas wish. I would like that Minetest supports colors in descriptions and item names. Something like this...
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
"^3This text is red.^5This text is blue."

I just hope its not too much to ask for :D

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Fri Dec 25, 2015 13:43
by rubenwardy
This should be accompanied by allowing tools tips of an item to be changed at run time, using meta data.

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Fri Dec 25, 2015 16:53
by kaadmy
@lisacvuk: Is that Quake inspiration?

@lisacvuk, @rubenwardy: +1 to both ideas :)

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Fri Dec 25, 2015 20:59
by Calinou
kaadmy wrote:@lisacvuk: Is that Quake inspiration?


If we ever go for Quake-style coloring, I would much prefer an Xonotic or Unvanquished-style syntax like this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
^xFFFWhite text, ^xF00Red text


This would be even better (4th component being the alpha channel):

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
^xFFFFWhite opaque text, ^xF008Red semi-transparent text

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Fri Dec 25, 2015 23:18
by everamzah
^3quake ^2style ^7would be super ^0l33t ^2for regular in-game chat, tho. ^1(c) bulat
bulat did not actually say that

edit: actually, there's a lot of stuff that i miss from quake. the most important thing to me when i started playing this game was +zoom. sorry to derail. (ps: \bind command, and \alias oh my oh my)

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Fri Dec 25, 2015 23:50
by kaadmy
cvars FTW ;)

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Sat Dec 26, 2015 22:03
by lisacvuk
Yeah, from Quake :D
My next suggestion would be binds. But later on that.
I really like the transparency idea.
This would make it possible to make mods that list item qualities, like in Team Fortress 2 for example, or for changing the color of the item name according to the number of times it was dug (making the fresh-crafted ones more statisfying to place :D)

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Tue Dec 29, 2015 20:27
by asanetargoss
rubenwardy wrote:This should be accompanied by allowing tools tips of an item to be changed at run time, using meta data.


As someone less familiar with the modding API, I am surprised this is not already a feature!

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Tue Dec 29, 2015 23:22
by kaadmy
Or even better: allow tools to change dig capabilities with metadata.
Custom tools ;)

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Tue Jan 05, 2016 00:37
by sofar
I'm working on a PR to support custom ItemStack text - the thing that gets displayed in the tooltip.

https://github.com/minetest/minetest/pull/3449

once that is done, I don't see why that code couldn't be enhanced to support color.

Re: [Feature Request] Colors in descriptions and item names

PostPosted: Tue Jan 05, 2016 02:32
by lisacvuk
sofar wrote:I'm working on a PR to support custom ItemStack text - the thing that gets displayed in the tooltip.

https://github.com/minetest/minetest/pull/3449

once that is done, I don't see why that code couldn't be enhanced to support color.


Awesome! I can try to help adding colors to it, but with my limited knowledge of C++, I'm not sure I can.