Jump to content

Recommended Posts

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

2 minutes ago, Shisui said:

That's only for showing the affects on the stone like the image above.

so this function:     def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString="", custumAffectString2="", leftTime=0):

Link to comment
https://metin2.dev/topic/12040-metin-stones/#findComment-69836
Share on other sites

Make a for loop from 0 to 3, create ALL the textlines in it, give the properties to the textlines, give the proper spacings, check if the bonus type and value arent null and assign them to the control list.

Spoiler

...

metinImage.SetPosition(10, self.toolTipHeight)
            
## Affect
baseHeightInterval = 16

for i in xrange(0, 3):
    baseHeight = self.toolTipHeight + (baseHeightInterval * (i + 1)) + 2
    
    affectTextLine = ui.TextLine()
    affectTextLine.SetParent(self)
    affectTextLine.SetFontName(self.defFontName)
    affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
    affectTextLine.SetPosition(50, baseHeight)
    affectTextLine.SetOutline()
    affectTextLine.SetFeather()
    affectTextLine.Show()
    
    if itemIndex!=constInfo.ERROR_METIN_STONE:
        affectType, affectValue = item.GetAffect(i)
        affectTextLine.SetText(self.__GetAffectString(affectType, affectValue))
    else:
        affectTextLine.SetText(localeInfo.TOOLTIP_APPLY_NOAFFECT)
    
    if custumAffectString:
        affectTextLine.SetText(custumAffectString)
        self.childrenList.append(affectTextLine)
        break
    else:
        self.toolTipHeight += 12
        self.childrenList.append(affectTextLine)

...

It could be better, but i think its fine, although i dont know if i need to create a different signed component tho

I didnt test, but i dont see why it shouldnt work.

Regards.

Edited by NewWars
Code of explanation added
Link to comment
https://metin2.dev/topic/12040-metin-stones/#findComment-69842
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.