Jump to content

valizrt

Inactive Member
  • Posts

    2
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by valizrt

  1. 6 hours ago, Finnael said:

    Try replacing your AppendTextLine function with this:

     

    
    	    def AppendTextLine(self, text, color = FONT_COLOR, centerAlign = TRUE):
    	        textLine = ui.TextLine()
    	        textLine.SetParent(self)
    	        textLine.SetFontName(self.defFontName)
    	        textLine.SetPackedFontColor(color)
    	        textLine.SetText(text)
    	        textLine.SetOutline()
    	        textLine.SetFeather(FALSE)
    	        textLine.Show()
    	 
    	        if centerAlign:
    	            textLine.SetPosition(self.toolTipWidth/2, self.toolTipHeight)
    	            textLine.SetHorizontalAlignCenter()
    	 
    	        else:
    	            textLine.SetPosition(10, self.toolTipHeight)
    	 
    	        self.childrenList.append(textLine)
    	 
    	        self.toolTipHeight += self.TEXT_LINE_HEIGHT
    	        self.ResizeToolTip()
    	 
    	        return textLine
    	

     

    This function is ok for alignment, but the width of the tooltip will be generated according to the 'Title' text length and if the title text is too short, some longer bonus texts will get out of the tooltip. I tried to set the tooltip width using the longest text but no result so far. Any ideas?

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