Jump to content

Sort Inventory


Recommended Posts

  • 2 weeks later...
  • 1 month later...

Hi, i have found a bug:
when you have the mouse on the button, and you press the I to close the inventory, the tooltip remains open, you have to move the mouse from the button and close the inventory to do so that doesn't happen;
Here is the fix:
look in the file client->root->uiinventory.py, inside class InventoryWindow(ui.ScriptWindow) (it's the third def Close(self) you'll find):
 

	def Close(self):
		self.Hide(

add below:

		if app.ENABLE_SORT_INVEN:
			for i in xrange(len(self.tooltipInfo)):
				self.tooltipInfo[i].Hide()
Edited by 4peppe
  • Love 1
Link to comment
Share on other sites

23 hours ago, 4peppe said:

Hi, i have found a bug:
when you have the mouse on the button, and you press the I to close the inventory, the tooltip remains open, you have to move the mouse from the button and close the inventory to do so that doesn't happen;
Here is the fix:
look in the file client->root->uiinventory.py, inside class InventoryWindow(ui.ScriptWindow) (it's the third def Close(self) you'll find):
 

	def Close(self):
		self.Hide(

add below:

		if app.ENABLE_SORT_INVEN:
			for i in xrange(len(self.tooltipInfo)):
				self.tooltipInfo[i].Hide()

@ Mali

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...

Hello! 

How we can fix name sort for multilanguage?

I used this function for name sort, but it doesn't work. The system read only default language "English".

 

Return for name sort:

return std::strcmp(i1->GetLocaleName(), i2->GetLocaleName()) < 0;

 

item.cpp function:

const char* CItem::GetLocaleName(BYTE bLocale)
{
    if (bLocale == LOCALE_MAX_NUM)
    {
        if (m_pOwner != NULL)
            bLocale = m_pOwner->GetLanguage();
        else
        {
            if (GetDesc())
                bLocale = GetDesc()->GetLanguage();
            else
                bLocale = LOCALE_DEFAULT;
        }
    }
    return m_pProto ? LC_ITEM_NAME(GetVnum(), bLocale) : NULL;
}

Link to comment
Share on other sites

  • 1 month later...

Hi, im trying to install this part at def OnUpdate(self):

		if app.ENABLE_SORT_INVEN and self.tooltipInfo:
			for i in xrange(len(self.tooltipInfo)):
				if self.yenilebutton.IsIn():
					self.tooltipInfo[i].Show()
				else:
					self.tooltipInfo[i].Hide()

but def OnUpdate(self): missing from my uiinventory. Whats the right code?

Thanks in advance.

  • Metin2 Dev 1
Link to comment
Share on other sites

23 hours ago, Jimmermania said:

Hi, im trying to install this part at def OnUpdate(self):

		if app.ENABLE_SORT_INVEN and self.tooltipInfo:
			for i in xrange(len(self.tooltipInfo)):
				if self.yenilebutton.IsIn():
					self.tooltipInfo[i].Show()
				else:
					self.tooltipInfo[i].Hide()

but def OnUpdate(self): missing from my uiinventory. Whats the right code?

Thanks in advance.

put that code upper.

def RefreshBagSlotWindow(self):

Link to comment
Share on other sites

  • 2 weeks later...

Announcements



  • Similar Content

  • Similar Content

  • Similar Content

  • Tags

  • Activity

    1. 5

      Effect weapons

    2. 3

      Crystal Metinstone

    3. 3

      Feeding game source to LLM

    4. 113

      Ulthar SF V2 (TMP4 Base)

    5. 3

      Feeding game source to LLM

    6. 0

      Target Information System

    7. 3

      Feeding game source to LLM

    8. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.