Jump to content
  • We need you!

    You must register to discover all the features of our community!

Recommended Posts

You can make SplitMultiLine as static to save a bit of memory (since this function will be called plenty of times).

  • Love 1
Link to post

Also if you are smart enough as the webzen developers weren't, you will put an exception where the render of the textline class will skip the splitting on special places like whisper nameinput :).

Doesn't matter if they have added the DisableEnterToken if they didn't apply everywhere where they supposed to.

And when you report this problem on their forum(gayforge obv..), they delete the topic, and giving a single piece of nothing about it.

  • Love 2
Link to post
1 hour ago, xP3NG3Rx said:

Also if you are smart enough as the webzen developers weren't, you will put an exception where the render of the textline class will skip the splitting on special places like whisper nameinput :).

Doesn't matter if they have added the DisableEnterToken if they didn't apply everywhere where they supposed to.

And when you report this problem on their forum(gayforge obv..), they delete the topic, and giving a single piece of nothing about it.

thanks for reply :)

I was just thinking about this, and I added an option SetEnterToken(bool)

Default setting(m_EnterToken) is false, you can change at GrpTextInstance.cpp, or simply add code at ui/TextLine constructor

For Enable Example:

Testt = ui.TextLine()
Testt.SetParent(self)
Testt.SetEnterToken(True) ### this
Testt.SetText("this is test message\ntest here\ntesttt")

 

  • Love 2

no paid service

use at least c++11 and VS19, otherwise I won't help.

Link to post
Posted (edited)

The idea behind it is really cool and way cleaner than the official way of doing it. However, here are a few inconsistensies that you can see with this function. Of course it needs to be enhanced with further checks (as xP3NG3Rx said above) and your function is neat.

064345Screenshot-4.png


064345Screenshot-6.png


064345Screenshot-7.png


064345Screenshot-8.png

 

For example, with the official (not fully) reversed WJ_MULTI_TEXTLINE and a few checks I came up with this :

 

064820Screenshot-9.png

 

Good idea and method however, thank you!

 

Edit : Well you answered two minutes before my post and updated your repo, this message may be unrelevant now

Edited by Gurgarath (see edit history)
  • Love 1
Link to post

If you split only by "\n" and not "\\n" you won't need to add that check for editline.

Also I know default open file function from python 2.7 escape \n automaticaly but you can fix the \n in two ways: (I'm talking about locale_game / locale_interface)

1. replace all "\\n" in line with "\n"

2. open the file with codecs.open and encoding "string_escape"

 

One ideea though for your code: split the code where the text is initialized and after this save only the positions where \n was in a vector, after that in Render function you can use the position vector to rearange the text y position. Something like this (https://i.postimg.cc/WzNPgLS6/screenshot-136.png)

 

PS: I don't know how official did it but they seem stupid ?

 

Good job ?

Link to post
  • VIP
Posted (edited)

Especially their guild comment window, you can spam \n and the text will look so buggy.
This is how it looks like rofl.

 

f6roR0c.png

Obs: This "system" was implemented some time ago and this print is from today rofl... still the same and like penger said, you report the problem and they ignore your report.

 

For the chat window I had to disable the token from the input and even from text tail, since it's a good ideia.

By looking through the official python root they cleary forgot to add the DisableEnterToken() on some scripts....

# Simply disabling the token in the functions did the trick.
 
# @ PythonChat.cpp
  
# @ void CWhisper::AppendChat
#ifdef WJ_MULTI_TEXTLINE
	pChatLine->Instance.DisableEnterToken();
#endif

# @ void CPythonChat::AppendChat
#ifdef WJ_MULTI_TEXTLINE
	pChatLine->Instance.DisableEnterToken();
#endif

# @ PythonTextTail.cpp
# @ void CPythonTextTail::RegisterInfoTail
#ifdef WJ_MULTI_TEXTLINE
		pTextTail->pTextInstance->DisableEnterToken();
#endif

# @ CPythonTextTail::TTextTail * CPythonTextTail::RegisterTextTail
#ifdef WJ_MULTI_TEXTLINE
	pTextTail->pTextInstance->DisableEnterToken();
#endif

# @ void CPythonTextTail::RegisterChatTail
#ifdef WJ_MULTI_TEXTLINE
		pTextTail->pTextInstance->DisableEnterToken();
#endif

 

Edited by Owsap (see edit history)
  • Love 1
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.