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 / [SOLVED] How to provide special formatting in AGK Edit Boxes/Text Objects

Author
Message
Eqqman
9
Years of Service
User Offline
Joined: 15th Jul 2015
Location:
Posted: 1st Mar 2019 09:39
Hello all-
Is there any way to format the text that appears in an edit box or text object, such as bold characters, italics, underlines, etc.? If the answer is no, what workarounds are people using to get around this issue?
Goo Goo G\'Joob!

The author of this post has marked a post as an answer.

Go to answer

Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 1st Mar 2019 10:01 Edited at: 1st Mar 2019 10:02
This post has been marked by the post author as the answer.
In a text object you can bold and color characters. There's no underline or italics, but you could draw a line or create a line sprite and place it under the text you want underlined. None of this is available in an editbox though (although you could also add a sprite above the textfield to underline certain parts of the text). You could possibly use a font image in the editbox, one that has underlines under each characters but I've not done this.

Was you thinking of a textarea type field where the user can type loads of text and bold/underline parts of the text (like you would in a notepad type app). Or have your app automatically bold and underline certain words? If the former then possibly using something like BBCode or equivalent that the user can add to the textfield and when they press the button to submit the string you loop through the string looking for specific codes and format the text accordingly before displaying. I was going to do something like this once.
OryUI - A WIP AGK2 UI Framework
Eqqman
9
Years of Service
User Offline
Joined: 15th Jul 2015
Location:
Posted: 1st Mar 2019 16:24
Hello-

The text to be displayed needs to have some, but not all, words in bold. I've been trying to use edit boxes for two reasons- 1) I get a border/background for free without having to manage my own sprites, and 2) I've noticed that edit box text appears in much higher quality than the text from text objects. Edit box text is appearing nice and sharp while the text object version is slightly blurry. If text objects are the only thing that natively support bold characters it looks like I'll be forced to use those, but how can I address the blurriness issue? To these object types have some kind of aliasing option that is enabled by default?
Goo Goo G\'Joob!

Login to post a reply

Server time is: 2024-11-05 23:15:25
Your offset time is: 2024-11-05 23:15:25