Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textrendering questions #26

Closed
MuNgLo opened this issue Mar 30, 2014 · 4 comments
Closed

Textrendering questions #26

MuNgLo opened this issue Mar 30, 2014 · 4 comments
Labels

Comments

@MuNgLo
Copy link
Collaborator

MuNgLo commented Mar 30, 2014

So I gone and done something stupid with my project so now I would love if I could parse text for colourcodes and present the text accordingly. As far as i know it isn't possible but I would also guess it wouldn't be easy to implement. Any chance at all this could get implemented?
At the very least I would suggest being able to have linebreaks in textfield and label.

Is there any way to manipulate the color value of a style or directly to the object? I need a simple colour field to show the colour of the rgb values the players choose. Could do it differently but I figure I'd ask.

I know I had another question but I forgot it..

Anyway. I am now reinstalling windows, updating unity and so far my OGSkin haven't bugged out. Here's what I'm using it for https://www.youtube.com/watch?v=Xuc7cGjrkjU
Not much GUI right now but I have a whole IRC connection to build UI for. That's kinda what made me think of colours. Would love to have them but at the same time it might just be easier to make it in Unitys default UI.

@mrzapp
Copy link
Contributor

mrzapp commented Mar 31, 2014

I could do an "override colour" field on the OGWidget, sure.

You can totally use linebreaks in text fields and labels, there shouldn't be a problem with that. Something else you could do though is make your own subclass of OGWidget for your chat window. The wiki has a small tutorial for it. Then you can use the drawing methods directly, just like the native Unity UI. Just hardcode some OGStyles at the beginning of your code and use OGDrawHelper to draw your text. Text rendering is generally not perfect yet, but it's still better than being forced to use a draw call for every bit of text, IMO.

If I get some time, I'll try to make an example. Your game looks like a mixture between Quake and Mirror's Edge, I like it :)

@mrzapp
Copy link
Contributor

mrzapp commented Mar 31, 2014

I've updated the latest release to support colour tinting. However, I tried implementing support for colour codes, but it's going to require more than just a little work, and even though I'd really like to support it, seeing as not even the native OnGUI can do this, I think it's a feature we'll have to add later down the line, when glyph rendering is more developed. I'll add it to the tracker.

@MuNgLo
Copy link
Collaborator Author

MuNgLo commented Mar 31, 2014

Well seems I need to mess around more with OpenGUI. 😄
I will have to looking into how to make my own OGWidget later. Is there any depenndancy from the render calls or compile order and such that would get messed up if it was written in C#?
Understandably this isn't really that important. Having nice text, properly rendered in all situations are far more important.

@mrzapp
Copy link
Contributor

mrzapp commented Mar 31, 2014

I don't see any immediate issues with writing it in C#, it should work just the same. Our main text issues right now are kerning related, so that's what I'll be focusing on first, but we'll get around to the fancy stuff.

@mrzapp mrzapp closed this as completed Apr 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants