Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. self.Window = ui.OKIENKO1()
  2. self.Window.SetImage("img_file_location")
  3. self.Window.SetSize(336, 135)
  4. self.Window.SetPosition((wndMgr.GetScreenWidth() - self.GetWidth())-1250, wndMgr.GetScreenHeight()-100-150)
  5.  
  6.  
  7.  
  8.  
  9.  
  10. class OKIENKO1(Window):
  11. def __init__(self):
  12.  
  13. Board = ExpandedImageBox()
  14. Board.SetParent(self)
  15. Board.Show()
  16.  
  17. titleName = TextLine()
  18. titleName.SetParent(Board)
  19. titleName.SetPosition(0, 4)
  20. titleName.SetWindowHorizontalAlignCenter()
  21. titleName.SetHorizontalAlignCenter()
  22. titleName.Show()
  23.  
  24. self.Board = Board
  25. self.titleName = titleName
  26.  
  27. def __del__(self):
  28. Board.__del__(self)
  29. self.Board = None
  30. self.titleName = None
  31.  
  32. def SetImage(self, image):
  33. self.Board.LoadImage(image)
  34.  
  35. def SetSize(self, width, height):
  36. self.Board.SetSize(width, height)
  37. self.titleName.UpdateRect()
  38.  
  39. def SetTitleColor(self, color):
  40. self.titleName.SetPackedFontColor(color)
  41.  
  42. def SetTitleName(self, name):
  43. self.titleName.SetText(name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement