[FIX] Tooltip bonus board official

  • Bellow you'll see a small fix for tooltip from bonus board like official.

    Go in root, open uicharacterdetails.py and look for:



    Code
    1. for i in xrange(self.UI_MAX_COUNT):
    2. self.labelTextList[i].SetOverEvent( ui.__mem_func__(self.__ButtonOverIn), i )
    3. self.labelTextList[i].SetOverOutEvent( ui.__mem_func__(self.__ButtonOverOut), i )


    Replace that with:


    Code
    1. for i in xrange(self.UI_MAX_COUNT):
    2. self.labelTextList[i].ShowToolTip = lambda arg=i: self.__ButtonOverIn(arg)
    3. self.labelTextList[i].HideToolTip = lambda arg=i: self.__ButtonOverOut(arg)



    Now look for:


    Code
    1. if i+self.LabelLineCount < self.UI_MAX_COUNT:
    2. self.labelTextList[i+self.LabelLineCount].SetOverEvent( ui.__mem_func__(self.__ButtonOverIn), self.LabelLineCount + self.startline_endlinecount )
    3. self.labelTextList[i+self.LabelLineCount].SetOverOutEvent( ui.__mem_func__(self.__ButtonOverOut), self.LabelLineCount + self.startline_endlinecount )


    Replace that with:


    Code
    1. if i+self.LabelLineCount < self.UI_MAX_COUNT:
    2. self.labelTextList[i+self.LabelLineCount].ShowToolTip = lambda arg=self.LabelLineCount + self.startline_endlinecount: self.__ButtonOverIn(arg)
    3. self.labelTextList[i+self.LabelLineCount].HideToolTip = lambda arg=self.LabelLineCount + self.startline_endlinecount: self.__ButtonOverOut(arg)


    Now open uitooltip.py and look for def AutoAppendTextLine(self, text, color = FONT_COLOR, centerAlign = True):

    After the entire definition add this:


    Code
    1. def SetThinBoardSize(self, width, height = 12):
    2. self.toolTipWidth = width
    3. self.toolTipHeight = height


    Now go in ui.py and look for:


    Code
    1. elif Type == "thinboard":
    2. parent.Children[Index] = ThinBoard()
    3. parent.Children[Index].SetParent(parent)
    4. self.LoadElementThinBoard(parent.Children[Index], ElementValue, parent)


    Bellow add (or replace if you already have this):


    Code
    1. elif Type == "thinboard_gold":
    2. parent.Children[Index] = ThinBoardGold()
    3. parent.Children[Index].SetParent(parent)
    4. self.LoadElementThinBoard(parent.Children[Index], ElementValue, parent)
    5. elif Type == "thinboard_circle":
    6. parent.Children[Index] = ThinBoardCircle()
    7. parent.Children[Index].SetParent(parent)
    8. self.LoadElementThinBoard(parent.Children[Index], ElementValue, parent)


    Now look for class ThinBoard(Window): and after entire class add (or replace if you already have this):



    [!] Make sure you do the right TABS.


    Bitte melden Sie sich an, um diesen Link zu sehen.

  • Dieses Thema enthält 12 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.