Jump to content

Official Mouse Wheel Top Window(Scroll) [REVERSED]


Recommended Posts

  • Honorable Member

This is the hidden content, please

This is the hidden content, please

 

  • Mouse wheel moves relative to the top window, not the window the mouse is pointing to.
  • Reversed from 22.2.7.0 Official Binary.

 

Edited by Mali
  • Metin2 Dev 256
  • Eyes 2
  • Dislove 1
  • Not Good 1
  • Scream 1
  • Lmao 1
  • Good 50
  • Love 7
  • Love 121

 

Link to comment
Share on other sites

  • Honorable Member
3 minutes ago, Kafa said:

@ Mali What's next ? Reversed Binary Source ? XD 

loot filter.

I wouldn't normally share these but they are required for the loot filter.

Clip mask was reversed at summer, this is reversed today.

Edited by Mali
  • Metin2 Dev 1
  • Love 1

 

Link to comment
Share on other sites

  • 3 weeks later...

We should check for nullptr in this place:

 

//Find in void CWindowManager::SetTopUIWindow() (PythonWindowManager.cpp)
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
		m_pTopWindow = pTopWindow;
#endif

///Replace
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
		if (m_pTopWindow)
		{
			m_pTopWindow = pTopWindow;
		}
#endif

 

Link to comment
Share on other sites

  • Honorable Member
34 minutes ago, Deso said:

We should check for nullptr in this place:

 

//Find in void CWindowManager::SetTopUIWindow() (PythonWindowManager.cpp)
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
		m_pTopWindow = pTopWindow;
#endif

///Replace
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
		if (m_pTopWindow)
		{
			m_pTopWindow = pTopWindow;
		}
#endif

 

Please don't comment on things you don't know

  • Not Good 1
  • Lmao 1

 

Link to comment
Share on other sites

  • Premium
1 hour ago, Deso said:

We should check for nullptr in this place:

 

//Find in void CWindowManager::SetTopUIWindow() (PythonWindowManager.cpp)
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
		m_pTopWindow = pTopWindow;
#endif

///Replace
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
		if (m_pTopWindow)
		{
			m_pTopWindow = pTopWindow;
		}
#endif

 

Nice, unfix.

  • Lmao 3


 

Link to comment
Share on other sites

  • Premium
4 hours ago, Deso said:

We should check for nullptr in this place:

 

//Find in void CWindowManager::SetTopUIWindow() (PythonWindowManager.cpp)
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
		m_pTopWindow = pTopWindow;
#endif

///Replace
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
		if (m_pTopWindow)
		{
			m_pTopWindow = pTopWindow;
		}
#endif

 

 

I understand the objective of checking but m_pTopWindow is considered NULL by default.
Meaning the code wouldn't work without wndMgr.SetWheelTopWindow
There's no reason to use that piece of code.

Link to comment
Share on other sites

4 hours ago, msnas said:

 

I understand the objective of checking but m_pTopWindow is considered NULL by default.
Meaning the code wouldn't work without wndMgr.SetWheelTopWindow
There's no reason to use that piece of code.


For me my Client crashed there when i used the wheel on character details, thats why i put the check.

Edited by Deso
  • Lmao 1
Link to comment
Share on other sites

  • Honorable Member
2 hours ago, Deso said:


For me my Client crashed there when i used the wheel on character details, thats why i put the check.

It's funny that you keep repeating your mistake.

With your “Fix” 😕

 

Edited by Mali
  • Facepalm 1

 

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 3 months later...
  • Active Member

Thanks @ Malí for the system, work great.

Sorry if this isn't the right section, but  think it's silly to open a post for this, still, if it's not right, delete it and apologise. With your permission, seeing that there are many people who don't know how to make it work and such  would like to port what  have achieved after trial and error, sorry if there is something wrong.

1.Normal Character:

Spoiler

1.Search your last Import, in my case is; import uiCharacterDetails and add:

Spoiler

from ui import ScrollBar

2.Now Search in Class CharacterWindow this:

Spoiler

    def Show(self):
        self.__LoadWindow()
        if app.DETAILS_UI:
            self.__InitCharacterDetailsUIButton()
            if self.chDetailsWnd and self.isOpenedDetailsWnd:
                self.chDetailsWnd.Show()

        ui.ScriptWindow.Show(self)

3.Add After ui.ScriptWindow.Show(self):

Spoiler

        if app.MOUSE_WHEEL_TOP_WINDOW:
            wndMgr.SetWheelTopWindow(self.hWnd)

4.Now search in the same Class this function:

Spoiler

    def Close(self):
        if 0 != self.toolTipSkill:
            self.toolTipSkill.Hide()
        if app.DETAILS_UI:
            if self.chDetailsWnd and self.chDetailsWnd.IsShow():
                self.chDetailsWnd.Hide()

        self.Hide()

5.And after self.Hide() add:

Spoiler

        if app.MOUSE_WHEEL_TOP_WINDOW:
            wndMgr.ClearWheelTopWindow()

6.Now search:

Spoiler

    def GetState(self):
        return self.state

7.And after, add:

Spoiler

    if app.MOUSE_WHEEL_TOP_WINDOW:
        def OnMouseWheelButtonUp(self):
            if self.GetState() == "STATUS":
                self.SetState("SKILL")
            elif self.GetState() == "SKILL":
                self.SetState("EMOTICON")
            elif self.GetState() == "EMOTICON":
                self.SetState("QUEST")
            if self.ScrollBar:
                self.ScrollBar.OnUp()
                return True

            return False

        def OnMouseWheelButtonDown(self):
            if self.GetState() == "SKILL":
                self.SetState("STATUS")
            elif self.GetState() == "EMOTICON":
                self.SetState("SKILL")
            elif self.GetState() == "QUEST":
                self.SetState("EMOTICON")
            if self.ScrollBar:
                self.ScrollBar.OnDown()
                return True

            return False

Result: https://metin2.download/picture/Myh5nKeTsS6uSY6YDg2Kz8R1q9lunne0/.gif

 

2.Bonus Board Like GF (Mali version) special thanks to @ Owsap for code:

Spoiler

1.Open UiCharacterDetails.py and search;

Spoiler

    def Show(self):
        ui.ScriptWindow.Show(self)
        self.SetTop()

2.Replace wit this:

Spoiler

    def Show(self):
        ui.ScriptWindow.Show(self)
        self.SetTop()
        if app.MOUSE_WHEEL_TOP_WINDOW:
            wndMgr.SetWheelTopWindow(self.hWnd)

3.Now search;

Spoiler

    def OnScroll(self):
        self.RefreshLabel()

4.Add now:

Spoiler

    if app.MOUSE_WHEEL_TOP_WINDOW:
        def OnMouseWheelButtonUp(self):
            if self.ScrollBar:
                self.ScrollBar.OnUp()
                return True

            return False

        def OnMouseWheelButtonDown(self):
            if self.ScrollBar:
                self.ScrollBar.OnDown()
                return True

            return False

Result: https://metin2.download/picture/lsqz2B7A20m2Mj0D30oNL7bj7fa7409q/.gif

 

3.Special Storage:

Spoiler

1.Add imports and ScrollBar

Spoiler

import wndMgr

from ui import ScrollBar

2.Search;

Spoiler

    class ExtendedInventoryWindow(ui.ScriptWindow):

add after  def __init

Spoiler

self.ScrollBar = ScrollBar()

3.Now Search in the same clas:

Spoiler

def show(self):

add after:

Spoiler

            if app.MOUSE_WHEEL_TOP_WINDOW:
                wndMgr.SetWheelTopWindow(self.hWnd)

4.Now search:

Spoiler

def close(self):

add:

Spoiler

            if app.MOUSE_WHEEL_TOP_WINDOW:
                wndMgr.ClearWheelTopWindow()

5.Now search :

Spoiler

        def SetInventoryPage(self, page):
            self.inventoryPageIndex = page
            for y  in range(0,len(self.inventoryTab)):
                self.inventoryTab[y].SetUp()
            self.inventoryTab[page].Down()
            self.RefreshBagSlotWindow()

Add now:

Spoiler

        if app.MOUSE_WHEEL_TOP_WINDOW:
            def OnMouseWheelButtonUp(self):
                if self.inventoryType in [0, 1, 2, 3, 4]:
                    self.SetInventoryType(self.inventoryType + 1)
                elif self.inventoryType == 5:  # El 1 tipo de inventario
                    pass
                elif self.ScrollBar:
                    self.ScrollBar.OnUp()

            def OnMouseWheelButtonDown(self):
                if self.inventoryType in [5, 4, 3, 2, 1]:
                    self.SetInventoryType(self.inventoryType - 1)
                elif self.inventoryType == 0:  # Límite superior, no permitir decrementar más allá de 6
                    pass
                elif self.ScrollBar:
                    self.ScrollBar.OnDown()

Now you can move in special storage like this;

https://metin2.download/picture/rFXz6EN5Pt84nF4wtV70EHI7Zaz186Eu/.gif

edit1: If you have more brain than me, you can use :

Spoiler

self.SetInventoryPage(self.inventoryPageIndex + 1)

self.SetInventoryPage(self.inventoryPageIndex - 1)

To move in space 1, 2 and 3.

Sorry if you found some problems or don't like the code, thanks again🙂

edit2: don't know because ycant use the normal "y" so, change in the last update the "y". 

Spoiler

def SetInventoryPage(self, page):
[....]

 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 5

KH.jpg

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

Link to comment
Share on other sites

Announcements



×
×
  • 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.