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.

Windows / Edit Box Font

Author
Message
Parry
9
Years of Service
User Offline
Joined: 16th Dec 2009
Location:
Posted: 10th Jul 2013 17:45 Edited at: 10th Jul 2013 17:46
After updating from 1076 stable to the beta version, my edit boxes are displaying typed text incorrectly. Picture attached. The edit box in the picture should be displaying "222222"

Other functions using text work fine. Anyone have any ideas?

Attachments

Login to view attachments
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 10th Jul 2013 18:47
In the latest betas, you need to make sure of the order that you set things in for them all to work properly. And to make sure that your numbers are correct. I don't know what your variables (or constants) stand for, so I can't help with the numbers part.

But, this is the order that I found works to make sure that my font and other bits work properly (I am also working in Tier 2, just listing the commands here):
SetEditBoxPosition
SetEditBoxMultiLine (I am guessing at this position in the order)
SetEditBoxMaxLines (I am guessing at this position in the order)
SetEditBoxSize
SetEditBoxDepth
SetEditBoxFontImage
SetEditBoxTextSize
SetEditBoxCursorColor
SetEditBoxCursorWidth
SetEditBoxBorderColor
SetEditBoxBorderSize
SetEditBoxBackgroundColor
SetEditBoxText (you really do want to do this AFTER everything else)

In v1076 it appeared to take everything into account at each call. But something changed in v108? and it became necessary to make sure to do things in the correct order.

It is actually similar for the Text object as well. Set all your parameters on that BEFORE you set the actual text (call CreateText with "" and then use SetTextString after setting fonts, sizes and such). This is especially important if you use the SetTextMaxWidth function for a Text object. That

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 10th Jul 2013 18:52
Oops, I missed the part where you said it was supposed to be showing '222222'.

I don't see where you are actually setting the text using SetEditBoxText in your sample code.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Parry
9
Years of Service
User Offline
Joined: 16th Dec 2009
Location:
Posted: 10th Jul 2013 20:09
The "222222" was typed in at run time. I will rearrange everything when I get back home to see if it helps. Thanks.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 10th Jul 2013 21:03
Here is another thing that might be causing your issue.

After you set up the display and input are you staying in some loop waiting for the input to be done? Perhaps calling agk::Sync(); to update inputs?

If so, that won't work. Not in Tier 2.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Naphier
8
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 11th Jul 2013 03:27
Do you have a subimage.txt file for the font image you're using?
It looks like the atlas isn't being properly referenced.

Parry
9
Years of Service
User Offline
Joined: 16th Dec 2009
Location:
Posted: 15th Jul 2013 22:17 Edited at: 15th Jul 2013 22:19
I rearranged the commands in the correct order and nothing has changed. Also I'm only calling Sync at the end of
"void app::Loop()" function.

I don't see any "subimage.txt" file included in the template. I have found a Avenir.png and Arial.png file in the "final" directory.

I'm still using the 1076 template, maybe that is the cause the problem?

Also installed the beta on my laptop and Im getting the same problem.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th Jul 2013 22:30
Where did you get the v1076 template from?

Are you using with the current v108 beta?

If so, that is definitely an issue. There are files in each template that are version specific.

What file are you using for your font image? Is it one you created or from elsewhere?

If it is a fixed font, the "<fontfilename> subimage.txt" file is not needed.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2019-05-25 22:15:32
Your offset time is: 2019-05-25 22:15:32