About Store Forum Documentation Contact



Post Reply 
Text Line break
Author Message
Lancer Offline
Member

Post: #1
Text Line break
Hi,

I have all my text stored in a file we call it "lang_data.txt" as example:

DST_GAME_CONFIRM_BUY_ITEM=`Do you want to buy:\n`

This is stored in a map. DST_GAME_CONFIRM_BUY_ITEM is the key.

Now if I wanna create EE::Text with the text "Do you want to buy:\n" then the \n is not creating a new line. But it just shows like this
   

Is there a way to fix this? I also tried with .code() but it's the same result.

If I do like this Str text = S + DST_GAME_CONFIRM_BUY_ITEM + "\n"

then the \n is working fine
(This post was last modified: 12-04-2020 08:58 PM by Lancer.)
12-04-2020 08:56 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Text Line break
in C++ '\n' gets converted to ENTER key.
So you can adjust your text file and replace \n with ENTER

If you're using TextData class, then in addition to ENTER you can also use '~n'
12-06-2020 08:40 AM
Find all posts by this user Quote this message in a reply
Post Reply