Advertisement
Guest User

interfaceModule.codepart.py

a guest
Aug 31st, 2016
2,911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.91 KB | None | 0 0
  1.  
  2.     def BINARY_RecvQuest(self, index, name, iconType, iconName):
  3.  
  4.         btn = self.__FindQuestButton(index)
  5.         if 0 != btn:
  6.             self.__DestroyQuestButton(btn)
  7.  
  8.         btn = uiWhisper.WhisperButton()
  9.  
  10.         # QUEST_LETTER_IMAGE
  11.         ##!! 20061026.levites.Äù½ºÆ®_À̹ÌÁö_±³Ã¼
  12.         import item
  13.         if "item"==iconType:
  14.             item.SelectItem(int(iconName))
  15.             buttonImageFileName=item.GetIconImageFileName()
  16.         else:
  17.             buttonImageFileName=iconName
  18.  
  19.         if iconName and (iconType not in ("item", "file")): # type "ex" implied
  20.             btn.SetUpVisual("d:/ymir work/ui/game/quest/questicon/%s" % (iconName.replace("open", "close")))
  21.             btn.SetOverVisual("d:/ymir work/ui/game/quest/questicon/%s" % (iconName))
  22.             btn.SetDownVisual("d:/ymir work/ui/game/quest/questicon/%s" % (iconName))
  23.         else:
  24.             if localeInfo.IsEUROPE():
  25.                 btn.SetUpVisual(localeInfo.GetLetterCloseImageName())
  26.                 btn.SetOverVisual(localeInfo.GetLetterOpenImageName())
  27.                 btn.SetDownVisual(localeInfo.GetLetterOpenImageName())
  28.             else:
  29.                 btn.SetUpVisual(buttonImageFileName)
  30.                 btn.SetOverVisual(buttonImageFileName)
  31.                 btn.SetDownVisual(buttonImageFileName)
  32.                 btn.Flash()
  33.         # END_OF_QUEST_LETTER_IMAGE
  34.  
  35.         if localeInfo.IsARABIC():
  36.             btn.SetToolTipText(name, 0, 35)
  37.             btn.ToolTipText.SetHorizontalAlignCenter()
  38.         else:
  39.             btn.SetToolTipText(name, -20, 35)
  40.             btn.ToolTipText.SetHorizontalAlignLeft()
  41.  
  42.         listOfTypes = iconType.split(",")
  43.         if "blink" in listOfTypes:
  44.             btn.Flash()
  45.  
  46.         listOfColors = {
  47.             "golden":   0xFFffa200,
  48.             "green":    0xFF00e600,
  49.             "blue":     0xFF0099ff,
  50.             "purple":   0xFFcc33ff,
  51.  
  52.             "fucsia":   0xFFcc0099,
  53.             "aqua":     0xFF00ffff,
  54.         }
  55.         for k,v in listOfColors.iteritems():
  56.             if k in listOfTypes:
  57.                 btn.ToolTipText.SetPackedFontColor(v)
  58.  
  59.         btn.SetEvent(ui.__mem_func__(self.__StartQuest), btn)
  60.         btn.Show()
  61.  
  62.         btn.index = index
  63.         btn.name = name
  64.  
  65.         self.questButtonList.insert(0, btn)
  66.         self.__ArrangeQuestButton()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement