Jump to content
Forgot your email address? ×
×
×
  • Create New...

Recommended Posts

  • Honorable Member

M2 Download Center

Hidden Content

    Give reaction to this post to see the hidden content.
( Internal )

Hidden Content

    Give reaction to this post to see the hidden content.
( GitHub )

24021568747470733a2f2f7075752e73682f4647

Just add \n example:

Spoiler
Quote

this is test message\ntest heree\ntestttt

 

 

  • Metin2 Dev 15
  • Love 29
  • Good 5

I will be offline for an indefinite period.

Never forget that I love this community❤️

Link to comment
  • Honorable Member

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 comment
  • Honorable Member
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

I will be offline for an indefinite period.

Never forget that I love this community❤️

Link to comment
  • Engineer

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
  • Love 1
Link to comment

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 ?

  • Metin2 Dev 1
  • Love 2
  • Good 2
  • Not Good 1
Link to comment
  • Premium

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
  • Love 2
Link to comment
  • 10 months later...
  • 6 months later...

Thanks, Work Great 🙂

ba9bde0bce5d5e4e159a27f5205ba8a8.png

would there be any way to add color? for curiosity

Edited by nazox

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment

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

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


  • Read our Rules
  • Activity

    1. 0

      Visual Studio 2010 Ultimate

    2. 1

      Reduce server memory usage

    3. 31

      Metin2 Project - How to create à Metin2 private server on virtual machine

    4. 1

      Use BeltInventory slots without Belt

    5. 47

      Paid service - Vegas Projects

    6. 44

      Changelogs

    7. 79

      3D Shop - Mark Service

  • Recently Browsing

    • No registered users viewing this page.

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.