Johnny69 366 Posted May 7, 2020 Share Posted May 7, 2020 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Before I start it I want to mention that this is an alternative for what @Mali61 posted. You can use either one. Spoiler Download link: This is the hidden content, please Sign In or Sign Up PS: Please read README file 89 2 1 3 9 1 32 Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19684 Posted May 7, 2020 Honorable Member Share Posted May 7, 2020 (edited) If you place a text below of the textline from its height, where will it shown? For example you have this text object: self.text1.SetPosition(30, 36) self.text1.SetText("This is a\ntext just to\nbe sure it\nworks.") self.text1.SetLineHeight(20) And another one like this way: self.text2.SetPosition(30, self.text1.GetPosition()[1]+5) self.text2.SetText("This one is good") Edited May 7, 2020 by xP3NG3Rx Link to comment Share on other sites More sharing options...
Johnny69 366 Posted May 8, 2020 Author Share Posted May 8, 2020 13 hours ago, xP3NG3Rx said: If you place a text below of the textline from its height, where will it shown? For example you have this text object: self.text1.SetPosition(30, 36) self.text1.SetText("This is a\ntext just to\nbe sure it\nworks.") self.text1.SetLineHeight(20) self.text1.SetPosition(30, 36) self.text1.SetText("This is a\ntext just to\nbe sure it\nworks.") self.text1.SetLineHeight(20) And another one like this way: self.text2.SetPosition(30, self.text1.GetPosition()[1]+5) self.text2.SetText("This one is good") self.text2.SetPosition(30, self.text1.GetPosition()[1]+5) self.text2.SetText("This one is good") I'm guesing you are talking about GetLocalPosition(). That function return rect left and top (left top corner). The right code it will look like this: setYPosition = self.text1.GetLocalPosition()[1] setYPosition += self.text1.GetLineHeight() * self.text1.GetTextLineCount() self.text2.SetPosition(20, setYPosition) Or you can use GetTextSize() function like this: self.text2.SetPosition(20, self.text1.GetLocalPosition()[1] + self.text1.GetTextSize()[1]) Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19684 Posted May 8, 2020 Honorable Member Share Posted May 8, 2020 (edited) Well, I just checked the code, and I've seen the way to it, but anyway thanks. I think this is a good implementation. I'm trying to reverse it from the official, but it's ridiculous how they have done this with the arabic codepage. They have split the render and update functions into two functions like this way void __thiscall CGraphicTextInstance::Render(void *this, int a2) { void *v2; // esi v2 = this; if ( GetDefaultCodePage(this) == 1256 ) CGraphicTextInstance::RenderAR((int)v2, a2); else CGraphicTextInstance::RenderEU((int)v2, a2); } but the normal also has references to the arabic codepage, and vice versa too Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Johnny69 366 Posted May 9, 2020 Author Share Posted May 9, 2020 Ymir developers are kind of stupid (or at least the ones that work with metin2). I saw some code from the last months in root and binary and it's bad written, without logic. If is that wrong in client side imagine how it's like on server side. They only thing I think about those function splited is that they probably wanted to make the functions shorter 1 1 Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19684 Posted May 9, 2020 Honorable Member Share Posted May 9, 2020 (edited) I don't want to. They had one job. And here is mine too Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Kafa 153 Posted May 10, 2020 Share Posted May 10, 2020 (edited) 15 hours ago, xP3NG3Rx said: I don't want to. They had one job. And here is mine too O.o official event gui publish ? Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Johnny69 366 Posted May 10, 2020 Author Share Posted May 10, 2020 (edited) As I said in README file, align it wasn't done. I had a little free time today and I did the align too: (sorry for gif inspiration) https://metin2.download/picture/naEcD4QuxZVFb2AQM37Odaq5e07Lgds8/.gif If something is wrong with the code please send me a private message or reply in this topic and I will fix it. New link: This is the hidden content, please Sign In or Sign Up PS: Replace the whole code because it has small changes and they are necessarily. Edited August 27, 2022 by Metin2 Dev Core X - External 2 Internal 19 1 1 7 Link to comment Share on other sites More sharing options...
numNum 37 Posted March 26, 2021 Share Posted March 26, 2021 (edited) Thanks for the topic @Johnny69 @xP3NG3Rx As of what I can see here that you are making wishes become true , Can you please share the multiline text with Arabic? I'm kindda struggling with it xD Edited March 26, 2021 by jeddawee Link to comment Share on other sites More sharing options...
Premium Hunger 472 Posted May 22, 2022 Premium Share Posted May 22, 2022 (edited) Many months later ... https://metin2.download/picture/80K00BEjv25f8mAxzPskfJ1HOL219qaL/.png Edited August 16, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Recommended Posts