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

Adjust text content to fit a defined width or height #22

Open
gltovar opened this issue Oct 8, 2013 · 9 comments
Open

Adjust text content to fit a defined width or height #22

gltovar opened this issue Oct 8, 2013 · 9 comments

Comments

@gltovar
Copy link
Contributor

gltovar commented Oct 8, 2013

Hey I've been working on this feature where you can scale down a textfield to either:

  1. Fit a single line textfield to a defined width
  2. Fit a multi line textfield to a defined height

here is my first pass, do you feel like it belongs in this project? If so, there is much to do before it can be pulled in. Not sure the proper place for the utilities and I'm sure it can be optimized better. Let me know you thoughts =]

here is the initial commit: gltovar@8eefdad

here is a screen shot: http://i.imgur.com/TSzBtYY.png

and the code that generated that screenshot: https://gist.github.com/gltovar/6881361

@larsiusprime
Copy link
Member

Hey, this looks super useful. If you can stabilize this I'll happily accept a pull request.

@gltovar
Copy link
Contributor Author

gltovar commented Oct 8, 2013

do you have any suggestions on how this should be integrated? should I add the static utilities to U.hx, or do they make sense in flxuitext? (for example)

@larsiusprime
Copy link
Member

U.hx is a bit of a kludge already... a lot of the functions that are in there might need to be refactored a bit or moved around as I think they duplicate a lot of what's already available in the flixel.util package.

So I'd stick it in FlxUIText as helper functions.

@larsiusprime
Copy link
Member

Any word on this? Looks good to me, can you make sure it's still compatible with latest stuff and if so, create a branch and make a pull request? Then I'll test it and if it works, I'll accept it.

@gltovar
Copy link
Contributor Author

gltovar commented Mar 19, 2014

hey man, sorry I didn't get back sooner. I just started a new job at
Amazon, I can take a look at it in a few nights/this weekend, get it not
breaking and build a test case. I'll let you know if I have any problems
with it.

On Tue, Mar 11, 2014 at 12:48 PM, Lars Doucet notifications@github.comwrote:

Any word on this? Looks good to me, can you make sure it's still
compatible with latest stuff and if so, create a branch and make a pull
request? Then I'll test it and if it works, I'll accept it.

Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-37341260
.

@larsiusprime
Copy link
Member

NP! Take your time.

@larsiusprime
Copy link
Member

Any updates on this?

@larsiusprime
Copy link
Member

What do you think @Gama11? Should we wrap this into a utility function or something?

@gltovar
Copy link
Contributor Author

gltovar commented Jan 19, 2015

My apologies, I've completely forgotten about this. I can't say I have much input on this, I'll leave it to you if you have ideas on proper integration. Let me know if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants