Updating Text Wrap
Hi, Neko Montaaju & Sort 'Em are ready to be uploaded to Apple in January (at long last for one of them) so i'm treading water working on another one from my "list" though it'll probably go back down the queue before it's finished...
OK, I've a problem that has got me scratching my head - I've tried different approaches over a couple of hours but nothing works.
It's an app which involves a custom made (typing) keyboard and I need a workaround for live updating of the Text Wrap. To explain further, the first and simplest approach was, when pressing "q" for example, I've Change Attribute MainText to MainText.."q" in the area that shows the type- the same for the space bar, except " " of course.
But when the words approach the end of a line and a word splits by carrying on onto the next line, then pressing space, i'd want the split word to wrap over as the full word onto that new line... if you see what I mean.
But Wrap Text isn't "live" is it, so it keeps the split word.... anyone have an ingenious workaround for this?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Comments
If I understand what you are saying, I whipped up a project real quick, and using change attribute game.text to game.text..self.whatLetterAmI works for me. I can PM you the project.
I am trying to learn how to make gifs, so I am going to try and post how it works for me
You'd need some kind of a buffer that keeps track of the last word and replaces the displayed characters based on text string functions. On my phone right now so I can't provide a demo.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Hi @zweg25 & @tatiang thanks for your replies.
@zweg25 Interesting that it works for you - live wrap as you type with a custom keyboard in a field (actor) - I'd be interested in seeing that, thank you.
Tatian, yes, I thought along those lines but still the problem of knowing which is the last word in a line - I could have done it with the amount of characters in a line if it was a fixed width typeface, but I'm using American Typewriter, which isn't, as you know.
But I look forward to your demo if you've time, thanks v.m.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
My first gif.. not awful..
@gyroscope Is this what you meant?
Hi again @zweg25 yes, exactly that ... so I wonder what I'm doing wrong?
For interest, does yours still wrap OK with the text range left?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
It does
Here is the project if you like to play with it.
(Stable Release 12.10 btw)
Thank you, @zweg25, appreciated. I'll take a look at that now - probably kick myself....
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
No problem, good luck
Good stuff, @zweg25 the difference with yours is you've used self attributes for the letters - why that makes the difference I'm not sure...
Thanks again.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Interesting, did you do the same to get wrapping to work?
Yes, by using self attributes as you did instead of adding the letter as text to the attribute in the change attribute behaviour.
Strange it makes a difference... but glad it does!
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
@zweg25 -- That is a really nice example of how to do a keyboard. Would you consider adding it to the "spare code" thread so it does not get lost?
@RThurman of course, but the art isn't the best