Jump to content
  • 0

Metin Stones


NewWars

Question

  • Answers 8
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

8 answers to this question

Recommended Posts

  • 0
  • Discord Moderator

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 3

      Once upon a time...

    2. 1183

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    3. 3

      Once upon a time...

    4. 3

      Once upon a time...

    5. 0

      problem ability

    6. 0

      Transmutation system error "unknow command server"

    7. 39

      Official Transmutation / Change Look

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