Advertisement
Guest User

uicharacter.py

a guest
Nov 2nd, 2023
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.69 KB | Gaming | 0 0
  1. ------> tutorial made by Kapa3a <-------
  2. add up import :
  3.  
  4. if app.ENABLE_DETAILS_UI:
  5.     import uiCharacterDetails
  6.    
  7. 1.Search :
  8.  
  9. class CharacterWindow(ui.ScriptWindow):
  10.  
  11. [...]
  12.  
  13.  
  14.     def __init__(self):
  15.  
  16. *Add after :
  17.  
  18.         if app.ENABLE_DETAILS_UI:
  19.             self.chDetailsWnd = None
  20.             self.isOpenedDetailsWnd = False    
  21.  
  22. 2.Search :
  23.  
  24.     def __Initialize(self):
  25.  
  26. [...]
  27.  
  28.         self.skillGroupButton = ()
  29.  
  30.         self.activeSlot = None
  31.         self.activeSkillPointValue = None
  32.  
  33.  
  34. *Add after :
  35.  
  36.         if app.ENABLE_DETAILS_UI:
  37.             def OnTop(self):
  38.                 if self.chDetailsWnd:
  39.                     self.chDetailsWnd.SetTop()
  40.  
  41.         if app.ENABLE_DETAILS_UI:
  42.             def Hide(self):
  43.                 if self.chDetailsWnd:
  44.                     self.isOpenedDetailsWnd = self.chDetailsWnd.IsShow()
  45.                     self.chDetailsWnd.Close()
  46.                 wndMgr.Hide(self.hWnd)
  47.  
  48.  
  49. 3.Search :
  50.  
  51.  
  52.     def Show(self):
  53.    
  54. *Add after :
  55.  
  56.         if app.ENABLE_DETAILS_UI:
  57.             self.__InitCharacterDetailsUIButton()
  58.             if self.chDetailsWnd and self.isOpenedDetailsWnd:
  59.                 self.chDetailsWnd.Show()
  60.                
  61.                
  62. 4.Search :
  63.  
  64.  
  65.     def __BindObject(self):
  66.  
  67. [...]
  68.  
  69.  
  70.         for i in xrange(quest.QUEST_MAX_NUM):
  71.             self.questNameList.append(self.GetChild("Quest_Name_0" + str(i)))
  72.             self.questLastTimeList.append(self.GetChild("Quest_LastTime_0" + str(i)))
  73.             self.questLastCountList.append(self.GetChild("Quest_LastCount_0" + str(i)))
  74.  
  75.  
  76. *Add after :
  77.  
  78.  
  79.         if app.ENABLE_DETAILS_UI:
  80.             self.MainBoard = self.GetChild("board")
  81.             self.ExpandBtn = ui.MakeButton(self.MainBoard, 240, 120, "", "d:/ymir work/ui/game/belt_inventory/", "btn_minimize_normal.tga", "btn_minimize_over.tga", "btn_minimize_down.tga")
  82.             self.ExpandBtn.SetEvent(ui.__mem_func__(self.__ClickExpandButton))
  83.             self.MinimizeBtn = ui.MakeButton(self.MainBoard, 240, 120, "", "d:/ymir work/ui/game/belt_inventory/", "btn_expand_normal.tga", "btn_expand_over.tga", "btn_expand_down.tga")
  84.             self.MinimizeBtn.SetEvent(ui.__mem_func__(self.__ClickMinimizeButton))
  85.  
  86.     if app.ENABLE_DETAILS_UI:
  87.         def __InitCharacterDetailsUIButton(self):
  88.             self.ExpandBtn.Show()
  89.             self.MinimizeBtn.Hide()
  90.            
  91.         def __ClickExpandButton(self):
  92.             #print "__ClickExpandButton"   
  93.            
  94.             if not self.chDetailsWnd:
  95.                 self.chDetailsWnd = uiCharacterDetails.CharacterDetailsUI(self)
  96.                 self.chDetailsWnd.Show()
  97.             else:
  98.                 self.chDetailsWnd.Show()
  99.                
  100.             self.ExpandBtn.Hide()
  101.             self.MinimizeBtn.Show()
  102.                
  103.         def __ClickMinimizeButton(self):
  104.             #print "__ClickMinimizeButton"
  105.            
  106.             self.chDetailsWnd.Hide()
  107.             self.MinimizeBtn.Hide()
  108.             self.ExpandBtn.Show()
  109.            
  110.         def OnMoveWindow(self, x, y):
  111.             #print "OnMoveWindow x %s y %s" % (x, y)
  112.             if self.chDetailsWnd:
  113.                 self.chDetailsWnd.AdjustPosition(x, y)
  114.  
  115.  
  116.  
  117. 5.Search :
  118.  
  119.  
  120.     def __BindEvent(self):
  121.  
  122. [...]
  123.  
  124.         for titleBarValue in self.titleBarDict.itervalues():
  125.             titleBarValue.SetCloseEvent(ui.__mem_func__(self.Hide))
  126.  
  127. *replace with :
  128.  
  129.         for titleBarValue in self.titleBarDict.itervalues():
  130.             if app.ENABLE_DETAILS_UI:
  131.                 titleBarValue.SetCloseEvent(ui.__mem_func__(self.Close))
  132.             else:
  133.                 titleBarValue.SetCloseEvent(ui.__mem_func__(self.Hide))
  134.  
  135.  
  136. 6.Search :
  137.  
  138.  
  139.     def Close(self):
  140.         if 0 != self.toolTipSkill:
  141.             self.toolTipSkill.Hide()
  142.  
  143. *Add after :
  144.  
  145.  
  146.         if app.ENABLE_DETAILS_UI:
  147.             if self.chDetailsWnd and self.chDetailsWnd.IsShow():
  148.                 self.chDetailsWnd.Hide()
  149.  
  150.  
  151. 7.Search :
  152.  
  153.     def RefreshStatus(self):
  154.  
  155. [...]
  156.  
  157.         self.__RefreshStatusPlusButtonList()
  158.         self.__RefreshStatusMinusButtonList()
  159.         self.RefreshAlignment()
  160.  
  161.         if self.refreshToolTip:
  162.             self.refreshToolTip()
  163.  
  164.  
  165. *Add after :
  166.  
  167.         if app.ENABLE_DETAILS_UI:
  168.             if self.chDetailsWnd and self.chDetailsWnd.IsShow():
  169.                 self.chDetailsWnd.RefreshLabel()            
  170.                
  171.        
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement