Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Editbox space between characters

Author
Message
pinete
13
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 22nd Feb 2016 19:43
Hi guys,
I'd like to ask if anybody knows some way in which the space between characters when you're entering text can be defined (reduced in this case).
I've been examining the commands related to text and editbox but apparently there are not any command to set the space between characters into an edit box.
I see that the space among them is quite big and doesn't look good from the user perspective, as you can read the text you're entering but very spaced.
Any help will be more than welcome!
thanks in advance.
Dybing
13
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 22nd Feb 2016 21:26
There's no command comparable to the SetTextSpacing for the editbox. So the best bet to have control over the spacing is to use a font-image with the desired kerning/spacing between letters. Using a custom font looks much better anyway than using the default font, so win-win even if it is a little bit more work.
pinete
13
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 23rd Feb 2016 11:59
Thanks Dybing,
I've solved it doing the next (I'm sharing in case anybodu has the same problem) :

- As editbox, as far as I know, is the only way to get the keyboard on mobile devices, I put it without having focus out of the screen.
- I set up a zone to click (a sprite or a screen zone that will contain the text the user enters)
- When I click on that sprite or zone, I put the focus on the Editbox (which is OUT of screen)
- At the same time that user is typing, I'm reading the content of the editbox (with GetEditBoxText or something like that) and then writing the string as TEXT (with all the possibilities) using the text commands.
Don't know if I'm being clear but this method is quite simple to implement and work perfectly.
From the visual perspective it looks far better than the string contained into an editbox and besides that, you have total control over the text and its appearance.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Feb 2016 12:05
Quote: "Don't know if I'm being clear but this method is quite simple to implement and work perfectly."

Perfectly clear, and a brilliant idea
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Rickynzx
12
Years of Service
User Offline
Joined: 19th Dec 2011
Location: Troon, Scotland
Posted: 23rd Feb 2016 12:32
This way works well, i have used this method in Sarah in Candlyland.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 23rd Feb 2016 12:43
Nice find! Thanks for sharing.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 23rd Feb 2016 15:52
Good idea! I asked for a command to change the spacing years ago. I only use it for my editor so I don't really care.
pinete
13
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 24th Feb 2016 10:19
Glad the idea would be useful!
I really appreciate the comments!

Login to post a reply

Server time is: 2024-11-25 09:43:37
Your offset time is: 2024-11-25 09:43:37