Jump to content

Recommended Posts

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.